00001 /* 00002 * Domain module headers 00003 * 00004 * Copyright (C) 2002-2003 Juha Heinanen 00005 * 00006 * This file is part of sip-router, a free SIP server. 00007 * 00008 * sip-router is free software; you can redistribute it and/or modify it under 00009 * the terms of the GNU General Public License as published by the Free 00010 * Software Foundation; either version 2 of the License, or (at your option) 00011 * any later version 00012 * 00013 * sip-router is distributed in the hope that it will be useful, but WITHOUT 00014 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00015 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 00016 * more details. 00017 * 00018 * You should have received a copy of the GNU General Public License along 00019 * with this program; if not, write to the Free Software Foundation, Inc., 00020 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00021 */ 00022 00023 #ifndef _DOMAIN_MOD_H 00024 #define _DOMAIN_MOD_H 00025 00026 #include "../../lib/srdb2/db.h" 00027 #include "../../str.h" 00028 #include "../../usr_avp.h" 00029 #include "../../parser/msg_parser.h" 00030 #include "domain.h" 00031 00032 00033 /* 00034 * Module parameters variables 00035 */ 00036 extern int db_mode; /* Database usage mode: 0 = no cache, 00037 * 1 = * cache */ 00038 extern str domain_table; /* Domain table name */ 00039 extern str domain_col; /* Domain column name */ 00040 extern str did_col; /* Domain id col */ 00041 extern str flags_col; /* Flags column */ 00042 00043 /* 00044 * Table containing domain attributes (in form of AVPs) 00045 */ 00046 extern str domattr_table; /* Name of table containing domain attributes */ 00047 extern str domattr_did; /* Column containing domain id */ 00048 extern str domattr_name; /* Column containing name of attribute */ 00049 extern str domattr_type; /* Column containing type of attribute */ 00050 extern str domattr_value; /* Column containing value of attribute */ 00051 extern str domattr_flags; /* Column containing domain attribute flags */ 00052 00053 extern int load_domain_attrs; /* Turn on/off domain attributes */ 00054 00055 /* 00056 * Other module variables 00057 */ 00058 00059 extern struct hash_entry*** active_hash; /* Pointer to current hash table */ 00060 extern domain_t** domains_1; /* List of domains 1 */ 00061 extern domain_t** domains_2; /* List of domains 2 */ 00062 00063 extern struct hash_entry*** hash; /* Pointer to the current hash table */ 00064 extern struct hash_entry** hash_1; /* Hash table 1 */ 00065 extern struct hash_entry** hash_2; /* Hash table 2 */ 00066 00067 extern db_cmd_t* load_domains_cmd, *get_did_cmd, *load_attrs_cmd; 00068 00069 int reload_domain_list(void); 00070 00071 #endif /* _DOMAIN_MOD_H */
1.7.1