nathelper.c File Reference

#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/udp.h>
#include <arpa/inet.h>
#include <sys/uio.h>
#include <sys/un.h>
#include <ctype.h>
#include <errno.h>
#include <netdb.h>
#include <poll.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "../../flags.h"
#include "../../sr_module.h"
#include "../../dprint.h"
#include "../../data_lump.h"
#include "../../data_lump_rpl.h"
#include "../../error.h"
#include "../../forward.h"
#include "../../mem/mem.h"
#include "../../parser/parse_from.h"
#include "../../parser/parse_to.h"
#include "../../parser/parse_uri.h"
#include "../../parser/parser_f.h"
#include "../../resolve.h"
#include "../../timer.h"
#include "../../trim.h"
#include "../../ut.h"
#include "../../mi/attr.h"
#include "../../pvar.h"
#include "../../msg_translator.h"
#include "../../usr_avp.h"
#include "../../socket_info.h"
#include "../../mod_fix.h"
#include "../registrar/sip_msg.h"
#include "../usrloc/usrloc.h"
#include "nathelper.h"
#include "nhelpr_funcs.h"
#include "sip_pinger.h"
#include "rtpproxy_stream.h"

Include dependency graph for nathelper.c:

Go to the source code of this file.

Defines

#define ADD_ADIRECTION   0x01
#define ADD_ANORTPPROXY   0x04
#define add_rtpp_node_int_info(_parent, _name, _name_len, _value, _child, _len, _string, _error)
#define ADIRECTION   "a=direction:active"
#define ADIRECTION_LEN   (sizeof(ADIRECTION) - 1)
#define AF_LOCAL   AF_UNIX
#define AOLDMEDIP   "a=oldmediaip:"
#define AOLDMEDIP6   "a=oldmediaip6:"
#define AOLDMEDIP6_LEN   (sizeof(AOLDMEDIP6) - 1)
#define AOLDMEDIP_LEN   (sizeof(AOLDMEDIP) - 1)
#define AOLDMEDPRT   "a=oldmediaport:"
#define AOLDMEDPRT_LEN   (sizeof(AOLDMEDPRT) - 1)
#define CPORT   "22222"
#define DEFAULT_RTPP_SET_ID   0
#define FIX_MEDIP   0x02
#define FIX_ORGIP   0x08
#define MI_DEFAULT_NATPING_STATE   1
#define MI_DISABLED   "disabled"
#define MI_DISABLED_LEN   (sizeof(MI_DISABLED)-1)
#define MI_ENABLE_RTP_PROXY   "nh_enable_rtpp"
#define MI_INDEX   "index"
#define MI_INDEX_LEN   (sizeof(MI_INDEX)-1)
#define MI_MAX_RECHECK_TICKS   (unsigned int)-1
#define MI_MIN_RECHECK_TICKS   0
#define MI_PING_DISABLED   "NATping disabled from script"
#define MI_PING_DISABLED_LEN   (sizeof(MI_PING_DISABLED)-1)
#define MI_RECHECK_T_LEN   (sizeof(MI_RECHECK_TICKS)-1)
#define MI_RECHECK_TICKS   "recheck_ticks"
#define MI_RTP_PROXY_NOT_FOUND   "RTP proxy not found"
#define MI_RTP_PROXY_NOT_FOUND_LEN   (sizeof(MI_RTP_PROXY_NOT_FOUND)-1)
#define MI_SET   "set"
#define MI_SET_LEN   (sizeof(MI_SET)-1)
#define MI_SET_NATPING_STATE   "nh_enable_ping"
#define MI_SHOW_RTP_PROXIES   "nh_show_rtpp"
#define MI_WEIGHT   "weight"
#define MI_WEIGHT_LEN   (sizeof(MI_WEIGHT)-1)
#define NAT_UAC_TEST_C_1918   0x01
#define NAT_UAC_TEST_RCVD   0x02
#define NAT_UAC_TEST_RPORT   0x10
#define NAT_UAC_TEST_S_1918   0x08
#define NAT_UAC_TEST_V_1918   0x04
#define PF_LOCAL   PF_UNIX
#define PTL_CPROTOVER   "20081102"
#define REP_CPROTOVER   "20071116"
#define REQ_CPROTOVER   "20050322"
#define SUP_CPROTOVER   20040107

Functions

static int add_rcv_param_f (struct sip_msg *, char *, char *)
static int add_rtpproxy_socks (struct rtpp_set *rtpp_list, char *rtpproxy)
static int alter_mediaip (struct sip_msg *, str *, str *, int, str *, int, int)
static int alter_mediaport (struct sip_msg *, str *, str *, str *, int)
static int alter_rtcp (struct sip_msg *msg, str *body, str *oldport, str *newport)
static int child_init (int)
static int contact_1918 (struct sip_msg *msg)
static int create_rcv_uri (str *uri, struct sip_msg *m)
static int extract_mediainfo (str *, str *, str *)
static int extract_mediaip (str *, str *, int *, char *)
static int extract_rtcp (str *body, str *rtcpport)
static char * find_next_sdp_line (char *, char *, char, char *)
static char * find_sdp_line (char *, char *, char)
static int fix_nated_contact_f (struct sip_msg *, char *, char *)
static int fix_nated_register_f (struct sip_msg *, char *, char *)
static int fix_nated_sdp_f (struct sip_msg *, char *, char *)
static int fixup_fix_nated_register (void **param, int param_no)
static int fixup_fix_sdp (void **param, int param_no)
static int fixup_set_id (void **param, int param_no)
static int force_rtp_proxy (struct sip_msg *, char *, char *, int)
static int force_rtp_proxy0_f (struct sip_msg *, char *, char *)
static int force_rtp_proxy1_f (struct sip_msg *, char *, char *)
static int force_rtp_proxy2_f (struct sip_msg *, char *, char *)
static char * gencookie ()
static int get_natping_socket (char *socket, unsigned int *ip, unsigned short *port)
static int init_raw_socket (void)
static int is1918addr (str *saddr)
static int isnulladdr (str *sx, int pf)
static struct mi_rootmi_enable_natping (struct mi_root *cmd_tree, void *param)
static struct mi_rootmi_enable_rtp_proxy (struct mi_root *cmd_tree, void *param)
static struct mi_rootmi_show_rtpproxies (struct mi_root *cmd_tree, void *param)
static void mod_destroy (void)
static int mod_init (void)
static int nat_uac_test_f (struct sip_msg *msg, char *str1, char *str2)
static int nathelper_add_rtpproxy_set (char *rtp_proxies)
static void nh_timer (unsigned int, void *)
static u_short raw_checksum (unsigned char *buffer, int len)
static int replace_sdp_ip (struct sip_msg *msg, str *org_body, char *line, str *ip)
static int rtpp_checkcap (struct rtpp_node *node, char *cap, int caplen)
static int rtpp_test (struct rtpp_node *, int, int)
static int rtpproxy_answer1_f (struct sip_msg *, char *, char *)
static int rtpproxy_answer2_f (struct sip_msg *, char *, char *)
static int rtpproxy_offer1_f (struct sip_msg *, char *, char *)
static int rtpproxy_offer2_f (struct sip_msg *, char *, char *)
static int rtpproxy_set_store (modparam_t type, void *val)
static int sdp_1918 (struct sip_msg *msg)
struct rtpp_nodeselect_rtpp_node (str callid, int do_test)
static struct rtpp_setselect_rtpp_set (int id_set)
static int send_raw (const char *buf, int buf_len, union sockaddr_union *to, const unsigned int s_ip, const unsigned int s_port)
char * send_rtpp_command (struct rtpp_node *node, struct iovec *v, int vcnt)
static int set_rtp_proxy_set_f (struct sip_msg *msg, char *str1, char *str2)
static int start_recording_f (struct sip_msg *, char *, char *)
static int unforce_rtp_proxy_f (struct sip_msg *, char *, char *)
static int via_1918 (struct sip_msg *msg)

Variables

static int cblen = 0
static cmd_export_t cmds []
static unsigned int current_msg_id = (unsigned int)-1
struct rtpp_setdefault_rtpp_set = 0
struct module_exports exports
struct socket_infoforce_socket = 0
static char * force_socket_str = 0
static mi_export_t mi_cmds []
static pid_t mypid
static unsigned int myseqn = 0
static int natping_interval = 0
static int natping_processes = 1
static char * natping_socket = 0
unsigned int * natping_state = 0
struct {
   const char *   cnetaddr
   uint32_t   mask
   uint32_t   netaddr
nets_1918 []
static str nortpproxy_str = str_init("a=nortpproxy:yes")
static param_export_t params []
static int ping_nated_only = 0
static unsigned int raw_ip = 0
static unsigned short raw_port = 0
static int raw_sock = -1
static int_str rcv_avp_name
static char * rcv_avp_param = NULL
static unsigned short rcv_avp_type = 0
static unsigned int rtpp_no = 0
static int rtpp_set_count = 0
struct rtpp_set_headrtpp_set_list = 0
static int rtpp_sets = 0
static int * rtpp_socks = 0
static char ** rtpp_strings = 0
static int rtpproxy_disable_tout = 60
static int rtpproxy_retr = 5
static int rtpproxy_tout = 1
static const char sbuf [4] = {0, 0, 0, 0}
struct rtpp_setselected_rtpp_set = 0
static int sipping_flag = -1
struct {
   int   is_rtp
   int   len
   const char *   s
sup_ptypes []
static usrloc_api_t ul


Define Documentation

#define ADD_ADIRECTION   0x01

Definition at line 1479 of file nathelper.c.

Referenced by fix_nated_sdp_f().

#define ADD_ANORTPPROXY   0x04

Definition at line 1481 of file nathelper.c.

Referenced by fix_nated_sdp_f().

#define add_rtpp_node_int_info ( _parent,
_name,
_name_len,
_value,
_child,
_len,
_string,
_error   ) 

Definition at line 886 of file nathelper.c.

Referenced by mi_show_rtpproxies().

#define ADIRECTION   "a=direction:active"

Definition at line 1484 of file nathelper.c.

Referenced by fix_nated_sdp_f().

#define ADIRECTION_LEN   (sizeof(ADIRECTION) - 1)

Definition at line 1485 of file nathelper.c.

Referenced by fix_nated_sdp_f().

#define AF_LOCAL   AF_UNIX

Definition at line 223 of file nathelper.c.

#define AOLDMEDIP   "a=oldmediaip:"

Definition at line 1487 of file nathelper.c.

Referenced by alter_mediaip().

#define AOLDMEDIP6   "a=oldmediaip6:"

Definition at line 1490 of file nathelper.c.

Referenced by alter_mediaip().

#define AOLDMEDIP6_LEN   (sizeof(AOLDMEDIP6) - 1)

Definition at line 1491 of file nathelper.c.

Referenced by alter_mediaip().

#define AOLDMEDIP_LEN   (sizeof(AOLDMEDIP) - 1)

Definition at line 1488 of file nathelper.c.

Referenced by alter_mediaip().

#define AOLDMEDPRT   "a=oldmediaport:"

Definition at line 1493 of file nathelper.c.

Referenced by alter_mediaport().

#define AOLDMEDPRT_LEN   (sizeof(AOLDMEDPRT) - 1)

Definition at line 1494 of file nathelper.c.

Referenced by alter_mediaport().

#define CPORT   "22222"

Definition at line 273 of file nathelper.c.

Referenced by child_init().

#define DEFAULT_RTPP_SET_ID   0

Definition at line 237 of file nathelper.c.

Referenced by mod_init(), and nathelper_add_rtpproxy_set().

#define FIX_MEDIP   0x02

Definition at line 1480 of file nathelper.c.

Referenced by fix_nated_sdp_f().

#define FIX_ORGIP   0x08

Definition at line 1482 of file nathelper.c.

Referenced by fix_nated_sdp_f().

#define MI_DEFAULT_NATPING_STATE   1

Definition at line 240 of file nathelper.c.

Referenced by mod_init().

#define MI_DISABLED   "disabled"

Definition at line 256 of file nathelper.c.

Referenced by mi_show_rtpproxies().

#define MI_DISABLED_LEN   (sizeof(MI_DISABLED)-1)

Definition at line 257 of file nathelper.c.

Referenced by mi_show_rtpproxies().

#define MI_ENABLE_RTP_PROXY   "nh_enable_rtpp"

Definition at line 242 of file nathelper.c.

#define MI_INDEX   "index"

Definition at line 254 of file nathelper.c.

Referenced by mi_show_rtpproxies().

#define MI_INDEX_LEN   (sizeof(MI_INDEX)-1)

Definition at line 255 of file nathelper.c.

Referenced by mi_show_rtpproxies().

#define MI_MAX_RECHECK_TICKS   (unsigned int)-1

Definition at line 244 of file nathelper.c.

Referenced by mi_enable_rtp_proxy(), and rtpp_test().

#define MI_MIN_RECHECK_TICKS   0

Definition at line 243 of file nathelper.c.

Referenced by mi_enable_rtp_proxy().

#define MI_PING_DISABLED   "NATping disabled from script"

Definition at line 250 of file nathelper.c.

Referenced by mi_enable_natping().

#define MI_PING_DISABLED_LEN   (sizeof(MI_PING_DISABLED)-1)

Definition at line 251 of file nathelper.c.

Referenced by mi_enable_natping().

#define MI_RECHECK_T_LEN   (sizeof(MI_RECHECK_TICKS)-1)

Definition at line 261 of file nathelper.c.

Referenced by mi_show_rtpproxies().

#define MI_RECHECK_TICKS   "recheck_ticks"

Definition at line 260 of file nathelper.c.

Referenced by mi_show_rtpproxies().

#define MI_RTP_PROXY_NOT_FOUND   "RTP proxy not found"

Definition at line 248 of file nathelper.c.

Referenced by mi_enable_rtp_proxy().

#define MI_RTP_PROXY_NOT_FOUND_LEN   (sizeof(MI_RTP_PROXY_NOT_FOUND)-1)

Definition at line 249 of file nathelper.c.

Referenced by mi_enable_rtp_proxy().

#define MI_SET   "set"

Definition at line 252 of file nathelper.c.

Referenced by mi_show_rtpproxies().

#define MI_SET_LEN   (sizeof(MI_SET)-1)

Definition at line 253 of file nathelper.c.

Referenced by mi_show_rtpproxies().

#define MI_SET_NATPING_STATE   "nh_enable_ping"

Definition at line 239 of file nathelper.c.

#define MI_SHOW_RTP_PROXIES   "nh_show_rtpp"

Definition at line 246 of file nathelper.c.

#define MI_WEIGHT   "weight"

Definition at line 258 of file nathelper.c.

Referenced by mi_show_rtpproxies().

#define MI_WEIGHT_LEN   (sizeof(MI_WEIGHT)-1)

Definition at line 259 of file nathelper.c.

Referenced by mi_show_rtpproxies().

#define NAT_UAC_TEST_C_1918   0x01

Definition at line 230 of file nathelper.c.

Referenced by nat_uac_test_f().

#define NAT_UAC_TEST_RCVD   0x02

Definition at line 231 of file nathelper.c.

Referenced by nat_uac_test_f().

#define NAT_UAC_TEST_RPORT   0x10

Definition at line 234 of file nathelper.c.

Referenced by nat_uac_test_f().

#define NAT_UAC_TEST_S_1918   0x08

Definition at line 233 of file nathelper.c.

Referenced by nat_uac_test_f().

#define NAT_UAC_TEST_V_1918   0x04

Definition at line 232 of file nathelper.c.

Referenced by nat_uac_test_f().

#define PF_LOCAL   PF_UNIX

Definition at line 226 of file nathelper.c.

#define PTL_CPROTOVER   "20081102"

Definition at line 271 of file nathelper.c.

Referenced by rtpp_test().

#define REP_CPROTOVER   "20071116"

Definition at line 270 of file nathelper.c.

Referenced by rtpp_test().

#define REQ_CPROTOVER   "20050322"

Definition at line 268 of file nathelper.c.

Referenced by rtpp_test().

#define SUP_CPROTOVER   20040107

Definition at line 266 of file nathelper.c.

Referenced by rtpp_test().


Function Documentation

static int add_rcv_param_f ( struct sip_msg msg,
char *  str1,
char *  str2 
) [static]

static int add_rtpproxy_socks ( struct rtpp_set rtpp_list,
char *  rtpproxy 
) [static]

static int alter_mediaip ( struct sip_msg msg,
str body,
str oldip,
int  oldpf,
str newip,
int  newpf,
int  preserve 
) [static]

static int alter_mediaport ( struct sip_msg msg,
str body,
str oldport,
str newport,
int  preserve 
) [static]

static int alter_rtcp ( struct sip_msg msg,
str body,
str oldport,
str newport 
) [static]

static int child_init ( int  rank  )  [static]

static int contact_1918 ( struct sip_msg msg  )  [static]

Definition at line 1393 of file nathelper.c.

References get_contact_uri(), sip_uri::host, and is1918addr().

Referenced by nat_uac_test_f().

static int create_rcv_uri ( str uri,
struct sip_msg m 
) [static]

static int extract_mediainfo ( str body,
str mediaport,
str payload_types 
) [static]

static int extract_mediaip ( str body,
str mediaip,
int *  pf,
char *  line 
) [static]

static int extract_rtcp ( str body,
str rtcpport 
) [static]

Definition at line 1760 of file nathelper.c.

References eat_line(), _str::len, len, NULL, _str::s, ser_memmem(), and trim_len.

Referenced by force_rtp_proxy().

static char * find_next_sdp_line ( char *  p,
char *  plimit,
char  linechar,
char *  defptr 
) [static]

Definition at line 2355 of file nathelper.c.

References find_sdp_line().

Referenced by force_rtp_proxy().

static char * find_sdp_line ( char *  p,
char *  plimit,
char  linechar 
) [static]

Definition at line 2322 of file nathelper.c.

References NULL, and ser_memmem().

Referenced by find_next_sdp_line(), and force_rtp_proxy().

static int fix_nated_contact_f ( struct sip_msg msg,
char *  str1,
char *  str2 
) [static]

static int fix_nated_register_f ( struct sip_msg msg,
char *  str1,
char *  str2 
) [static]

Definition at line 3361 of file nathelper.c.

References add_avp(), AVP_VAL_STR, create_rcv_uri(), LM_ERR, int_str::n, rcv_avp_type, and int_str::s.

static int fix_nated_sdp_f ( struct sip_msg msg,
char *  str1,
char *  str2 
) [static]

static int fixup_fix_nated_register ( void **  param,
int  param_no 
) [static]

Definition at line 788 of file nathelper.c.

References LM_ERR, and int_str::n.

static int fixup_fix_sdp ( void **  param,
int  param_no 
) [static]

Definition at line 764 of file nathelper.c.

References E_UNSPEC, fixup_uint_null(), _str::len, LM_ERR, NULL, pv_parse_format(), _str::s, and s.

static int fixup_set_id ( void **  param,
int  param_no 
) [static]

Definition at line 742 of file nathelper.c.

References E_CFG, LM_ERR, pkg_free, select_rtpp_set(), and str2s().

static int force_rtp_proxy ( struct sip_msg msg,
char *  str1,
char *  str2,
int  offer 
) [static]

static int force_rtp_proxy0_f ( struct sip_msg msg,
char *  str1,
char *  str2 
) [static]

Definition at line 2944 of file nathelper.c.

References force_rtp_proxy1_f(), and NULL.

static int force_rtp_proxy1_f ( struct sip_msg msg,
char *  str1,
char *  str2 
) [static]

static int force_rtp_proxy2_f ( struct sip_msg msg,
char *  param1,
char *  param2 
) [static]

static char * gencookie ( void   )  [static]

Definition at line 1984 of file nathelper.c.

References mypid, and myseqn.

Referenced by send_rtpp_command().

static int get_natping_socket ( char *  socket,
unsigned int *  ip,
unsigned short *  port 
) [static]

static int init_raw_socket ( void   )  [static]

Definition at line 967 of file nathelper.c.

References LM_ERR, and raw_sock.

Referenced by mod_init().

static int is1918addr ( str saddr  )  [inline, static]

Definition at line 1363 of file nathelper.c.

References _str::len, mask, netaddr, nets_1918, NULL, and _str::s.

Referenced by contact_1918(), sdp_1918(), and via_1918().

static int isnulladdr ( str sx,
int  pf 
) [static]

Definition at line 1288 of file nathelper.c.

References _str::len, s, and _str::s.

static struct mi_root * mi_enable_natping ( struct mi_root cmd_tree,
void *  param 
) [static, read]

static struct mi_root * mi_enable_rtp_proxy ( struct mi_root cmd_tree,
void *  param 
) [static, read]

static struct mi_root * mi_show_rtpproxies ( struct mi_root cmd_tree,
void *  param 
) [static, read]

static void mod_destroy ( void   )  [static]

static int mod_init ( void   )  [static]

static int nat_uac_test_f ( struct sip_msg msg,
char *  str1,
char *  str2 
) [static]

static int nathelper_add_rtpproxy_set ( char *  rtp_proxies  )  [static]

static void nh_timer ( unsigned int  ticks,
void *  timer_idx 
) [static]

static u_short raw_checksum ( unsigned char *  buffer,
int  len 
) [static]

Definition at line 2952 of file nathelper.c.

Referenced by send_raw().

static int replace_sdp_ip ( struct sip_msg msg,
str org_body,
char *  line,
str ip 
) [inline, static]

static int rtpp_checkcap ( struct rtpp_node node,
char *  cap,
int  caplen 
) [static]

Definition at line 1994 of file nathelper.c.

References NULL, and send_rtpp_command().

Referenced by rtpp_test().

static int rtpp_test ( struct rtpp_node node,
int  isdisabled,
int  force 
) [static]

static int rtpproxy_answer1_f ( struct sip_msg msg,
char *  str1,
char *  str2 
) [static]

static int rtpproxy_answer2_f ( struct sip_msg msg,
char *  param1,
char *  param2 
) [static]

static int rtpproxy_offer1_f ( struct sip_msg msg,
char *  str1,
char *  str2 
) [static]

static int rtpproxy_offer2_f ( struct sip_msg msg,
char *  param1,
char *  param2 
) [static]

static int rtpproxy_set_store ( modparam_t  type,
void *  val 
) [static]

Definition at line 517 of file nathelper.c.

References len, LM_ERR, pkg_malloc, pkg_realloc, rtpp_sets, and rtpp_strings.

static int sdp_1918 ( struct sip_msg msg  )  [static]

Definition at line 1408 of file nathelper.c.

References extract_body(), extract_mediaip(), is1918addr(), isnulladdr, and LM_ERR.

Referenced by nat_uac_test_f().

struct rtpp_node* select_rtpp_node ( str  callid,
int  do_test 
) [read]

static struct rtpp_set * select_rtpp_set ( int  id_set  )  [static, read]

Definition at line 2184 of file nathelper.c.

References rtpp_set::id_set, LM_ERR, rtpp_set_head::rset_first, and rtpp_set::rset_next.

Referenced by fixup_set_id(), and mod_init().

static int send_raw ( const char *  buf,
int  buf_len,
union sockaddr_union to,
const unsigned int  s_ip,
const unsigned int  s_port 
) [static]

Definition at line 2973 of file nathelper.c.

References len, LM_ERR, raw_checksum(), raw_sock, and sockaddr_union::sin.

Referenced by nh_timer().

char* send_rtpp_command ( struct rtpp_node node,
struct iovec *  v,
int  vcnt 
)

static int set_rtp_proxy_set_f ( struct sip_msg msg,
char *  str1,
char *  str2 
) [static]

Definition at line 2365 of file nathelper.c.

References current_msg_id, and sip_msg::id.

static int start_recording_f ( struct sip_msg msg,
char *  foo,
char *  bar 
) [static]

static int unforce_rtp_proxy_f ( struct sip_msg msg,
char *  str1,
char *  str2 
) [static]

static int via_1918 ( struct sip_msg msg  )  [static]

Definition at line 1431 of file nathelper.c.

References via_body::host, is1918addr(), and sip_msg::via1.

Referenced by nat_uac_test_f().


Variable Documentation

int cblen = 0 [static]

Definition at line 327 of file nathelper.c.

Referenced by nh_timer().

cmd_export_t cmds[] [static]

Definition at line 401 of file nathelper.c.

const char* cnetaddr

Definition at line 333 of file nathelper.c.

Referenced by mod_init().

unsigned int current_msg_id = (unsigned int)-1 [static]

Definition at line 391 of file nathelper.c.

Definition at line 501 of file nathelper.c.

Definition at line 329 of file nathelper.c.

char* force_socket_str = 0 [static]

Definition at line 364 of file nathelper.c.

Referenced by mod_init().

int is_rtp

Definition at line 346 of file nathelper.c.

Referenced by extract_mediainfo().

int len

Definition at line 345 of file nathelper.c.

Referenced by _reply(), acc_log_request(), actually_rewrite(), add_avp(), add_hf_helper(), add_maxfwd_header(), add_mi_sdp_nodes(), add_mi_sdp_payload_nodes(), add_mi_session_nodes(), add_mi_stream_nodes(), add_pending_sdp_session(), add_to_tree(), addf_mi_attr(), addf_mi_node_child(), addf_mi_node_sibling(), agg_body_sendn_update(), agregate_xmls(), allow_uri(), append_header(), append_time_f(), assemble_msg(), assemble_via(), bdb_append_row(), bdb_check_reload(), bdb_convert_row(), bdb_get_colmap(), bdb_get_columns(), bdb_query(), bdb_update(), bdb_val2str(), bdblib_valtochar(), bla_process_body(), branch_uri2dset(), build_authorization_hdr(), build_contact(), build_empty_bla_body(), build_new_dlg(), build_req_buf_from_sip_req(), build_res_buf_from_sip_req(), build_res_buf_from_sip_res(), build_sipping(), build_user_AOR(), calc_buf_len(), calculate_routeset_length(), cancel_branch(), check_register(), check_routing(), check_via_address(), clen_builder(), cmp_str(), cmpi_str(), compile_logs(), conf_parse_filter(), conf_parse_proxy(), conf_parse_switch(), constr_rlmi_doc(), CONSTR_RLSUBS_DID(), consume_credentials(), convert_row(), cpl_aux_process(), crc32_uint(), crcitt_string_array(), create_as_action_reply(), create_as_event_sl(), create_as_event_t(), create_rcv_uri(), db_allocate_row(), db_allocate_rows(), db_bind_mod(), db_do_delete(), db_do_insert(), db_do_query(), db_do_replace(), db_do_update(), db_free_row(), db_insert_update(), db_mysql_get_columns(), db_mysql_val2str(), db_oracle_raw_query(), db_oracle_val2bind(), db_postgres_convert_rows(), db_postgres_get_columns(), db_postgres_str2val(), db_print_columns(), db_print_set(), db_print_values(), db_print_where(), db_unixodbc_build_conn_str(), db_unixodbc_extract_error(), db_unixodbc_fetch_result(), db_unixodbc_get_columns(), dbt_delete(), dbt_get_columns(), dbt_get_refs(), dbt_insert(), dbt_query(), dbt_update(), decode_mail_url(), dictionary_hash(), dispatch_relay(), dns_cname_parser(), dns_ebl_parser(), dns_srv_parser(), dns_txt_parser(), do_action(), do_duplicate_rr(), do_read(), do_replace_body_f(), do_send_bulk_message_component(), dp_apply_policy(), ds_print_mi_list(), e2e_cancel_branch(), encode_avp_value(), encode_branch_info(), encode_header(), end_media_session(), extract_allowed_headers(), extract_mediainfo(), extract_mediaip(), extract_rtcp(), filter_body_f(), find_content_type_application_sdp(), find_line_start(), findchr(), first_token(), fix_nated_contact_f(), fix_socket_list(), FixContact(), fixup_as_relay(), flat_db_insert(), force_rtp_proxy(), forward_reply(), forward_request(), generate_cid(), get_body(), get_columns(), get_dlg_uri(), get_domain(), get_fifo_opts(), get_local_contact(), get_node_selector(), get_out_socket(), get_p_notify_body(), get_plain_uri(), get_route_param(), get_session_info(), get_tokens(), get_wi_notify_body(), get_xcap_etag(), get_xcap_path(), handle_unc_as_data(), hostent_cpy(), id_builder(), imc_mi_list_members(), imc_mi_list_rooms(), init_sip_ping(), insert_element(), internal_mi_print_dlg(), ip_addr2he(), is_user_in(), keys2perlarray(), lflf_to_crlf_hack(), load_file(), load_metadata_columns(), load_metadata_defaults(), load_route_data_db(), MD5StringArray(), mi_add_aor_node(), mi_datagram_server(), mi_debug(), mi_get_pipes(), mi_get_profile(), mi_get_queues(), mi_print_blacklists(), mi_print_gws(), mi_print_lcrs(), mi_print_routes(), mi_ps(), mi_read_line(), mi_show_rtpproxies(), mi_stats(), mi_tm_hash(), mi_usrloc_dump(), modem_process(), new_dlg_profile(), parse_check_value(), parse_db_url(), parse_method(), parse_min_se_body(), parse_op_value(), parse_priv_value(), parse_privacy(), parse_queue_params(), parse_session_expires_body(), parse_subs_state(), parse_supported_body(), patch_content_length(), pdt_check_pd(), pdt_get_domain(), pdt_mi_list(), pdt_print_tree(), perlresult2dbres(), print_content_length(), print_cseq_num(), print_rr_body(), publ_build_hdr(), push_on_network(), radius_authorize_sterman(), radius_does_uri_user_exist(), radius_does_uri_user_host_exist(), radius_is_user_in(), radius_load_callee_avps(), radius_load_caller_avps(), received_builder(), register_mi_cmd(), remove_header(), replace(), replace_all_f(), replace_body_f(), replace_f(), reply_200(), rl_timer(), rls_handle_subscribe(), rls_notify_extra_hdr(), rport_builder(), rtpproxy_set_store(), rule_translate(), save_ruri(), search_append_body_f(), search_append_f(), send_http_get(), send_pr_buffer(), send_raw(), send_reply(), send_rtpp_command(), send_sip_options_request(), set_body_f(), set_mod_param_regex(), set_rpl_body_f(), sip_match(), sip_msg_cloner(), split_text(), sst_dialog_mi_context_CB(), str_toklen(), StringBlockConcat(), StringConcat(), subs_build_hdr(), subst_uri_f(), t_retransmit_reply(), t_uac_cancel(), timer_send_notify(), timetToSipDateStr(), trace_onreply_out(), trace_onreq_out(), trace_sl_onreply_out(), trim(), update_filter(), update_uac_dst(), use_media_proxy(), valdata(), w_as_relay_sl(), w_as_relay_t(), w_pcre_match(), w_pcre_match_group(), write_to_unixsock(), xj_jcon_pool_add(), xj_jcon_pool_del(), xj_jcon_pool_get(), xj_wlist_check(), xj_wlist_get(), xj_wlist_set_flag(), xmpp_server_child_process(), xode_from_file(), xode_send(), and xode_spool_add().

uint32_t mask

mi_export_t mi_cmds[] [static]

Definition at line 493 of file nathelper.c.

pid_t mypid [static]

Definition at line 368 of file nathelper.c.

Referenced by child_init(), and gencookie().

unsigned int myseqn = 0 [static]

Definition at line 369 of file nathelper.c.

Referenced by gencookie().

int natping_interval = 0 [static]

Definition at line 328 of file nathelper.c.

Referenced by mod_init(), and nh_timer().

int natping_processes = 1 [static]

Definition at line 372 of file nathelper.c.

Referenced by mod_init(), and nh_timer().

char* natping_socket = 0 [static]

Definition at line 378 of file nathelper.c.

Referenced by get_natping_socket(), and mod_init().

unsigned int* natping_state = 0

Definition at line 399 of file nathelper.c.

Referenced by mi_enable_natping(), mod_destroy(), mod_init(), and nh_timer().

uint32_t netaddr

Definition at line 334 of file nathelper.c.

Referenced by is1918addr(), and rfc1918address().

struct { ... } nets_1918[] [static]

Referenced by is1918addr(), and mod_init().

str nortpproxy_str = str_init("a=nortpproxy:yes") [static]

Definition at line 370 of file nathelper.c.

param_export_t params[] [static]

Definition at line 474 of file nathelper.c.

int ping_nated_only = 0 [static]

Definition at line 362 of file nathelper.c.

Referenced by mod_init(), and nh_timer().

unsigned int raw_ip = 0 [static]

Definition at line 380 of file nathelper.c.

Referenced by mod_init(), and nh_timer().

unsigned short raw_port = 0 [static]

Definition at line 381 of file nathelper.c.

Referenced by mod_init(), and nh_timer().

int raw_sock = -1 [static]

Definition at line 379 of file nathelper.c.

Referenced by init_raw_socket(), and send_raw().

Definition at line 376 of file nathelper.c.

Referenced by pack_ci().

char* rcv_avp_param = NULL [static]

Definition at line 374 of file nathelper.c.

Referenced by mod_init().

unsigned short rcv_avp_type = 0 [static]

Definition at line 375 of file nathelper.c.

Referenced by fix_nated_register_f(), mod_init(), and pack_ci().

unsigned int rtpp_no = 0 [static]

Definition at line 394 of file nathelper.c.

Referenced by add_rtpproxy_socks(), and child_init().

int rtpp_set_count = 0 [static]

Definition at line 386 of file nathelper.c.

Referenced by nathelper_add_rtpproxy_set().

Definition at line 389 of file nathelper.c.

int rtpp_sets = 0 [static]

Definition at line 385 of file nathelper.c.

Referenced by mod_init(), and rtpproxy_set_store().

int* rtpp_socks = 0 [static]

Definition at line 395 of file nathelper.c.

Referenced by child_init(), and send_rtpp_command().

char** rtpp_strings = 0 [static]

Definition at line 384 of file nathelper.c.

Referenced by mod_init(), and rtpproxy_set_store().

int rtpproxy_disable_tout = 60 [static]

Definition at line 365 of file nathelper.c.

Referenced by rtpp_test(), and send_rtpp_command().

int rtpproxy_retr = 5 [static]

Definition at line 366 of file nathelper.c.

Referenced by send_rtpp_command().

int rtpproxy_tout = 1 [static]

Definition at line 367 of file nathelper.c.

Referenced by send_rtpp_command().

const char* s

Definition at line 344 of file nathelper.c.

Referenced by _xode_tospool(), acc_log_request(), action_stat(), add_avp(), add_avp_galias_str(), add_dlg_rr_param(), add_hf_helper(), add_interfaces(), agregate_xmls(), append_header(), append_rpid_hf_p(), as_relay_stat(), assemble_msg(), auth_fixup(), avpops_parse_pvar(), bdb_append_row(), bdb_check_reload(), bdb_convert_row(), bdb_get_colmap(), bdb_get_columns(), bdb_val2str(), bdblib_close(), bdblib_create_journal(), bdblib_reopen(), cfg_lock_helper(), check_user_blacklist_fixup(), check_via_address(), cmp_hdrname_strzn(), compile_logs(), conv_fp(), create_socket_info(), DateDecode(), db_do_delete(), db_do_insert(), db_do_query(), db_do_replace(), db_do_update(), db_free_row(), db_insert_update(), db_mysql_get_columns(), db_mysql_val2str(), db_postgres_convert_rows(), db_postgres_get_columns(), db_postgres_str2val(), db_print_columns(), db_print_set(), db_print_where(), db_str2val(), db_unixodbc_convert_rows(), db_unixodbc_fetch_result(), db_unixodbc_get_columns(), db_unixodbc_list_insert(), db_unixodbc_val2str(), dbt_delete(), dbt_get_columns(), dbt_get_refs(), dbt_insert(), dbt_query(), dbt_update(), decode_avp_value(), decode_branch_info(), delete_shtable(), direction_fixup(), dlg_bridge_tm_callback(), dlg_new_dialog(), do_parse_rr_body(), do_replace_body_f(), double_fixup(), dp_trans_fixup(), dump_tree_recursor(), encode_branch_info(), escape_param(), escape_user(), event_stat(), exec_avp_fixup(), extra2strar(), extract_mediaip(), find_content_type_application_sdp(), fixstringloadgws(), fixup_check_avp(), fixup_copy_avp(), fixup_db_avp(), fixup_db_query_avp(), fixup_delete_avp(), fixup_fix_sdp(), fixup_is_avp_set(), fixup_method(), fixup_op_avp(), fixup_phostport2proxy(), fixup_presence(), fixup_profile(), fixup_pua_xmpp(), fixup_pushto_avp(), fixup_replace_from1(), fixup_replace_from2(), fixup_sl_send_reply(), fixup_stat(), fixup_str(), fixup_subscribe(), fixup_subst(), fixup_t_replicate(), fixup_t_send_reply(), fixup_t_write(), fixup_uint(), fixup_var_str_int(), flag_fixup(), flat_db_insert(), flat_use_table(), format_converter(), forward_reply(), free_subs_list(), get_fifo_opts(), get_hf(), get_node_selector(), get_redirect_fixup(), get_session_info(), get_stored_info(), get_subs_db(), get_subs_dialog(), get_wi_notify_body(), group_fixup(), h350_auth_lookup_fixup(), Hash16(), hf_fixup(), init_avp_params(), integer2hex(), is_2rr(), is_strict(), is_user(), is_user_in(), isnulladdr(), it_list_fixup(), keys2perlarray(), ldap_filter_url_encode_fixup(), ldap_result_check_fixup(), ldap_result_fixup(), ldap_search_fixup(), load_metadata_columns(), load_metadata_defaults(), load_metadata_keys(), load_route_data_db(), mi_get_queues(), mi_print_routes(), mi_refreshWatchers(), mi_tm_uac_dlg(), mod_init(), naptr_sort(), one_str_pv_elem_fixup(), ospAppendHeader(), parse_aaa_avps(), parse_acc_extra(), parse_algorithm(), parse_auth_avp(), parse_avp_name(), parse_dlg_rr_param(), parse_extra_str(), parse_pvname_list(), parse_qop(), parse_repl(), parse_tw_append(), parse_uri(), patch_content_length(), pkg_strndup(), pres_agg_nbody(), print_rr_body(), publ_notify(), pv_get_color(), pv_parse_format(), pv_parse_index(), pv_parse_spec(), query_db_notify(), radius_authorize_sterman(), radius_does_uri_user_exist(), radius_does_uri_user_host_exist(), radius_is_user_in(), radius_load_callee_avps(), radius_load_caller_avps(), refresh_watcher(), register_udomain(), replace_all_f(), replace_body_f(), replace_f(), resolvehost(), resource_subscriptions(), restore_db_subs(), rls_restore_db_subs(), rule_translate(), run_proxy(), save_fixup(), save_ruri(), search_append_body_f(), search_append_f(), search_shtable(), send_reply(), send_sockinfo(), set_tv(), setf_fixup(), str2ip(), str2ip6(), str2sint(), timer_send_notify(), tr_lookup(), uac_init(), unescape_user(), update_db_subs(), update_pw_dialogs(), update_rlsubs(), update_shtable(), update_totag_set(), update_watchers_status(), use_media_proxy(), valdata(), w_add_rr_param(), w_ds_select_domain(), w_ds_select_dst(), w_pcre_match(), w_pcre_match_group(), w_prefix2domain_2(), w_record_route(), w_record_route_preset(), xcapFreeNodeSel(), xcapNodeSelAddStep(), xdbg_fixup(), xj_address_translation(), xj_jconf_check_addr(), xj_jconf_init_sip(), xj_wlist_check_aliases(), xlog_fixup(), xode_spool_newfrompool(), xode_spool_str(), and xode_to_prettystr().

const char sbuf[4] = {0, 0, 0, 0} [static]

Definition at line 363 of file nathelper.c.

Referenced by nh_timer(), trace_onreply_out(), and trace_onreq_out().

Definition at line 390 of file nathelper.c.

int sipping_flag = -1 [static]

Definition at line 371 of file nathelper.c.

Referenced by mod_init(), and nh_timer().

struct { ... } sup_ptypes[] [static]

Referenced by extract_mediainfo().

usrloc_api_t ul [static]


Generated on Wed May 23 20:00:41 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6