xorp

util.hh

00001 // -*- c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t -*-
00002 
00003 // Copyright (c) 2001-2009 XORP, Inc.
00004 //
00005 // This program is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License, Version 2, June
00007 // 1991 as published by the Free Software Foundation. Redistribution
00008 // and/or modification of this program under the terms of any other
00009 // version of the GNU General Public License is not permitted.
00010 // 
00011 // This program is distributed in the hope that it will be useful, but
00012 // WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For more details,
00014 // see the GNU General Public License, Version 2, a copy of which can be
00015 // found in the XORP LICENSE.gpl file.
00016 // 
00017 // XORP Inc, 2953 Bunker Hill Lane, Suite 204, Santa Clara, CA 95054, USA;
00018 // http://xorp.net
00019 
00020 // $XORP: xorp/rtrmgr/util.hh,v 1.18 2008/10/02 21:58:26 bms Exp $
00021 
00022 #ifndef __RTRMGR_UTIL_HH__
00023 #define __RTRMGR_UTIL_HH__
00024 
00045 void xorp_path_init(const char* argv0);
00046 
00053 const string& xorp_binary_root_dir();
00054 
00061 const string& xorp_config_root_dir();
00062 
00070 string xorp_module_dir();
00071 
00079 string xorp_command_dir();
00080 
00088 string xorp_template_dir();
00089 
00097 string xorp_xrl_targets_dir();
00098 
00105 string xorp_config_file();
00106 
00113 string& unquote(string& s);
00114 
00121 string unquote(const string& s);
00122 
00131 bool is_quotable_string(const string& s);
00132 
00145 string find_executable_filename(const string& program_filename);
00146 
00163 void find_executable_filename_and_arguments(const string& program_request,
00164                         string& executable_filename,
00165                         string& program_arguments);
00166 
00167 #endif // __RTRMGR_UTIL_HH__
 All Classes Namespaces Functions Variables Typedefs Enumerations