enum CliModeType { CLI_MODE_NONE = 0, CLI_MODE_OPERATIONAL = 1, CLI_MODE_CONFIGURE = 2, CLI_MODE_TEXTENTRY = 3 } | CliModeType |
#include <cli.hh>
enum TTNodeType { NODE_VOID = 0, NODE_TEXT = 1, NODE_UINT = 2, NODE_INT = 3, NODE_BOOL = 4, NODE_TOGGLE = 4, NODE_IPV4 = 5, NODE_IPV4NET = 6, NODE_IPV6 = 7, NODE_IPV6NET = 8, NODE_MACADDR = 9 } | TTNodeType |
#include <template_tree_node.hh>
list<string> split (const string& s, char sep)
| split |
#include <util.hh>
Tokenize a string by breaking into separate strings when separator character is encountered.
Parameters:
s | string to be tokenized. |
sep | separator to break string it. |
Returns: list of tokens.
string find_exec_path_name (const char* progname)
| find_exec_path_name |
#include <util.hh>
Attempt to find path of named executable.
If the supplied string looks like a qualified path then this function returns the directory component, otherwise it tries to locate the named program name in the directories listed in the PATH environment variable.
Parameters:
progname | program to find (typically the argv[0] supplied to main()). |
Returns: path of executable on success, empty string on failure.
void xorp_path_init (const char* argv0)
| xorp_path_init |
#include <util.hh>
Initialize paths.
This method attempts to determine where XORP is being run from and initialize paths accordingly. If the environment variable XORP_ROOT is set, this overrides the path determination algorithm.
This method should be called before any of the following methods:
Parameters:
argv0 | the argv[0] supplied to main(). |
const string& xorp_binary_root_dir ()
| xorp_binary_root_dir |
#include <util.hh>
Return top-level directory of xorp binaries.
xorp_path_init() must be called before this method will return a sane value.
const string& xorp_config_root_dir ()
| xorp_config_root_dir |
#include <util.hh>
Return top-level directory of xorp configuration files.
xorp_path_init() must be called before this method will return a sane value.
string xorp_template_dir ()
| xorp_template_dir |
#include <util.hh>
Return the path of the xorp templates directory given the xorp_root path.
xorp_path_init() must be called before this method will return a sane value.
string xorp_xrl_targets_dir ()
| xorp_xrl_targets_dir |
#include <util.hh>
Return the path of the xrl targets directory given the xorp_root path.
xorp_path_init() must be called before this method will return a sane value.
string xorp_boot_file ()
| xorp_boot_file |
#include <util.hh>
Return path of boot config file to be used given the xorp_root path.
xorp_path_init() must be called before this method will return a sane value.
const char* xorp_basename (const char* argv0)
| xorp_basename |
#include <util.hh>
Return basename of binary.
Parameters:
argv0 | the argv[0] supplied to main(). |
string& unquote (string& s)
| unquote |
#include <util.hh>
Remove enclosing quotes from string.
Parameters:
s | string that may have enclosing quotes. |
Returns: string with quotes removed.
string unquote (const string& s)
| unquote |
#include <util.hh>
Remove enclosing quotes from string value.
Parameters:
s | string that may have enclosing quotes. |
Returns: copy of string with quotes removed.
enum XRLMatchType { MATCH_FAIL = 0x0, MATCH_XRL = 0x1, MATCH_RSPEC = 0x2, MATCH_ALL = MATCH_XRL | MATCH_RSPEC } | XRLMatchType |
#include <xrldb.hh>