#include "parser/msg_parser.h"#include "ip_addr.h"Go to the source code of this file.
Data Structures | |
| struct | bookmark |
| struct | hostport |
Defines | |
| #define | MY_HF_SEP ": " |
| #define | MY_HF_SEP_LEN 2 |
| #define | BRANCH_SEPARATOR '.' |
| #define | WARNING "Warning: 392 " |
| #define | WARNING_LEN (sizeof(WARNING)-1) |
| #define | WARNING_PHRASE " \"Noisy feedback tells: " |
| #define | WARNING_PHRASE_LEN (sizeof(WARNING_PHRASE)-1) |
| #define | set_hostport(hp, msg) |
Functions | |
| char * | build_req_buf_from_sip_req (struct sip_msg *msg, unsigned int *returned_len, struct dest_info *send_info) |
| builds a request in memory from another sip request. | |
| char * | build_res_buf_from_sip_res (struct sip_msg *msg, unsigned int *returned_len) |
| char * | build_res_buf_from_sip_req (unsigned int code, char *text, str *new_tag, struct sip_msg *msg, unsigned int *returned_len, struct bookmark *bmark) |
| char * | via_builder (unsigned int *len, struct dest_info *send_info, str *branch, str *extra_params, struct hostport *hp) |
| char * | create_via_hf (unsigned int *len, struct sip_msg *msg, struct dest_info *send_info, str *branch) |
| int | branch_builder (unsigned int hash_index, unsigned int label, char *char_v, int branch, char *branch_str, int *len) |
| char * | id_builder (struct sip_msg *msg, unsigned int *id_len) |
| int | received_test (struct sip_msg *msg) |
| char * | build_only_headers (struct sip_msg *msg, int skip_first_line, unsigned int *returned_len, int *error, struct dest_info *send_info) |
| char * | build_body (struct sip_msg *msg, unsigned int *returned_len, int *error, struct dest_info *send_info) |
| char * | build_all (struct sip_msg *msg, int adjust_clen, unsigned int *returned_len, int *error, struct dest_info *send_info) |
| void | fix_global_req_flags (str *gname, str *name) |
| cfg framework fixup | |
|
|
Definition at line 43 of file msg_translator.h. Referenced by t_reply_matching(). |
|
|
Definition at line 40 of file msg_translator.h. |
|
|
Definition at line 41 of file msg_translator.h. |
|
|
Value: do{ \ if ((msg) && ((struct sip_msg*)(msg))->set_global_address.len) \ (hp)->host=&(((struct sip_msg*)(msg))->set_global_address); \ else \ (hp)->host=&default_global_address; \ if ((msg) && ((struct sip_msg*)(msg))->set_global_port.len) \ (hp)->port=&(((struct sip_msg*)(msg))->set_global_port); \ else \ (hp)->port=&default_global_port; \ }while(0) Definition at line 66 of file msg_translator.h. Referenced by assemble_via(), build_dlg_ack(), build_local(), and create_via_hf(). |
|
|
Definition at line 44 of file msg_translator.h. Referenced by warning_builder(). |
|
|
Definition at line 45 of file msg_translator.h. Referenced by warning_builder(). |
|
|
Definition at line 46 of file msg_translator.h. Referenced by warning_builder(). |
|
|
Definition at line 47 of file msg_translator.h. Referenced by warning_builder(). |
|
||||||||||||||||||||||||||||
|
Definition at line 2126 of file msg_translator.c. References int2reverse_hex(), len, MAX_BRANCH_PARAM_LEN, MCOOKIE, MCOOKIE_LEN, MD5_LEN, and size. Referenced by forward_request(), and t_calc_branch(). |
|
||||||||||||||||||||||||
|
Definition at line 2479 of file msg_translator.c. References sip_msg::add_rm, adjust_clen(), sip_msg::body_lumps, sip_msg::buf, buf, L_ERR, sip_msg::len, len, LOG, lumps_len(), pkg_malloc, process_lumps(), and dest_info::proto. |
|
||||||||||||||||||||
|
Definition at line 2428 of file msg_translator.c. References sip_msg::body_lumps, sip_msg::buf, buf, get_body(), L_ERR, sip_msg::len, len, LOG, lumps_len(), pkg_malloc, and process_lumps(). Referenced by out_msgbody_proc(). |
|
||||||||||||||||||||||||
|
Definition at line 2376 of file msg_translator.c. References sip_msg::add_rm, sip_msg::buf, buf, sip_msg::headers, L_ERR, len, LOG, lumps_len(), hdr_field::name, pkg_malloc, process_lumps(), _str::s, and sip_msg::unparsed. Referenced by out_contacthdr_proc(). |
|
||||||||||||||||
|
builds a request in memory from another sip request. Side-effects: - it adds lumps to the msg which are _not_ cleaned. All the added lumps are HDR_VIA_T.
Uses also global_req_flags ( OR'ed with msg->msg_flags, see send_info below).
Definition at line 1512 of file msg_translator.c. References sip_msg::add_rm, sip_msg::add_to_branch_len, sip_msg::add_to_branch_s, adjust_clen(), anchor_lump(), sip_msg::body_lumps, sip_msg::buf, buf, cfg_get, core_cfg, create_via_hf(), del_lump(), sip_msg::first_line, FL_MTU_FB_MASK, flags, get_send_socket(), via_body::hdr, HDR_VIA_T, via_body::host, insert_new_lump_after(), insert_new_lump_before(), L_ERR, _str::len, sip_msg::len, len, LOG, lumps_len(), sip_msg::msg_flags, sip_msg::new_uri, via_body::params, pkg_free, pkg_malloc, via_body::port, via_body::port_str, process_lumps(), dest_info::proto, PROTO_SCTP, PROTO_TCP, PROTO_TLS, PROTO_UDP, via_body::received, received_builder(), received_test(), msg_start::request, via_body::rport, rport_builder(), _str::s, dest_info::send_sock, ser_error, via_param::size, size, via_param::start, str, dest_info::to, msg_start::u, unlikely, msg_start::uri, sip_msg::via1, and via_len. Referenced by forward_request(), and print_uac_request(). |
|
||||||||||||||||||||||||||||
|
||||||||||||
|
Definition at line 1753 of file msg_translator.c. References sip_msg::add_rm, adjust_clen(), hdr_field::body, sip_msg::body_lumps, via_body::bsize, sip_msg::buf, buf, DBG, del_lump(), sip_msg::h_via1, HDR_VIA_T, L_ERR, hdr_field::len, sip_msg::len, len, LOG, lumps_len(), hdr_field::name, via_body::next, pkg_malloc, process_lumps(), via_body::proto, PROTO_UDP, _str::s, sip_msg::via1, sip_msg::via2, and via_len. Referenced by forward_reply(), and relay_reply(). |
|
||||||||||||||||||||
|
Definition at line 2312 of file msg_translator.c. References DBG, id_builder(), L_ERR, len, _str::len, LOG, pkg_free, receive_info::proto, sip_msg::rcv, _str::s, set_hostport, str, and via_builder(). Referenced by build_req_buf_from_sip_req(). |
|
||||||||||||
|
cfg framework fixup It should be called from the configuration framework. Definition at line 165 of file msg_translator.c. References cfg_get, core_cfg, global_req_flags, PROTO_NONE, PROTO_SCTP, PROTO_TCP, PROTO_TLS, PROTO_UDP, and str. |
|
||||||||||||
|
Definition at line 407 of file msg_translator.c. References buf, ID_PARAM, ID_PARAM_LEN, int2reverse_hex(), L_CRIT, L_ERR, len, LOG, pkg_malloc, receive_info::proto_reserved1, sip_msg::rcv, ser_error, and size. Referenced by build_local(), and create_via_hf(). |
|
|
Definition at line 257 of file msg_translator.c. References check_via_address(), via_body::host, via_body::port, sip_msg::rcv, via_body::received, received_dns, receive_info::src_ip, and sip_msg::via1. Referenced by build_req_buf_from_sip_req(), build_res_buf_from_sip_req(), nat_uac_test_f(), and testSourceAddress(). |
|
||||||||||||||||||||||||
|
Definition at line 2180 of file msg_translator.c. References socket_info::address, socket_info::address_str, ip_addr::af, COMP_PARAM, COMP_PARAM_LEN, CRLF, CRLF_LEN, hostport::host, L_CRIT, L_ERR, len, _str::len, LOG, MY_BRANCH, MY_BRANCH_LEN, MY_VIA, MY_VIA_LEN, pkg_malloc, hostport::port, socket_info::port_no, socket_info::port_no_str, dest_info::proto, _str::s, dest_info::send_sock, ser_error, str, and via_len. Referenced by assemble_via(), build_dlg_ack(), build_local(), create_via(), create_via_hf(), http_xmlrpc2sip(), and sip_ping_builder(). |
1.3.9.1