#include "../../str.h"


Go to the source code of this file.
Data Structures | |
| struct | _pdt_node |
| struct | _pdt_tree |
Defines | |
| #define | PDT_MAX_DEPTH 32 |
| #define | PDT_NODE_SIZE pdt_char_list.len |
| #define | strpos(s, c) (strchr(s,c)-s) |
Typedefs | |
| typedef struct _pdt_node | pdt_node_t |
| typedef struct _pdt_tree | pdt_tree_t |
Functions | |
| int | add_to_tree (pdt_tree_t *pt, str *code, str *domain) |
| str * | get_domain (pdt_tree_t *pt, str *code, int *plen) |
| int | pdt_add_to_tree (pdt_tree_t **dpt, str *sdomain, str *code, str *domain) |
| int | pdt_check_pd (pdt_tree_t *pt, str *sdomain, str *sp, str *sd) |
| void | pdt_free_tree (pdt_tree_t *pt) |
| str * | pdt_get_domain (pdt_tree_t *pt, str *sdomain, str *code, int *plen) |
| pdt_tree_t * | pdt_get_tree (pdt_tree_t *pl, str *sdomain) |
| pdt_tree_t * | pdt_init_tree (str *sdomain) |
| int | pdt_print_tree (pdt_tree_t *pt) |
| #define PDT_MAX_DEPTH 32 |
Definition at line 39 of file pdtree.h.
Referenced by add_to_tree(), get_domain(), pdt_check_pd_node(), pdt_mi_list(), pdt_print_mi_node(), and pdt_print_node().
| #define PDT_NODE_SIZE pdt_char_list.len |
Definition at line 41 of file pdtree.h.
Referenced by add_to_tree(), get_domain(), pdt_check_pd_node(), pdt_free_node(), pdt_init_tree(), pdt_print_mi_node(), and pdt_print_node().
Definition at line 68 of file pdtree.h.
Referenced by add_to_tree(), get_domain(), pdt_mi_add(), and pdt_mi_list().
| typedef struct _pdt_node pdt_node_t |
Copyright (C) 2005 Voice Sistem SRL (Voice-System.RO)
This file is part of Kamailio, a free SIP server.
This file 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
This file 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
History: ------- 2005-01-25 first tree version (ramona)
| typedef struct _pdt_tree pdt_tree_t |
| int add_to_tree | ( | pdt_tree_t * | pt, | |
| str * | code, | |||
| str * | domain | |||
| ) |
Definition at line 80 of file pdtree.c.
References _pdt_node::child, _pdt_node::domain, _pdt_tree::head, len, _str::len, LM_ERR, NULL, PDT_MAX_DEPTH, PDT_NODE_SIZE, _str::s, shm_malloc(), and strpos.
Referenced by pdt_add_to_tree().
| str* get_domain | ( | pdt_tree_t * | pt, | |
| str * | code, | |||
| int * | plen | |||
| ) |
Definition at line 233 of file pdtree.c.
References _pdt_node::child, _pdt_node::domain, domain, _pdt_tree::head, _str::len, len, LM_ERR, NULL, PDT_MAX_DEPTH, PDT_NODE_SIZE, _str::s, and strpos.
Referenced by pdt_get_domain().
| int pdt_add_to_tree | ( | pdt_tree_t ** | dpt, | |
| str * | sdomain, | |||
| str * | code, | |||
| str * | domain | |||
| ) |
Definition at line 174 of file pdtree.c.
References add_to_tree(), LM_ERR, _pdt_tree::next, NULL, pdt_init_tree(), _str::s, _pdt_tree::sdomain, and str_strcmp().
Referenced by pdt_load_db().
| int pdt_check_pd | ( | pdt_tree_t * | pt, | |
| str * | sdomain, | |||
| str * | sp, | |||
| str * | sd | |||
| ) |
Definition at line 422 of file pdtree.c.
References _pdt_tree::head, _str::len, len, LM_ERR, _pdt_tree::next, NULL, pdt_check_pd_node(), pdt_code_buf, _str::s, and _pdt_tree::sdomain.
Referenced by pdt_load_db(), and pdt_mi_add().
| void pdt_free_tree | ( | pdt_tree_t * | pt | ) |
Definition at line 326 of file pdtree.c.
References _pdt_tree::head, _pdt_tree::next, NULL, pdt_free_node(), pdt_free_tree(), _str::s, _pdt_tree::sdomain, and shm_free.
Referenced by mod_destroy(), pdt_free_tree(), and pdt_load_db().
| str* pdt_get_domain | ( | pdt_tree_t * | pt, | |
| str * | sdomain, | |||
| str * | code, | |||
| int * | plen | |||
| ) |
Definition at line 274 of file pdtree.c.
References domain, get_domain(), len, LM_ERR, _pdt_tree::next, NULL, _str::s, _pdt_tree::sdomain, and str_strcmp().
Referenced by prefix2domain().
| pdt_tree_t* pdt_get_tree | ( | pdt_tree_t * | pl, | |
| str * | sdomain | |||
| ) |
Definition at line 150 of file pdtree.c.
References LM_ERR, _pdt_tree::next, NULL, _str::s, _pdt_tree::sdomain, and str_strcmp().
| pdt_tree_t* pdt_init_tree | ( | str * | sdomain | ) |
Definition at line 43 of file pdtree.c.
References _pdt_tree::head, _str::len, LM_ERR, NULL, PDT_NODE_SIZE, pt, _str::s, _pdt_tree::sdomain, shm_free, and shm_malloc().
Referenced by pdt_add_to_tree().
| int pdt_print_tree | ( | pdt_tree_t * | pt | ) |
Definition at line 363 of file pdtree.c.
References _pdt_tree::head, _str::len, len, LM_DBG, _pdt_tree::next, NULL, pdt_code_buf, pdt_print_node(), pdt_print_tree(), _str::s, and _pdt_tree::sdomain.
Referenced by mod_init(), and pdt_print_tree().
1.5.6