#include <stdlib.h>#include "../../parser/msg_parser.h"#include "../../parser/parse_to.h"#include "../../parser/parse_via.h"#include "../../parser/parse_uri.h"#include "../../mem/mem.h"#include "../../dprint.h"#include "../../md5utils.h"#include "exec_hf.h"

Go to the source code of this file.
Functions | |
| static int | append_fixed_vars (struct sip_msg *msg, struct hf_wrapper **list) |
| static int | append_var (char *name, char *value, int len, struct hf_wrapper **list) |
| static int | build_hf_struct (struct sip_msg *msg, struct hf_wrapper **list) |
| static int | canonize_headername (str *orig, char **hname, int *hlen) |
| static int | compacthdr_type2str (hdr_types_t type, char **hname, int *hlen) |
| static int | create_vars (struct hf_wrapper *list, int offset) |
| static int | insert_hf (struct hf_wrapper **list, struct hdr_field *hf) |
| static int | print_av_var (struct hf_wrapper *w) |
| static int | print_hf_var (struct hf_wrapper *w, int offset) |
| static int | print_var (struct hf_wrapper *w, int offset) |
| static void | release_hf_struct (struct hf_wrapper *list) |
| static void | release_vars (struct hf_wrapper *list) |
| environment_t * | replace_env (struct hf_wrapper *list) |
| environment_t * | set_env (struct sip_msg *msg) |
| void | unset_env (environment_t *backup_env) |
Variables | |
| unsigned int | setvars = 1 |
| static int append_fixed_vars | ( | struct sip_msg * | msg, | |
| struct hf_wrapper ** | list | |||
| ) | [static] |
Definition at line 428 of file exec_hf.c.
References append_var(), char_msg_val(), EV_DID, EV_ORURI, EV_OUSER, EV_RURI, EV_SRCIP, EV_TID, EV_USER, sip_msg::first_line, get_to, ip_addr2a(), _str::len, LM_ERR, LM_WARN, MD5_LEN, sip_msg::new_uri, parse_uri(), sip_msg::rcv, msg_start::request, _str::s, receive_info::src_ip, sip_msg::to, msg_start::u, and sip_uri::user.
Referenced by set_env().
| static int append_var | ( | char * | name, | |
| char * | value, | |||
| int | len, | |||
| struct hf_wrapper ** | list | |||
| ) | [static] |
Definition at line 407 of file exec_hf.c.
References attrval::attr, hf_wrapper::av, _str::len, LM_ERR, hf_wrapper::next_other, pkg_malloc, _str::s, hf_wrapper::u, attrval::val, hf_wrapper::var_type, and W_AV.
Referenced by append_fixed_vars().
| static int build_hf_struct | ( | struct sip_msg * | msg, | |
| struct hf_wrapper ** | list | |||
| ) | [static] |
Definition at line 302 of file exec_hf.c.
References sip_msg::headers, insert_hf(), LM_ERR, hdr_field::next, and release_hf_struct().
Referenced by set_env().
| static int canonize_headername | ( | str * | orig, | |
| char ** | hname, | |||
| int * | hlen | |||
| ) | [static] |
Definition at line 165 of file exec_hf.c.
References ESCAPE, HFN_SYMBOL, HNV_UNRESERVED, _str::len, LM_ERR, pkg_malloc, _str::s, and UNRESERVED_MARK.
Referenced by print_hf_var().
| static int compacthdr_type2str | ( | hdr_types_t | type, | |
| char ** | hname, | |||
| int * | hlen | |||
| ) | [static] |
Definition at line 117 of file exec_hf.c.
References HDR_CALLID_T, HDR_CONTACT_T, HDR_CONTENTLENGTH_T, HDR_CONTENTTYPE_T, HDR_EVENT_T, HDR_FROM_T, HDR_SUPPORTED_T, HDR_TO_T, HDR_VIA_T, VAR_CALLID, VAR_CALLID_LEN, VAR_CLEN, VAR_CLEN_LEN, VAR_CONTACT, VAR_CONTACT_LEN, VAR_CTYPE, VAR_CTYPE_LEN, VAR_EVENT, VAR_EVENT_LEN, VAR_FROM, VAR_FROM_LEN, VAR_SUPPORTED, VAR_SUPPORTED_LEN, VAR_TO, VAR_TO_LEN, VAR_VIA, and VAR_VIA_LEN.
Referenced by print_hf_var().
| static int create_vars | ( | struct hf_wrapper * | list, | |
| int | offset | |||
| ) | [static] |
Definition at line 323 of file exec_hf.c.
References LM_ERR, hf_wrapper::next_other, and print_var().
Referenced by set_env().
| static int insert_hf | ( | struct hf_wrapper ** | list, | |
| struct hdr_field * | hf | |||
| ) | [static] |
Definition at line 58 of file exec_hf.c.
References HDR_OTHER_T, hf_wrapper::hf, HF_PREFIX, HF_PREFIX_LEN, _str::len, LM_ERR, hdr_field::name, hf_wrapper::next_other, hf_wrapper::next_same, pkg_malloc, hf_wrapper::prefix, hf_wrapper::prefix_len, _str::s, hdr_field::type, hf_wrapper::u, hf_wrapper::var_type, and W_HF.
Referenced by build_hf_struct().
| static int print_av_var | ( | struct hf_wrapper * | w | ) | [static] |
Definition at line 197 of file exec_hf.c.
References attrval::attr, hf_wrapper::av, hf_wrapper::envvar, EV_ASSIGN, _str::len, LM_ERR, pkg_malloc, _str::s, hf_wrapper::u, and attrval::val.
Referenced by print_var().
| static int print_hf_var | ( | struct hf_wrapper * | w, | |
| int | offset | |||
| ) | [static] |
Definition at line 220 of file exec_hf.c.
References hdr_field::body, canonize_headername(), compacthdr_type2str(), hf_wrapper::envvar, EV_ASSIGN, hf_wrapper::hf, HF_SEPARATOR, _str::len, LM_DBG, LM_ERR, hdr_field::name, hf_wrapper::next_same, pkg_free, pkg_malloc, hf_wrapper::prefix, hf_wrapper::prefix_len, _str::s, hdr_field::type, and hf_wrapper::u.
Referenced by print_var().
| static int print_var | ( | struct hf_wrapper * | w, | |
| int | offset | |||
| ) | [static] |
Definition at line 277 of file exec_hf.c.
References LM_CRIT, print_av_var(), print_hf_var(), hf_wrapper::var_type, W_AV, and W_HF.
Referenced by create_vars().
| static void release_hf_struct | ( | struct hf_wrapper * | list | ) | [static] |
Definition at line 95 of file exec_hf.c.
References hf_wrapper::next_other, hf_wrapper::next_same, and pkg_free.
Referenced by build_hf_struct(), and set_env().
| static void release_vars | ( | struct hf_wrapper * | list | ) | [static] |
Definition at line 290 of file exec_hf.c.
References hf_wrapper::envvar, hf_wrapper::next_other, and pkg_free.
Referenced by set_env().
| environment_t* replace_env | ( | struct hf_wrapper * | list | ) |
Definition at line 341 of file exec_hf.c.
References env::env, environ, hf_wrapper::envvar, LM_ERR, hf_wrapper::next_other, env::old_cnt, and pkg_malloc.
Referenced by set_env().
| environment_t* set_env | ( | struct sip_msg * | msg | ) |
Definition at line 505 of file exec_hf.c.
References append_fixed_vars(), build_hf_struct(), create_vars(), HDR_EOH_F, LM_ERR, parse_headers(), release_hf_struct(), release_vars(), and replace_env().
Referenced by w_exec_avp(), w_exec_dset(), and w_exec_msg().
| void unset_env | ( | environment_t * | backup_env | ) |
Definition at line 385 of file exec_hf.c.
References env::env, environ, env::old_cnt, and pkg_free.
Referenced by w_exec_avp(), w_exec_dset(), and w_exec_msg().
| unsigned int setvars = 1 |
Definition at line 55 of file exec_hf.c.
Referenced by w_exec_avp(), w_exec_dset(), and w_exec_msg().
1.5.6