#include "route_struct.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "sr_module.h"
#include "dprint.h"
#include "ip_addr.h"
#include "mem/mem.h"
#include "ut.h"

Go to the source code of this file.
Functions | |
| struct action * | append_action (struct action *a, struct action *b) |
| struct action * | mk_action (int type, int n, action_elem_t *elem, int line) |
| struct expr * | mk_elem (int op, int leftt, void *leftd, int rightt, void *rightd) |
| struct expr * | mk_exp (int op, struct expr *left, struct expr *right) |
| void | print_action (struct action *t) |
| void | print_actions (struct action *a) |
| void | print_expr (struct expr *exp) |
Definition in file route_struct.c.
| struct action* mk_action | ( | int | type, | |
| int | n, | |||
| action_elem_t * | elem, | |||
| int | line | |||
| ) | [read] |
Definition at line 95 of file route_struct.c.
References action_elem_::data, action::elem, _str::len, action::line, LM_CRIT, LM_ERR, MAX_ACTION_ELEMS, action::next, NULL, pkg_malloc, _str::s, action_elem_::s, STRING_ST, action_elem_::type, action::type, and action_elem_::u.
| struct expr* mk_elem | ( | int | op, | |
| int | leftt, | |||
| void * | leftd, | |||
| int | rightt, | |||
| void * | rightd | |||
| ) | [read] |
Definition at line 69 of file route_struct.c.
References operand::operand_val::data, ELEM_T, expr::left, _str::len, LM_CRIT, NULL, expr::op, pkg_malloc, expr::right, _str::s, operand::operand_val::s, STRING_ST, STRINGV_O, operand::type, expr::type, and operand::v.
Definition at line 53 of file route_struct.c.
References EXP_T, operand::operand_val::expr, expr::left, LM_CRIT, expr::op, pkg_malloc, expr::right, expr::type, and operand::v.
| void print_action | ( | struct action * | t | ) |
Definition at line 405 of file route_struct.c.
References ACTIONS_ST, APPEND_BRANCH_T, CASE_T, CMD_ST, action_elem_::data, DEFAULT_T, DROP_T, action::elem, EQ_T, ERROR_T, EXEC_T, EXIT_T, EXPR_ST, FORCE_RPORT_T, FORCE_SEND_SOCKET_T, FORCE_TCP_ALIAS_T, FORWARD_T, IF_T, IP_ST, ISBFLAGSET_T, ISFLAGSET_T, ISSFLAGSET_T, action_elem_::item, LEN_GT_T, LM_DBG, LOG_T, MODULE_T, NOSUBTYPE, action_elem_::number, NUMBER_ST, PREFIX_T, print_actions(), print_expr(), print_ip(), RESETBFLAG_T, RESETFLAG_T, RESETSFLAG_T, RETURN_T, REVERT_URI_T, ROUTE_T, SBREAK_T, SCRIPTVAR_ST, SEND_T, SET_ADV_ADDR_T, SET_ADV_PORT_T, SET_DEBUG_T, SET_HOST_T, SET_HOSTPORT_T, SET_PORT_T, SET_URI_T, SET_USER_T, SET_USERPASS_T, SETBFLAG_T, SETFLAG_T, SETSFLAG_T, SOCKID_ST, action_elem_::string, STRING_ST, STRIP_T, SWITCH_T, _pv_spec::type, action_elem_::type, action::type, action_elem_::u, WHILE_T, and ZSW.
Referenced by print_actions().
| void print_actions | ( | struct action * | a | ) |
Definition at line 629 of file route_struct.c.
References action::next, and print_action().
Referenced by print_action(), print_expr(), and print_rl().
| void print_expr | ( | struct expr * | exp | ) |
Definition at line 143 of file route_struct.c.
References ACTION_O, ACTIONS_ST, AND_OP, BAND_OP, BLSHIFT_OP, BNOT_OP, BOR_OP, BRSHIFT_OP, BXOR_OP, operand::operand_val::data, DIFF_OP, DIV_OP, DSTIP_O, DSTPORT_O, ELEM_T, EQUAL_OP, EVAL_OP, EXP_T, operand::operand_val::expr, EXPR_O, EXPR_ST, FROM_URI_O, GT_OP, GTE_OP, IP_ST, expr::left, LM_CRIT, LM_DBG, LM_ERR, LT_OP, LTE_OP, MATCH_OP, MATCHD_OP, METHOD_O, MINUS_OP, MODULO_OP, MULT_OP, MYSELF_ST, operand::operand_val::n, NET_ST, NO_OP, NOSUBTYPE, NOT_OP, NOTMATCH_OP, NOTMATCHD_OP, NULLV_ST, NUMBER_O, NUMBER_ST, NUMBERV_O, expr::op, OR_OP, PLUS_OP, print_actions(), print_expr(), print_ip(), print_net(), expr::right, SCRIPTVAR_O, SCRIPTVAR_ST, operand::operand_val::spec, SRCIP_O, SRCPORT_O, STRING_ST, STRINGV_O, TO_URI_O, _pv_spec::type, operand::type, expr::type, URI_O, operand::v, VALUE_OP, and ZSW.
Referenced by print_action(), and print_expr().
1.5.6