#include <sys/types.h>
#include <regex.h>
#include <netdb.h>
#include "pvar.h"
#include "config.h"
#include "error.h"
#include "route_struct.h"
#include "parser/msg_parser.h"


Go to the source code of this file.
Defines | |
| #define | BRANCH_ROUTE 8 |
| #define | ERROR_ROUTE 16 |
| #define | FAILURE_ROUTE 2 |
| #define | is_route_type(_type) (route_type==_type) |
| #define | LOCAL_ROUTE 32 |
| #define | ONREPLY_ROUTE 4 |
| #define | REQUEST_ROUTE 1 |
| #define | set_route_type(_new_type) |
| #define | swap_route_type(_backup, _new_type) |
Functions | |
| int | add_actions (struct action *a, struct action **head) |
| Add actions to the list. | |
| int | check_rls (void) |
| Check all routing tables for compatiblity between route types and called module functions. | |
| int | eval_expr (struct expr *e, struct sip_msg *msg, pv_value_t *val) |
| Evaluate expression. | |
| int | fix_rls (void) |
| Fixes all action tables. | |
| void | init_route_lists (void) |
| Initialize routing lists. | |
| void | print_rl (void) |
| Debug function, prints main routing table. | |
| void | push (struct action *a, struct action **head) |
| Adds an action list to head. | |
Variables | |
| struct action * | branch_rlist [BRANCH_RT_NO] |
| struct action * | error_rlist |
| struct action * | failure_rlist [FAILURE_RT_NO] |
| struct action * | onreply_rlist [ONREPLY_RT_NO] |
| struct action * | rlist [RT_NO] |
| int | route_type |
Definition in file route.h.
| #define BRANCH_ROUTE 8 |
Sending-branch route block
Definition at line 56 of file route.h.
Referenced by check_rls(), is_uri_host_local(), pre_print_uac_request(), and t_on_branch().
| #define ERROR_ROUTE 16 |
Error-handling route block
Definition at line 57 of file route.h.
Referenced by check_rls(), and run_action_list().
| #define FAILURE_ROUTE 2 |
Negative-reply route block
Definition at line 54 of file route.h.
Referenced by check_rls(), dp_update(), ds_update_dst(), faked_env(), is_uri_host_local(), pv_get_tm_reply_code(), t_check_status(), t_local_replied(), t_next_contacts(), w_t_relay(), and w_t_reply().
| #define is_route_type | ( | _type | ) | (route_type==_type) |
| #define LOCAL_ROUTE 32 |
Local-requests route block
Definition at line 58 of file route.h.
Referenced by check_rls(), is_uri_host_local(), pv_get_spec_value(), pv_set_spec_value(), run_action_list(), and t_uac().
| #define ONREPLY_ROUTE 4 |
Received-reply route block
Definition at line 55 of file route.h.
Referenced by check_rls(), pv_get_tm_reply_code(), receive_msg(), run_action_list(), and t_check_status().
| #define REQUEST_ROUTE 1 |
Request route block
Definition at line 53 of file route.h.
Referenced by check_rls(), dlg_ontimeout(), dp_apply_policy(), dp_can_connect(), get_current_dialog(), get_redirect_fixup(), is_uri_host_local(), next_gw(), pv_get_tm_reply_code(), receive_msg(), save(), set_dlg_profile(), t_check_status(), unset_dlg_profile(), w_t_relay(), and w_t_reply().
| #define set_route_type | ( | _new_type | ) |
Value:
do{\ route_type=_new_type;\ }while(0)
Definition at line 62 of file route.h.
Referenced by dlg_ontimeout(), faked_env(), pre_print_uac_request(), receive_msg(), run_action_list(), and t_uac().
| #define swap_route_type | ( | _backup, | |||
| _new_type | ) |
Value:
do{\ _backup=route_type;\ route_type=_new_type;\ }while(0)
Definition at line 67 of file route.h.
Referenced by faked_env(), pre_print_uac_request(), and t_uac().
| int check_rls | ( | void | ) |
Check all routing tables for compatiblity between route types and called module functions.
Definition at line 1681 of file route.c.
References BRANCH_ROUTE, BRANCH_RT_NO, check_actions(), ERROR_ROUTE, FAILURE_ROUTE, FAILURE_RT_NO, LM_ERR, LOCAL_ROUTE, ONREPLY_ROUTE, ONREPLY_RT_NO, rcheck_status, and REQUEST_ROUTE.
Referenced by main().
| int eval_expr | ( | struct expr * | e, | |
| struct sip_msg * | msg, | |||
| pv_value_t * | val | |||
| ) |
Evaluate expression.
| e | expression | |
| msg | SIP message | |
| val | pseudo-variable |
Definition at line 1459 of file route.c.
References AND_OP, ELEM_T, eval_elem(), eval_expr(), EVAL_OP, EXP_T, operand::operand_val::expr, expr::left, LM_CRIT, MAX_REC_LEV, NOT_OP, expr::op, OR_OP, rec_lev, expr::right, expr::type, and operand::v.
Referenced by do_action(), do_assign(), eval_elem(), and eval_expr().
| int fix_rls | ( | void | ) |
Fixes all action tables.
Definition at line 1552 of file route.c.
References BRANCH_RT_NO, FAILURE_RT_NO, fix_actions(), ONREPLY_RT_NO, and RT_NO.
Referenced by main().
| void init_route_lists | ( | void | ) |
| void print_rl | ( | void | ) |
Debug function, prints main routing table.
Definition at line 1738 of file route.c.
References BRANCH_RT_NO, FAILURE_RT_NO, LM_DBG, ONREPLY_RT_NO, print_actions(), and RT_NO.
Referenced by main().
| struct action* branch_rlist[BRANCH_RT_NO] |
| struct action* error_rlist |
| struct action* failure_rlist[FAILURE_RT_NO] |
| struct action* onreply_rlist[ONREPLY_RT_NO] |
main reply route table
Definition at line 80 of file route.c.
Referenced by receive_msg(), and reply_received().
main "script table"
Definition at line 78 of file route.c.
Referenced by cpl_proxy_to_loc_set(), dlg_ontimeout(), do_action(), and receive_msg().
| int route_type |
default route type
Definition at line 88 of file route.c.
Referenced by dp_apply_policy(), dp_can_connect(), dp_update(), ds_update_dst(), get_current_dialog(), is_uri_host_local(), next_gw(), pv_get_spec_value(), pv_get_tm_reply_code(), pv_set_spec_value(), run_action_list(), save(), set_dlg_profile(), t_check_status(), t_local_replied(), t_next_contacts(), t_on_branch(), unset_dlg_profile(), w_t_relay(), and w_t_reply().
1.5.6