00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef QOLYESTER_DAEMON_UTL_ARGS_HH
00021 # define QOLYESTER_DAEMON_UTL_ARGS_HH 1
00022
00023 # include "config.hh"
00024 # include "cst/constants.hh"
00025 # include <string>
00026 # include <limits>
00027
00028 namespace olsr {
00029
00030 # ifdef QOLYESTER_ENABLE_HNA
00031 bool do_dump_hna = false;
00032 # endif
00033 # ifdef QOLYESTER_ENABLE_MID
00034 bool do_dump_mid = false;
00035 # endif
00036 bool do_dump_tc = false;
00037 bool do_dump_hello = false;
00038 bool do_dump_state = false;
00039 bool do_dump_prof = false;
00040 bool nodetach = false;
00041 bool notables = false;
00042
00043 # ifdef DEBUG
00044 bool debugtrace = false;
00045 std::string debugtrace_file;
00046 unsigned debugtrace_log_level = std::numeric_limits<unsigned>::max();
00047 bool debugtrace_timestamps = true;
00048 # else
00049 const bool debugtrace = false;
00050 # endif
00051
00052 # if QOLYESTER_FAMILY_INET == 6
00053 bool dirty_promisc_hack = false;
00054 # endif
00055
00056 # ifdef QOLYESTER_ENABLE_VIRTUAL
00057 std::string switch_sockname = VIRTUAL_SOCKNAME;
00058 # endif
00059
00060 unsigned current_log_level = 3;
00061 bool timestamps = false;
00062 bool use_syslog = false;
00063
00064 std::string error_file;
00065 std::string warning_file;
00066 std::string notice_file;
00067 std::string dump_file;
00068 # ifdef DEBUG
00069 std::string debug_file;
00070 # endif
00071 static inline std::string usage();
00072 static inline std::string putversion();
00073 static inline void die(const char* format, ...);
00074
00075 namespace utl {
00076
00077 inline void parse_args(int& argc, char**& argv);
00078
00079 inline void output_syslog();
00080
00081 inline void start_output();
00082 void stop_output();
00083
00084 }
00085
00086 }
00087
00088 # include "args.hxx"
00089
00090 #endif // ! QOLYESTER_DAEMON_UTL_ARGS_HH