From 15e7389cf06af3e83d4a5d232d9409fc02002cd0 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 5 Aug 2010 07:10:56 +0800 Subject: mgcp: Prepare to have different port allocation strategies. --- openbsc/include/openbsc/mgcp.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'openbsc/include') diff --git a/openbsc/include/openbsc/mgcp.h b/openbsc/include/openbsc/mgcp.h index 9d0c60f33..e8d4bb02d 100644 --- a/openbsc/include/openbsc/mgcp.h +++ b/openbsc/include/openbsc/mgcp.h @@ -80,6 +80,19 @@ typedef int (*mgcp_change)(struct mgcp_config *cfg, int endpoint, int state); typedef int (*mgcp_policy)(struct mgcp_config *cfg, int endpoint, int state, const char *transactio_id); typedef int (*mgcp_reset)(struct mgcp_config *cfg); +#define PORT_ALLOC_STATIC 0 +#define PORT_ALLOC_DYNAMIC 1 + +/** + * This holds information on how to allocate ports + */ +struct mgcp_port_range { + int mode; + + /* pre-allocated from a base? */ + int base_port; +}; + struct mgcp_config { int source_port; char *local_ip; @@ -92,8 +105,9 @@ struct mgcp_config { char *audio_name; int audio_payload; int audio_loop; - int rtp_bts_base_port; - int rtp_net_base_port; + + struct mgcp_port_range bts_ports; + struct mgcp_port_range net_ports; int endp_dscp; /* spec handling */ -- cgit v1.2.3