More...
#include "../../mi/mi.h"


Go to the source code of this file.
Data Structures | |
| struct | fifo_opt |
Defines | |
| #define | E_ADDBACKUP -9 |
| #define | E_DELBACKUP -10 |
| #define | E_HELP -17 |
| #define | E_INVALIDOPT -13 |
| #define | E_LOADCONF -11 |
| #define | E_MISC -1 |
| #define | E_MISSOPT -14 |
| #define | E_NOAUTOBACKUP -6 |
| #define | E_NOHASHBACKUP -7 |
| #define | E_NOHOSTBACKUP -8 |
| #define | E_NOMEM -4 |
| #define | E_NOOPT -2 |
| #define | E_NOUPDATE -16 |
| #define | E_RESET -5 |
| #define | E_RULEFIXUP -15 |
| #define | E_SAVECONF -12 |
| #define | E_WRONGOPT -3 |
| #define | FBUF_SIZE 2048 |
| #define | FIFO_ERR(e) (fifo_err = e) |
| #define | O_DOMAIN (1 << 1) |
| #define | O_H_INDEX (1 << 7) |
| #define | O_HOST (1 << 2) |
| #define | O_NEW_TARGET (1 << 3) |
| #define | O_PREFIX 1 |
| #define | O_PROB (1 << 4) |
| #define | O_R_PREFIX (1 << 5) |
| #define | O_R_SUFFIX (1 << 6) |
| #define | O_STRIP (1 << 8) |
| #define | OPT_ACTIVATE 4 |
| #define | OPT_ADD 0 |
| #define | OPT_DEACTIVATE 3 |
| #define | OPT_DOMAIN 1 |
| #define | OPT_DOMAIN_CHR 'd' |
| #define | OPT_HASH_INDEX 7 |
| #define | OPT_HASH_INDEX_CHR 'i' |
| #define | OPT_HELP_CHR '?' |
| #define | OPT_HOST 2 |
| #define | OPT_HOST_CHR 'h' |
| #define | OPT_INVALID 2 |
| #define | OPT_MANDATORY 0 |
| #define | OPT_NEW_TARGET 3 |
| #define | OPT_NEW_TARGET_CHR 't' |
| #define | OPT_OPTIONAL 1 |
| #define | OPT_PREFIX 0 |
| #define | OPT_PREFIX_CHR 'p' |
| #define | OPT_PROB 4 |
| #define | OPT_PROB_CHR 'w' |
| #define | OPT_R_PREFIX 5 |
| #define | OPT_R_PREFIX_CHR 'P' |
| #define | OPT_R_SUFFIX 6 |
| #define | OPT_R_SUFFIX_CHR 'S' |
| #define | OPT_REMOVE 1 |
| #define | OPT_REPLACE 2 |
| #define | OPT_STAR "*" |
| #define | OPT_STRIP 8 |
| #define | OPT_STRIP_CHR 's' |
Typedefs | |
| typedef struct fifo_opt | fifo_opt_t |
Functions | |
| struct mi_root * | activate_host (struct mi_root *cmd_tree, void *param) |
| struct mi_root * | add_host (struct mi_root *cmd_tree, void *param) |
| struct mi_root * | deactivate_host (struct mi_root *cmd_tree, void *param) |
| struct mi_root * | delete_host (struct mi_root *cmd_tree, void *param) |
| struct mi_root * | dump_fifo (struct mi_root *cmd_tree, void *param) |
| struct mi_root * | reload_fifo (struct mi_root *cmd_tree, void *param) |
| struct mi_root * | replace_host (struct mi_root *cmd_tree, void *param) |
Variables | |
| int | fifo_err |
Definition in file cr_fifo.h.
| #define E_ADDBACKUP -9 |
Definition at line 45 of file cr_fifo.h.
Referenced by print_fifo_err(), and update_route_data_recursor().
| #define E_DELBACKUP -10 |
Definition at line 46 of file cr_fifo.h.
Referenced by print_fifo_err(), and update_route_data_recursor().
| #define E_HELP -17 |
| #define E_INVALIDOPT -13 |
| #define E_LOADCONF -11 |
| #define E_MISC -1 |
| #define E_MISSOPT -14 |
| #define E_NOAUTOBACKUP -6 |
Definition at line 42 of file cr_fifo.h.
Referenced by print_fifo_err(), and update_route_data_recursor().
| #define E_NOHASHBACKUP -7 |
Definition at line 43 of file cr_fifo.h.
Referenced by print_fifo_err(), and update_route_data_recursor().
| #define E_NOHOSTBACKUP -8 |
Definition at line 44 of file cr_fifo.h.
Referenced by print_fifo_err(), and update_route_data_recursor().
| #define E_NOMEM -4 |
Definition at line 40 of file cr_fifo.h.
Referenced by print_fifo_err(), and update_route_data_recursor().
| #define E_NOOPT -2 |
| #define E_NOUPDATE -16 |
| #define E_RESET -5 |
Definition at line 41 of file cr_fifo.h.
Referenced by print_fifo_err(), and update_route_data_recursor().
| #define E_RULEFIXUP -15 |
| #define E_SAVECONF -12 |
| #define E_WRONGOPT -3 |
| #define FIFO_ERR | ( | e | ) | (fifo_err = e) |
Definition at line 55 of file cr_fifo.h.
Referenced by get_fifo_opts(), update_route_data(), and update_route_data_recursor().
| #define O_DOMAIN (1 << 1) |
| #define O_H_INDEX (1 << 7) |
| #define O_HOST (1 << 2) |
| #define O_NEW_TARGET (1 << 3) |
| #define O_PREFIX 1 |
Flags for options to determine which options are used
Definition at line 102 of file cr_fifo.h.
Referenced by get_fifo_opts().
| #define O_PROB (1 << 4) |
| #define O_R_PREFIX (1 << 5) |
| #define O_R_SUFFIX (1 << 6) |
| #define OPT_ACTIVATE 4 |
Definition at line 83 of file cr_fifo.h.
Referenced by activate_host(), and update_route_data_recursor().
| #define OPT_ADD 0 |
| #define OPT_DEACTIVATE 3 |
Definition at line 82 of file cr_fifo.h.
Referenced by deactivate_host(), and update_route_data_recursor().
| #define OPT_DOMAIN 1 |
| #define OPT_DOMAIN_CHR 'd' |
| #define OPT_HASH_INDEX 7 |
| #define OPT_HASH_INDEX_CHR 'i' |
| #define OPT_HELP_CHR '?' |
| #define OPT_HOST 2 |
| #define OPT_HOST_CHR 'h' |
| #define OPT_INVALID 2 |
| #define OPT_MANDATORY 0 |
| #define OPT_NEW_TARGET 3 |
| #define OPT_NEW_TARGET_CHR 't' |
| #define OPT_PREFIX 0 |
| #define OPT_PREFIX_CHR 'p' |
Constants define option characters
Definition at line 115 of file cr_fifo.h.
Referenced by get_fifo_opts(), and print_replace_help().
| #define OPT_PROB 4 |
| #define OPT_PROB_CHR 'w' |
| #define OPT_R_PREFIX 5 |
| #define OPT_R_PREFIX_CHR 'P' |
| #define OPT_R_SUFFIX 6 |
| #define OPT_R_SUFFIX_CHR 'S' |
| #define OPT_REMOVE 1 |
Definition at line 80 of file cr_fifo.h.
Referenced by delete_host(), and update_route_data_recursor().
| #define OPT_REPLACE 2 |
Definition at line 81 of file cr_fifo.h.
Referenced by replace_host(), and update_route_data_recursor().
| #define OPT_STAR "*" |
| #define OPT_STRIP 8 |
| typedef struct fifo_opt fifo_opt_t |
activates the host given in the command line options, can be used only in file mode expect one mi node that contains the command
| cmd_tree | the MI command tree | |
| param | the parameter |
Definition at line 272 of file cr_fifo.c.
References CARRIERROUTE_MODE_FILE, fifo_opt::cmd, get_fifo_opts(), init_mi_tree(), mi_node::kids, MI_MISSING_PARM_LEN, MI_MISSING_PARM_S, MI_OK_LEN, MI_OK_S, mode, mi_node::next, mi_root::node, NULL, OPT_ACTIVATE, opt_settings, print_fifo_err(), _str::s, fifo_opt::status, update_route_data(), and mi_node::value.
adds the host specified by the command line args, can be used only in file mode expect one mi node that contains the command
| cmd_tree | the MI command tree | |
| param | the parameter |
Definition at line 316 of file cr_fifo.c.
References CARRIERROUTE_MODE_FILE, fifo_opt::cmd, get_fifo_opts(), init_mi_tree(), mi_node::kids, MI_MISSING_PARM_LEN, MI_MISSING_PARM_S, MI_OK_LEN, MI_OK_S, mode, mi_node::next, mi_root::node, NULL, OPT_ADD, opt_settings, print_fifo_err(), _str::s, fifo_opt::status, update_route_data(), and mi_node::value.
deactivates the host given in the command line options, can be used only in file mode expect one mi node that contains the command
| cmd_tree | the MI command tree | |
| param | the parameter |
Definition at line 228 of file cr_fifo.c.
References CARRIERROUTE_MODE_FILE, fifo_opt::cmd, get_fifo_opts(), init_mi_tree(), mi_node::kids, MI_MISSING_PARM_LEN, MI_MISSING_PARM_S, MI_OK_LEN, MI_OK_S, mode, mi_node::next, mi_root::node, NULL, OPT_DEACTIVATE, opt_settings, print_fifo_err(), _str::s, fifo_opt::status, update_route_data(), and mi_node::value.
deletes the host specified by the command line args, can be used only in file mode expect one mi node that contains the command
| cmd_tree | the MI command tree | |
| param | the parameter |
Definition at line 356 of file cr_fifo.c.
References CARRIERROUTE_MODE_FILE, fifo_opt::cmd, get_fifo_opts(), init_mi_tree(), mi_node::kids, MI_MISSING_PARM_LEN, MI_MISSING_PARM_S, MI_OK_LEN, MI_OK_S, mode, mi_node::next, mi_root::node, NULL, OPT_REMOVE, opt_settings, print_fifo_err(), _str::s, update_route_data(), and mi_node::value.
prints the routing data
| cmd_tree | the MI command tree | |
| param | the parameter |
Definition at line 125 of file cr_fifo.c.
References addf_mi_node_child(), route_data_t::carrier_num, route_data_t::carriers, carrier_data_t::domain_num, carrier_data_t::domains, dump_tree_recursor(), free_mi_tree(), get_data(), domain_data_t::id, carrier_data_t::id, init_mi_tree(), _str::len, LM_DBG, LM_ERR, MI_OK_LEN, MI_OK_S, domain_data_t::name, carrier_data_t::name, mi_root::node, NULL, release_data(), _str::s, str_init, and domain_data_t::tree.
reloads the routing data
| cmd_tree | the MI command tree | |
| param | the parameter |
Definition at line 104 of file cr_fifo.c.
References init_mi_tree(), MI_OK_LEN, MI_OK_S, NULL, and reload_route_data().
replaces the host specified by parameters in the fifo command, can be used only in file mode expect one mi node that contains the command
| cmd_tree | the MI command tree | |
| param | the parameter |
Definition at line 184 of file cr_fifo.c.
References CARRIERROUTE_MODE_FILE, fifo_opt::cmd, get_fifo_opts(), init_mi_tree(), mi_node::kids, MI_MISSING_PARM_LEN, MI_MISSING_PARM_S, MI_OK_LEN, MI_OK_S, mode, mi_node::next, mi_root::node, NULL, OPT_REPLACE, opt_settings, print_fifo_err(), _str::s, fifo_opt::status, update_route_data(), and mi_node::value.
| int fifo_err |
1.5.6