Revert "Revert "and added files""
[bcm963xx.git] / userapps / opensource / siproxd / src / rtpproxy.h
1 /*
2     Copyright (C) 2003-2005  Thomas Ries <tries@gmx.net>
3
4     This file is part of Siproxd.
5     
6     Siproxd is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10     
11     Siproxd is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15     
16     You should have received a copy of the GNU General Public License
17     along with Siproxd; if not, write to the Free Software
18     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
19 */
20
21 /* $Id: rtpproxy.h,v 1.11 2005/01/08 10:05:12 hb9xar Exp $ */
22
23 #define CALLIDNUM_SIZE  256
24 #define CALLIDHOST_SIZE 32
25 #define CLIENT_ID_SIZE  128
26 typedef struct {
27    int rtp_rx_sock;                             /* rx socket (0 -> free slot)*/
28    int rtp_tx_sock;                             /* tx socket */
29    char callid_number[CALLIDNUM_SIZE];          /* call ID */
30    char callid_host[CALLIDHOST_SIZE];           /*  --"--  */
31    char client_id[CLIENT_ID_SIZE];
32    int direction;                               /* Direction of RTP stream */
33    int media_stream_no;
34    struct in_addr local_ipaddr;                 /* local IP */
35    int local_port;                              /* local allocated port */
36    struct in_addr remote_ipaddr;                /* remote IP */
37    int remote_port;                             /* remote port */
38    time_t timestamp;                            /* last 'stream alive' TS */
39    int rtcp_rx_sock;                    /* rx socket (0 -> free slot)*/
40    int rtcp_tx_sock;                    /* tx socket */
41 } rtp_proxytable_t;
42
43 /*
44  * RTP relay
45  */
46 int  rtp_relay_init(void);
47 int  rtp_relay_start_fwd (osip_call_id_t *callid, char *client_id,
48                           int rtp_direction, int media_stream_no,
49                           struct in_addr local_ipaddr, int *local_port,
50                           struct in_addr remote_ipaddr, int remote_port);
51 int  rtp_relay_stop_fwd (int rtp_rx_sock, osip_call_id_t *callid, int rtp_direction, int nolock);