00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef _RTPPROXY_H
00028 #define _RTPPROXY_H
00029
00030 #include "../../str.h"
00031
00032
00033 #define STR2IOVEC(sx, ix) do {(ix).iov_base = (sx).s; (ix).iov_len = (sx).len;} while(0)
00034 #define SZ2IOVEC(sx, ix) do {(ix).iov_base = (sx); (ix).iov_len = strlen(sx);} while(0)
00035
00036 struct rtpp_node {
00037 unsigned int idx;
00038 str rn_url;
00039 int rn_umode;
00040 char *rn_address;
00041 int rn_disabled;
00042 unsigned rn_weight;
00043 unsigned int rn_recheck_ticks;
00044 int rn_rep_supported;
00045 int rn_ptl_supported;
00046 struct rtpp_node *rn_next;
00047 };
00048
00049
00050 struct rtpp_set{
00051 unsigned int id_set;
00052 unsigned weight_sum;
00053 unsigned int rtpp_node_count;
00054 int set_disabled;
00055 unsigned int set_recheck_ticks;
00056 struct rtpp_node *rn_first;
00057 struct rtpp_node *rn_last;
00058 struct rtpp_set *rset_next;
00059 };
00060
00061
00062 struct rtpp_set_head{
00063 struct rtpp_set *rset_first;
00064 struct rtpp_set *rset_last;
00065 };
00066
00067
00068 struct rtpp_node *select_rtpp_node(str, int);
00069 char *send_rtpp_command(struct rtpp_node *, struct iovec *, int);
00070
00071 #endif