Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

args.hh

Go to the documentation of this file.
00001 // Copyright (C) 2003, 2004, 2005 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, Boston, MA  02110-1301, USA.
00018 
00019 #ifndef QOLYESTER_DAEMON_UTL_ARGS_HH
00020 # define QOLYESTER_DAEMON_UTL_ARGS_HH 1
00021 
00022 # include "config.hh"
00023 # include "cst/constants.hh"
00024 # include <string>
00025 
00026 namespace olsr {
00027 
00028 # ifdef QOLYESTER_ENABLE_HNA
00029   bool  do_dump_hna   = false;
00030 # endif
00031 # ifdef QOLYESTER_ENABLE_MID
00032   bool  do_dump_mid   = false;
00033 # endif
00034   bool  do_dump_tc    = false;
00035   bool  do_dump_hello = false;
00036   bool  do_dump_state = false;
00037   bool  do_dump_prof  = false;
00038   bool  nodetach   = false;
00039   bool  notables   = false;
00040 
00041 # ifdef DEBUG
00042   bool  debugtrace = false;
00043   std::string   debugtrace_file;
00044   unsigned      debugtrace_log_level = 1000;
00045   bool          debugtrace_timestamps = true;
00046 # else
00047   const bool debugtrace = false;
00048 # endif
00049 
00050 # if QOLYESTER_FAMILY_INET == 6
00051   bool  dirty_promisc_hack = false;
00052 # endif
00053 
00054 # ifdef QOLYESTER_ENABLE_VIRTUAL
00055   std::string   switch_sockname = VIRTUAL_SOCKNAME;
00056 # endif
00057 
00058   unsigned      current_log_level = 3;
00059   bool          timestamps = false;
00060   bool          use_syslog = false;
00061 
00062   std::string   error_file;
00063   std::string   warning_file;
00064   std::string   notice_file;
00065   std::string   dump_file;
00066 # ifdef DEBUG
00067   std::string   debug_file;
00068 # endif
00069   static std::string    usage();
00070   static std::string    putversion();
00071   static void           die(const char* format, ...);
00072 
00073   namespace utl {
00074 
00075     void parse_args(int& argc, char**& argv);
00076 
00077     void output_syslog();
00078 
00079   } // namespace utl
00080 
00081 } // namespace olsr
00082 
00083 # ifndef QOLYESTER_DONTINCLUDE_HXX
00084 #  include "args.hxx"
00085 # endif
00086 
00087 #endif // ! QOLYESTER_DAEMON_UTL_ARGS_HH

Generated on Thu Jul 28 21:21:46 2005 for Qolyester daemon by  doxygen 1.4.1