opensips  3.0.1
About: OpenSIPS is a multi-functional, multi-purpose signaling SIP Server (Session Initiation Protocol). It can act as SIP Router/Switch, SIP Registrar, Application Server, Redirect Server, Load Balancer / Dispatcher, Back-to-Back User Agent, Presence Server, IM Server, Session Border Controller, SIP Front-End, NAT traversal Server, IP Gateway (SMS, XMPP) and others.
  Fossies Dox: opensips-3.0.1.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

dr_api_internal.c File Reference
#include "dr_api_internal.h"
#include "dr_api.h"
#include "../../str.h"
Include dependency graph for dr_api_internal.c:

Go to the source code of this file.

Functions

static rt_info_tmatch_number (dr_head_p partition, unsigned int grp_id, const str *number, unsigned int *matched_len)
 
static dr_head_p create_dr_head (void)
 
static void free_dr_head (dr_head_p partition)
 
static int add_rule_api (dr_head_p partition, unsigned int rid, str *prefix, unsigned int gr_id, unsigned int priority, tmrec_t *time_rec, void *attr)
 
rt_info_tfind_rule_by_prefix_unsafe (ptree_t *pt, ptree_node_t *noprefix, str prefix, unsigned int grp_id, unsigned int *matched_len)
 
int load_dr (struct dr_binds *drb)
 
static void del_rt_list_api (rt_info_wrp_t *rwl)
 
static void del_tree_api (ptree_t *t)
 

Function Documentation

◆ add_rule_api()

static int add_rule_api ( dr_head_p  partition,
unsigned int  rid,
str prefix,
unsigned int  gr_id,
unsigned int  priority,
tmrec_t time_rec,
void attr 
)
static

< Error level

< Error level

< Error level

Definition at line 156 of file dr_api_internal.c.

References add_prefix(), add_rt_info(), LM_ERR, memset(), _dr_head_t::noprefix, NULL, prefix, priority, _dr_head_t::pt, shm_free_func, shm_malloc(), and shm_malloc_func.

Referenced by load_dr().

◆ create_dr_head()

static dr_head_p create_dr_head ( void  )
static

< Error level

< Error level

Definition at line 83 of file dr_api_internal.c.

References LM_ERR, memset(), NULL, shm_free(), and shm_malloc().

Referenced by load_dr().

◆ del_rt_list_api()

static void del_rt_list_api ( rt_info_wrp_t rwl)
static

Definition at line 104 of file dr_api_internal.c.

References rt_info_wrp_::next, NULL, rt_info_::ref_cnt, rt_info_wrp_::rtl, and shm_free().

Referenced by del_tree_api(), and free_dr_head().

◆ del_tree_api()

static void del_tree_api ( ptree_t t)
static

◆ find_rule_by_prefix_unsafe()

rt_info_t* find_rule_by_prefix_unsafe ( ptree_t pt,
ptree_node_t noprefix,
str  prefix,
unsigned int  grp_id,
unsigned int matched_len 
)

< Debug level

< Debug level

Definition at line 43 of file dr_api_internal.c.

References check_rt(), get_prefix(), LM_DBG, NULL, prefix, and pt.

Referenced by match_number(), and mi_dr_number_routing().

◆ free_dr_head()

static void free_dr_head ( dr_head_p  partition)
static

◆ load_dr()

int load_dr ( struct dr_binds drb)

drouting module developer api

Copyright (C) 2014 OpenSIPS Foundation

This file is part of opensips, a free SIP server.

opensips is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version

opensips is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

History

2014-08-13 initial version (Andrei Datcu)

Definition at line 64 of file dr_api_internal.c.

References dr_binds::add_rule, add_rule_api(), create_dr_head(), dr_binds::create_head, drb, free_dr_head(), dr_binds::free_head, dr_binds::match_number, match_number(), register_dr_cb(), and dr_binds::register_drcb.

Referenced by load_dr_api().

◆ match_number()

static rt_info_t * match_number ( dr_head_p  partition,
unsigned int  grp_id,
const str number,
unsigned int matched_len 
)
static

drouting module developer api

Copyright (C) 2014 OpenSIPS Foundation

This file is part of opensips, a free SIP server.

opensips is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version

opensips is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

History

2014-08-13 initial version (Andrei Datcu)

Definition at line 75 of file dr_api_internal.c.

References find_rule_by_prefix_unsafe(), _dr_head_t::noprefix, and _dr_head_t::pt.

Referenced by load_dr().