rtpproxy.h

来自「简单的基于SIP的会话边界控制器」· C头文件 代码 · 共 38 行

H
38
字号

#ifndef _RTPPROXY_H
#define _RTPPROXY_H

#define CALLIDNUM_SIZE	256
#define CALLIDHOST_SIZE	128
#define CLIENT_ID_SIZE	128

typedef struct {
   int  rtp_rx_sock;				/* rx socket (0 -> free slot)*/
   int  rtp_tx_sock;				/* tx socket */
   char callid_number[CALLIDNUM_SIZE];		/* call ID */
   char callid_host[CALLIDHOST_SIZE];		/*  --"--  */
   char client_id[CLIENT_ID_SIZE];
   int  direction;				/* Direction of RTP stream */
   int  media_stream_no;
   struct in_addr local_ipaddr;			/* local IP */
   int  local_port;				/* local allocated port */
   struct in_addr remote_ipaddr;		/* remote IP */
   int  remote_port;				/* remote port */
   struct in_addr nat_ipaddr;     /* ip address after nat translation */
   int nat_port;                           /* port after nat translation */
   time_t timestamp;				/* last 'stream alive' TS */
   int  opposite_entry;				/* 1 based!! index of opposite entry */
} rtp_proxytable_t;

/*
 * RTP relay
 */
int  rtp_relay_init( void );
int  rtp_relay_start_fwd (osip_call_id_t *callid, char *client_id,
                          int rtp_direction, int media_stream_no,
		          struct in_addr local_ipaddr, int *local_port,
                          struct in_addr remote_ipaddr, int remote_port);
int  rtp_relay_stop_fwd (osip_call_id_t *callid, int rtp_direction,int media_stream_no, int nolock);

#endif                        

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?