route_struct.h File Reference

SIP routing engine - structure management. More...

#include "pvar.h"

Include dependency graph for route_struct.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  action
struct  action_elem_
struct  expr
struct  operand
union  operand::operand_val

Defines

#define EXPR_DROP   -127
#define MAX_ACTION_ELEMS   7
 increase MAX_ACTION_ELEMS to support more module function parameters if you change this define, you need also to change the assignment in the action.c file

Typedefs

typedef struct action_elem_action_elem_p
typedef struct action_elem_ action_elem_t
typedef struct operandoperand_p
typedef struct operand operand_t

Enumerations

enum  {
  EQUAL_OP = 20, MATCH_OP, NOTMATCH_OP, MATCHD_OP,
  NOTMATCHD_OP, GT_OP, LT_OP, GTE_OP,
  LTE_OP, DIFF_OP, VALUE_OP, NO_OP
}
enum  {
  METHOD_O = 1, URI_O, FROM_URI_O, TO_URI_O,
  SRCIP_O, SRCPORT_O, DSTIP_O, DSTPORT_O,
  PROTO_O, AF_O, MSGLEN_O, DEFAULT_O,
  ACTION_O, EXPR_O, NUMBER_O, NUMBERV_O,
  STRINGV_O, RETCODE_O, SCRIPTVAR_O
}
enum  {
  FORWARD_T = 1, SEND_T, DROP_T, LOG_T,
  ERROR_T, ROUTE_T, EXEC_T, SET_HOST_T,
  SET_HOSTPORT_T, SET_USER_T, SET_USERPASS_T, SET_PORT_T,
  SET_HOSTALL_T, SET_URI_T, IF_T, MODULE_T,
  SET_DEBUG_T, SETFLAG_T, RESETFLAG_T, ISFLAGSET_T,
  SETSFLAG_T, RESETSFLAG_T, ISSFLAGSET_T, SETBFLAG_T,
  RESETBFLAG_T, ISBFLAGSET_T, LEN_GT_T, PREFIX_T,
  STRIP_T, STRIP_TAIL_T, APPEND_BRANCH_T, REVERT_URI_T,
  FORCE_RPORT_T, FORCE_LOCAL_RPORT_T, SET_ADV_ADDR_T, SET_ADV_PORT_T,
  FORCE_TCP_ALIAS_T, FORCE_SEND_SOCKET_T, SERIALIZE_BRANCHES_T, NEXT_BRANCHES_T,
  RETURN_T, EXIT_T, SWITCH_T, CASE_T,
  DEFAULT_T, SBREAK_T, WHILE_T, SET_DSTURI_T,
  RESET_DSTURI_T, ISDSTURISET_T, EQ_T, COLONEQ_T,
  PLUSEQ_T, MINUSEQ_T, DIVEQ_T, MULTEQ_T,
  MODULOEQ_T, BANDEQ_T, BOREQ_T, BXOREQ_T,
  USE_BLACKLIST_T, UNUSE_BLACKLIST_T, SET_TIME_STAMP_T, RESET_TIME_STAMP_T,
  DIFF_TIME_STAMP_T, PV_PRINTF_T
}
enum  {
  NOSUBTYPE = 0, STRING_ST, NET_ST, NUMBER_ST,
  IP_ST, RE_ST, PROXY_ST, EXPR_ST,
  ACTIONS_ST, CMD_ST, MODFIXUP_ST, MYSELF_ST,
  STR_ST, SOCKID_ST, SOCKETINFO_ST, SCRIPTVAR_ST,
  NULLV_ST, BLACKLIST_ST, SCRIPTVAR_ELEM_ST
}
enum  { EXP_T = 1, ELEM_T }
enum  {
  AND_OP = 1, OR_OP, NOT_OP, EVAL_OP,
  PLUS_OP, MINUS_OP, DIV_OP, MULT_OP,
  MODULO_OP, BAND_OP, BOR_OP, BXOR_OP,
  BNOT_OP, BLSHIFT_OP, BRSHIFT_OP
}

Functions

struct actionappend_action (struct action *a, struct action *b)
struct actionmk_action (int type, int n, action_elem_t *elem, int line)
struct exprmk_elem (int op, int leftt, void *leftd, int rightt, void *rightd)
struct exprmk_exp (int op, struct expr *left, struct expr *right)
void print_action (struct action *a)
void print_actions (struct action *a)
void print_expr (struct expr *exp)


Detailed Description

SIP routing engine - structure management.

Definition in file route_struct.h.


Define Documentation

#define EXPR_DROP   -127

Definition at line 42 of file route_struct.h.

Referenced by do_action(), and eval_elem().

#define MAX_ACTION_ELEMS   7

increase MAX_ACTION_ELEMS to support more module function parameters if you change this define, you need also to change the assignment in the action.c file

Definition at line 133 of file route_struct.h.

Referenced by mk_action().


Typedef Documentation

typedef struct action_elem_ * action_elem_p

typedef struct action_elem_ action_elem_t

typedef struct operand * operand_p

typedef struct operand operand_t


Enumeration Type Documentation

anonymous enum

Enumerator:
EQUAL_OP 
MATCH_OP 
NOTMATCH_OP 
MATCHD_OP 
NOTMATCHD_OP 
GT_OP 
LT_OP 
GTE_OP 
LTE_OP 
DIFF_OP 
VALUE_OP 
NO_OP 

Definition at line 58 of file route_struct.h.

anonymous enum

Enumerator:
METHOD_O 
URI_O 
FROM_URI_O 
TO_URI_O 
SRCIP_O 
SRCPORT_O 
DSTIP_O 
DSTPORT_O 
PROTO_O 
AF_O 
MSGLEN_O 
DEFAULT_O 
ACTION_O 
EXPR_O 
NUMBER_O 
NUMBERV_O 
STRINGV_O 
RETCODE_O 
SCRIPTVAR_O 

Definition at line 60 of file route_struct.h.

anonymous enum

Enumerator:
FORWARD_T 
SEND_T 
DROP_T 
LOG_T 
ERROR_T 
ROUTE_T 
EXEC_T 
SET_HOST_T 
SET_HOSTPORT_T 
SET_USER_T 
SET_USERPASS_T 
SET_PORT_T 
SET_HOSTALL_T 
SET_URI_T 
IF_T 
MODULE_T 
SET_DEBUG_T 
SETFLAG_T 
RESETFLAG_T 
ISFLAGSET_T 
SETSFLAG_T 
RESETSFLAG_T 
ISSFLAGSET_T 
SETBFLAG_T 
RESETBFLAG_T 
ISBFLAGSET_T 
LEN_GT_T 
PREFIX_T 
STRIP_T 
STRIP_TAIL_T 
APPEND_BRANCH_T 
REVERT_URI_T 
FORCE_RPORT_T 
FORCE_LOCAL_RPORT_T 
SET_ADV_ADDR_T 
SET_ADV_PORT_T 
FORCE_TCP_ALIAS_T 
FORCE_SEND_SOCKET_T 
SERIALIZE_BRANCHES_T 
NEXT_BRANCHES_T 
RETURN_T 
EXIT_T 
SWITCH_T 
CASE_T 
DEFAULT_T 
SBREAK_T 
WHILE_T 
SET_DSTURI_T 
RESET_DSTURI_T 
ISDSTURISET_T 
EQ_T 
COLONEQ_T 
PLUSEQ_T 
MINUSEQ_T 
DIVEQ_T 
MULTEQ_T 
MODULOEQ_T 
BANDEQ_T 
BOREQ_T 
BXOREQ_T 
USE_BLACKLIST_T 
UNUSE_BLACKLIST_T 
SET_TIME_STAMP_T 
RESET_TIME_STAMP_T 
DIFF_TIME_STAMP_T 
PV_PRINTF_T 

Definition at line 64 of file route_struct.h.

anonymous enum

Enumerator:
NOSUBTYPE 
STRING_ST 
NET_ST 
NUMBER_ST 
IP_ST 
RE_ST 
PROXY_ST 
EXPR_ST 
ACTIONS_ST 
CMD_ST 
MODFIXUP_ST 
MYSELF_ST 
STR_ST 
SOCKID_ST 
SOCKETINFO_ST 
SCRIPTVAR_ST 
NULLV_ST 
BLACKLIST_ST 
SCRIPTVAR_ELEM_ST 

Definition at line 91 of file route_struct.h.

anonymous enum

Todo:
Add documentation for all ENUMs in this file.
Enumerator:
EXP_T 
ELEM_T 

Definition at line 55 of file route_struct.h.

anonymous enum

Enumerator:
AND_OP 
OR_OP 
NOT_OP 
EVAL_OP 
PLUS_OP 
MINUS_OP 
DIV_OP 
MULT_OP 
MODULO_OP 
BAND_OP 
BOR_OP 
BXOR_OP 
BNOT_OP 
BLSHIFT_OP 
BRSHIFT_OP 

Definition at line 56 of file route_struct.h.


Function Documentation

struct action* append_action ( struct action a,
struct action b 
) [read]

Definition at line 130 of file route_struct.c.

References action::next.

struct action* mk_action ( int  type,
int  n,
action_elem_t elem,
int  line 
) [read]

struct expr* mk_elem ( int  op,
int  leftt,
void *  leftd,
int  rightt,
void *  rightd 
) [read]

struct expr* mk_exp ( int  op,
struct expr left,
struct expr right 
) [read]

void print_action ( struct action a  ) 

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  ) 


Generated on Thu May 24 12:00:42 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6