diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-08-05 07:10:56 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-08-08 07:22:06 +0800 |
commit | f90c8c9d75e24431bddd7e405a217d6dcedf3b1b (patch) | |
tree | 389ad89a7e1bb883cf2b217be09265b6452acd2c /openbsc/include/openbsc/mgcp.h | |
parent | 08a366f11f141a0bc968464d57a65266d6f73807 (diff) |
mgcp: Prepare to have different port allocation strategies.
Diffstat (limited to 'openbsc/include/openbsc/mgcp.h')
-rw-r--r-- | openbsc/include/openbsc/mgcp.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/openbsc/include/openbsc/mgcp.h b/openbsc/include/openbsc/mgcp.h index 548470135..50898f730 100644 --- a/openbsc/include/openbsc/mgcp.h +++ b/openbsc/include/openbsc/mgcp.h @@ -79,6 +79,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 { /* common configuration */ int source_port; @@ -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; /* only used in forward mode */ |