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-05 07:10:56 +0800 |
commit | 15e7389cf06af3e83d4a5d232d9409fc02002cd0 (patch) | |
tree | 8e357703e73b5afc511a413fdbb9f654d36b444a /openbsc/include/openbsc | |
parent | a3b46c9ac06adbd16fb0d9a6ae1e31395adca85a (diff) |
mgcp: Prepare to have different port allocation strategies.
Diffstat (limited to 'openbsc/include/openbsc')
-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 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 */ |