args.hh

Go to the documentation of this file.
00001 // Copyright (C) 2003-2006 Laboratoire de Recherche en Informatique
00002 
00003 // This file is part of Qolyester.
00004 
00005 // Qolyester is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU General Public License
00007 // as published by the Free Software Foundation; either version 2
00008 // of the License, or (at your option) any later version.
00009 
00010 // Qolyester is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018 // Boston, MA  02110-1301, USA.
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   } // namespace utl
00085 
00086 } // namespace olsr
00087 
00088 # include "args.hxx"
00089 
00090 #endif // ! QOLYESTER_DAEMON_UTL_ARGS_HH

Generated on Mon Sep 10 17:02:11 2007 for Qolyester daemon by  doxygen 1.5.1