aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/mgcp_internal.h
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-08-05 01:34:51 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-08-05 06:10:54 +0800
commita17d701a708c157f26b91c6ab8960fa7db33e7cd (patch)
tree3661beadf93f71063b4adc6b448b5c4bdad70918 /openbsc/include/openbsc/mgcp_internal.h
parent8b5772ebe4d6844976324882004403de6327af83 (diff)
mgcp: Group the state for bts/net into a struct and have two instances
Group the data that each end (network/bts) have into a struct and use this struct throughout the sourcecode.
Diffstat (limited to 'openbsc/include/openbsc/mgcp_internal.h')
-rw-r--r--openbsc/include/openbsc/mgcp_internal.h27
1 files changed, 14 insertions, 13 deletions
diff --git a/openbsc/include/openbsc/mgcp_internal.h b/openbsc/include/openbsc/mgcp_internal.h
index 2d9629aa8..1ac8ad42f 100644
--- a/openbsc/include/openbsc/mgcp_internal.h
+++ b/openbsc/include/openbsc/mgcp_internal.h
@@ -49,6 +49,17 @@ struct mgcp_rtp_state {
int32_t timestamp_offset;
};
+struct mgcp_rtp_end {
+ /* statistics */
+ unsigned int packets;
+ struct in_addr addr;
+
+ /* in network byte order */
+ int rtp_port, rtcp_port;
+
+ int payload_type;
+};
+
struct mgcp_endpoint {
int ci;
char *callid;
@@ -56,9 +67,6 @@ struct mgcp_endpoint {
int conn_mode;
int orig_mode;
- int bts_payload_type;
- int net_payload_type;
-
/* the local rtp port we are binding to */
int rtp_port;
@@ -70,19 +78,12 @@ struct mgcp_endpoint {
struct bsc_fd local_rtp;
struct bsc_fd local_rtcp;
- struct in_addr remote;
- struct in_addr bts;
-
- /* in network byte order */
- int net_rtp, net_rtcp;
- int bts_rtp, bts_rtcp;
-
/* backpointer */
struct mgcp_config *cfg;
- /* statistics */
- unsigned int in_bts;
- unsigned int in_remote;
+ /* port status for bts/net */
+ struct mgcp_rtp_end bts_end;
+ struct mgcp_rtp_end net_end;
/* sequence bits */
struct mgcp_rtp_state net_state;