#include "../../str.h"#include "../../parser/msg_parser.h"


Go to the source code of this file.
Data Structures | |
| struct | cpl_interpreter |
| struct | cpl_interpreter::proxy_st |
Defines | |
| #define | CPL_ACCEPTLANG_DUPLICATED (1<<16) |
| #define | CPL_FORCE_STATEFUL (1<<3) |
| #define | CPL_FROM_DUPLICATED (1<<12) |
| #define | CPL_IS_STATEFUL (1<<2) |
| #define | CPL_LOC_SET_MODIFIED (1<<5) |
| #define | CPL_ORGANIZATION_DUPLICATED (1<<14) |
| #define | CPL_PRIORITY_DUPLICATED (1<<17) |
| #define | CPL_PROXY_DONE (1<<6) |
| #define | CPL_RUN_INCOMING (1<<1) |
| #define | CPL_RUN_OUTGOING (1<<0) |
| #define | CPL_RURI_DUPLICATED (1<<10) |
| #define | CPL_SUBJECT_DUPLICATED (1<<13) |
| #define | CPL_TO_DUPLICATED (1<<11) |
| #define | CPL_USERAGENT_DUPLICATED (1<<15) |
| #define | SCRIPT_DEFAULT 1 |
| #define | SCRIPT_END 0 |
| #define | SCRIPT_FORMAT_ERROR -2 |
| #define | SCRIPT_RUN_ERROR -1 |
| #define | SCRIPT_TO_BE_CONTINUED 2 |
| #define | STR_NOT_FOUND ((str*)0xffffffff) |
Functions | |
| int | cpl_run_script (struct cpl_interpreter *cpl_intr) |
| void | free_cpl_interpreter (struct cpl_interpreter *intr) |
| struct cpl_interpreter * | new_cpl_interpreter (struct sip_msg *msg, str *script) |
| #define CPL_ACCEPTLANG_DUPLICATED (1<<16) |
| #define CPL_FORCE_STATEFUL (1<<3) |
Definition at line 38 of file cpl_run.h.
Referenced by fixup_cpl_run_script(), run_redirect(), and run_reject().
| #define CPL_FROM_DUPLICATED (1<<12) |
| #define CPL_IS_STATEFUL (1<<2) |
Definition at line 37 of file cpl_run.h.
Referenced by fixup_cpl_run_script(), run_proxy(), run_redirect(), and run_reject().
| #define CPL_LOC_SET_MODIFIED (1<<5) |
Definition at line 39 of file cpl_run.h.
Referenced by run_default(), run_location(), run_lookup(), and run_remove_location().
| #define CPL_ORGANIZATION_DUPLICATED (1<<14) |
| #define CPL_PRIORITY_DUPLICATED (1<<17) |
| #define CPL_PROXY_DONE (1<<6) |
Definition at line 40 of file cpl_run.h.
Referenced by cpl_proxy_to_loc_set(), reply_callback(), run_default(), and run_proxy().
| #define CPL_RUN_INCOMING (1<<1) |
Definition at line 36 of file cpl_run.h.
Referenced by cpl_invoke_script(), fixup_cpl_run_script(), and run_cpl_node().
| #define CPL_RUN_OUTGOING (1<<0) |
Definition at line 35 of file cpl_run.h.
Referenced by cpl_invoke_script(), and fixup_cpl_run_script().
| #define CPL_RURI_DUPLICATED (1<<10) |
| #define CPL_SUBJECT_DUPLICATED (1<<13) |
| #define CPL_TO_DUPLICATED (1<<11) |
| #define CPL_USERAGENT_DUPLICATED (1<<15) |
| #define SCRIPT_DEFAULT 1 |
| #define SCRIPT_END 0 |
Definition at line 29 of file cpl_run.h.
Referenced by cpl_invoke_script(), cpl_run_script(), reply_callback(), and run_default().
| #define SCRIPT_FORMAT_ERROR -2 |
Definition at line 33 of file cpl_run.h.
Referenced by cpl_invoke_script(), cpl_run_script(), and reply_callback().
| #define SCRIPT_RUN_ERROR -1 |
Definition at line 32 of file cpl_run.h.
Referenced by cpl_invoke_script(), cpl_run_script(), reply_callback(), and run_default().
| #define SCRIPT_TO_BE_CONTINUED 2 |
Definition at line 31 of file cpl_run.h.
Referenced by cpl_invoke_script(), cpl_run_script(), and reply_callback().
| #define STR_NOT_FOUND ((str*)0xffffffff) |
Definition at line 50 of file cpl_run.h.
Referenced by run_language_switch(), run_proxy(), and run_string_switch().
| int cpl_run_script | ( | struct cpl_interpreter * | cpl_intr | ) |
Definition at line 966 of file cpl_run.c.
References ADDRESS_SWITCH_NODE, check_overflow_by_offset, CPL_NODE, CPL_RUNTIME_ERROR, CPL_SCRIPT_ERROR, CPL_TO_CONTINUE, DEFAULT_ACTION, EO_SCRIPT, cpl_interpreter::ip, LANGUAGE_SWITCH_NODE, LM_DBG, LM_ERR, LOCATION_NODE, LOG_NODE, LOOKUP_NODE, MAIL_NODE, NODE_TYPE, PRIORITY_SWITCH_NODE, PROXY_NODE, REDIRECT_NODE, REJECT_NODE, REMOVE_LOCATION_NODE, run_address_switch(), run_cpl_node(), run_default(), run_language_switch(), run_location(), run_log(), run_lookup(), run_mail(), run_priority_switch(), run_proxy(), run_redirect(), run_reject(), run_remove_location(), run_string_switch(), run_sub(), run_time_switch(), SCRIPT_END, SCRIPT_FORMAT_ERROR, SCRIPT_RUN_ERROR, SCRIPT_TO_BE_CONTINUED, SIMPLE_NODE_SIZE, STRING_SWITCH_NODE, SUB_NODE, and TIME_SWITCH_NODE.
Referenced by cpl_invoke_script(), and reply_callback().
| void free_cpl_interpreter | ( | struct cpl_interpreter * | intr | ) |
Definition at line 145 of file cpl_run.c.
References cpl_interpreter::accept_language, CPL_ACCEPTLANG_DUPLICATED, CPL_FROM_DUPLICATED, CPL_ORGANIZATION_DUPLICATED, CPL_PRIORITY_DUPLICATED, CPL_RURI_DUPLICATED, CPL_SUBJECT_DUPLICATED, CPL_TO_DUPLICATED, CPL_USERAGENT_DUPLICATED, empty_location_set(), cpl_interpreter::flags, cpl_interpreter::from, cpl_interpreter::loc_set, cpl_interpreter::organization, cpl_interpreter::priority, cpl_interpreter::ruri, _str::s, cpl_interpreter::script, shm_free, cpl_interpreter::subject, cpl_interpreter::to, cpl_interpreter::user, and cpl_interpreter::user_agent.
Referenced by cpl_invoke_script(), and reply_callback().
| struct cpl_interpreter* new_cpl_interpreter | ( | struct sip_msg * | msg, | |
| str * | script | |||
| ) | [read] |
Definition at line 114 of file cpl_run.c.
References CPL_NODE, cpl_interpreter::ip, _str::len, LM_ERR, cpl_interpreter::msg, NODE_TYPE, cpl_interpreter::recv_time, _str::s, cpl_interpreter::script, and shm_malloc().
Referenced by cpl_invoke_script().
1.5.6