[mgcp] Prepare to do MGCP over TCP and inside the bsc_msc_ip process

* Separate main process and protocol handling into two parts.
* Change the protocol handling to work with UDP and TCP connection
* This will allow to speak MGCP over TCP between the BSC MUX and
  the real BSC.
This commit is contained in:
Holger Hans Peter Freyther 2010-02-03 08:50:33 +01:00
parent 89f3cb8606
commit e0955029a1
4 changed files with 1133 additions and 1040 deletions

View File

@ -21,7 +21,8 @@
*
*/
unsigned int rtp_base_port = 4000;
#define RTP_PORT_DEFAULT 4000
extern unsigned int rtp_base_port;
/**
* Calculate the RTP audio port for the given multiplex
@ -42,7 +43,12 @@ unsigned int rtp_base_port = 4000;
* network and BTS.
*
*/
int rtp_calculate_port(int multiplex, int base)
static inline int rtp_calculate_port(int multiplex, int base)
{
return base + (multiplex * 2);
}
int mgcp_parse_config(const char *config_file, struct gsm_network *dummy_network);
int mgcp_handle_message(int fd, struct msgb *msg, struct sockaddr_in *source);
int mgcp_send_rsip(int fd, struct sockaddr_in *source);
int mgcp_vty_init(void);

View File

@ -38,7 +38,7 @@ ipaccess_config_LDADD = libbsc.a libmsc.a libbsc.a libvty.a -ldl -ldbi $(LIBCRYP
isdnsync_SOURCES = isdnsync.c
bsc_mgcp_SOURCES = mgcp/mgcp_main.c msgb.c talloc.c debug.c select.c timer.c telnet_interface.c
bsc_mgcp_SOURCES = mgcp/mgcp_main.c mgcp/mgcp_protocol.c msgb.c talloc.c debug.c select.c timer.c telnet_interface.c
bsc_mgcp_LDADD = libvty.a
ipaccess_proxy_SOURCES = ipaccess/ipaccess-proxy.c msgb.c select.c talloc.c debug.c timer.c

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff