00001 /* 00002 * $Id: lcr_mod.h 5095 2008-10-19 08:42:56Z juhe $ 00003 * 00004 * Various lcr related functions 00005 * 00006 * Copyright (C) 2005-2008 Juha Heinanen 00007 * 00008 * This file is part of Kamailio, a free SIP server. 00009 * 00010 * Kamailio is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version 00014 * 00015 * Kamailio is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU General Public License 00021 * along with this program; if not, write to the Free Software 00022 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00023 * 00024 * History: 00025 * -------- 00026 * 2005-02-06: created by jh 00027 */ 00028 00029 00030 #ifndef LCR_MOD_H 00031 #define LCR_MOD_H 00032 00033 #include <stdio.h> 00034 #include <pcre.h> 00035 #include "../../mi/mi.h" 00036 #include "../../locking.h" 00037 00038 #define MAX_PREFIX_LEN 32 00039 #define MAX_URI_LEN 256 00040 00041 struct lcr_info { 00042 char prefix[MAX_PREFIX_LEN + 1]; 00043 unsigned short prefix_len; 00044 char from_uri[MAX_URI_LEN + 1]; 00045 unsigned short from_uri_len; 00046 pcre *from_uri_re; 00047 unsigned int grp_id; 00048 unsigned short first_gw; /* gw table index of first gw in gw's group */ 00049 unsigned short priority; 00050 struct lcr_info *next; 00051 }; 00052 00053 extern unsigned int lcr_hash_size_param; 00054 00055 extern gen_lock_t *reload_lock; 00056 00057 int mi_print_gws(struct mi_node* rpl); 00058 int mi_print_lcrs(struct mi_node* rpl); 00059 int reload_gws_and_lcrs(void); 00060 00061 #endif /* LCR_MOD_H */
1.5.6