pdtree.h File Reference

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

Include dependency graph for pdtree.h:

This graph shows which files directly or indirectly include this file:

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)
strget_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)
strpdt_get_domain (pdt_tree_t *pt, str *sdomain, str *code, int *plen)
pdt_tree_tpdt_get_tree (pdt_tree_t *pl, str *sdomain)
pdt_tree_tpdt_init_tree (str *sdomain)
int pdt_print_tree (pdt_tree_t *pt)


Define Documentation

#define PDT_MAX_DEPTH   32

#define PDT_NODE_SIZE   pdt_char_list.len

#define strpos ( s,
 )     (strchr(s,c)-s)

Definition at line 68 of file pdtree.h.

Referenced by add_to_tree(), get_domain(), pdt_mi_add(), and pdt_mi_list().


Typedef Documentation

typedef struct _pdt_node pdt_node_t

Id
pdtree.h 4518 2008-07-28 15:39:28Z henningw

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


Function Documentation

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 
)

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 
)

void pdt_free_tree ( pdt_tree_t pt  ) 

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  ) 


Generated on Thu May 24 02:00:40 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6