rtpengine.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /* $Id: nathelper.c 1808 2007-03-10 17:36:19Z bogdan_iancu $
  2. *
  3. * Copyright (C) 2003 Porta Software Ltd
  4. *
  5. * This file is part of Kamailio, a free SIP server.
  6. *
  7. * Kamailio is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version
  11. *
  12. * Kamailio is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. *
  21. * History:
  22. * ---------
  23. * 2007-04-13 splitted from nathelper.c (ancuta)
  24. */
  25. #ifndef _RTPENGINE_H
  26. #define _RTPENGINE_H
  27. #include "bencode.h"
  28. #include "../../str.h"
  29. struct rtpp_node {
  30. unsigned int idx; /* overall index */
  31. str rn_url; /* unparsed, deletable */
  32. int rn_umode;
  33. char *rn_address; /* substring of rn_url */
  34. int rn_disabled; /* found unaccessible? */
  35. unsigned rn_weight; /* for load balancing */
  36. unsigned int rn_recheck_ticks;
  37. int rn_rep_supported;
  38. int rn_ptl_supported;
  39. struct rtpp_node *rn_next;
  40. };
  41. struct rtpp_set{
  42. unsigned int id_set;
  43. unsigned weight_sum;
  44. unsigned int rtpp_node_count;
  45. int set_disabled;
  46. unsigned int set_recheck_ticks;
  47. struct rtpp_node *rn_first;
  48. struct rtpp_node *rn_last;
  49. struct rtpp_set *rset_next;
  50. };
  51. struct rtpp_set_head{
  52. struct rtpp_set *rset_first;
  53. struct rtpp_set *rset_last;
  54. };
  55. struct rtpp_set *get_rtpp_set(int set_id);
  56. int add_rtpengine_socks(struct rtpp_set * rtpp_list, char * rtpproxy);
  57. int init_rtpproxy_db(void);
  58. extern str rtpp_db_url;
  59. extern str rtpp_table_name;
  60. extern str rtpp_url_col;
  61. #endif