uid_domain_mod.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * Domain module headers
  3. *
  4. * Copyright (C) 2002-2003 Juha Heinanen
  5. *
  6. * This file is part of sip-router, a free SIP server.
  7. *
  8. * sip-router is free software; you can redistribute it and/or modify it under
  9. * the terms of the GNU General Public License as published by the Free
  10. * Software Foundation; either version 2 of the License, or (at your option)
  11. * any later version
  12. *
  13. * sip-router is distributed in the hope that it will be useful, but WITHOUT
  14. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  15. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  16. * more details.
  17. *
  18. * You should have received a copy of the GNU General Public License along
  19. * with this program; if not, write to the Free Software Foundation, Inc.,
  20. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  21. */
  22. #ifndef _UID_DOMAIN_MOD_H
  23. #define _UID_DOMAIN_MOD_H
  24. #include "../../lib/srdb2/db.h"
  25. #include "../../str.h"
  26. #include "../../usr_avp.h"
  27. #include "../../parser/msg_parser.h"
  28. #include "domain.h"
  29. /*
  30. * Module parameters variables
  31. */
  32. extern int db_mode; /* Database usage mode: 0 = no cache,
  33. * 1 = * cache */
  34. extern str domain_table; /* Domain table name */
  35. extern str domain_col; /* Domain column name */
  36. extern str did_col; /* Domain id col */
  37. extern str flags_col; /* Flags column */
  38. /*
  39. * Table containing domain attributes (in form of AVPs)
  40. */
  41. extern str domattr_table; /* Name of table containing domain attributes */
  42. extern str domattr_did; /* Column containing domain id */
  43. extern str domattr_name; /* Column containing name of attribute */
  44. extern str domattr_type; /* Column containing type of attribute */
  45. extern str domattr_value; /* Column containing value of attribute */
  46. extern str domattr_flags; /* Column containing domain attribute flags */
  47. extern int load_domain_attrs; /* Turn on/off domain attributes */
  48. /*
  49. * Other module variables
  50. */
  51. extern struct hash_entry*** active_hash; /* Pointer to current hash table */
  52. extern domain_t** domains_1; /* List of domains 1 */
  53. extern domain_t** domains_2; /* List of domains 2 */
  54. extern struct hash_entry*** hash; /* Pointer to the current hash table */
  55. extern struct hash_entry** hash_1; /* Hash table 1 */
  56. extern struct hash_entry** hash_2; /* Hash table 2 */
  57. extern db_cmd_t* load_domains_cmd, *get_did_cmd, *load_attrs_cmd;
  58. int reload_domain_list(void);
  59. #endif /* _DOMAIN_MOD_H */