aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-08-08 07:16:55 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-08-08 07:16:55 +0800
commit9002169dcd7251f9556ae5ed02797620cb6a1607 (patch)
treed000ff0c6ed794a6ae71fb8a286b2c213c0a904c /openbsc/include
parent43242f89474358119c29d29cb7403bcf36199057 (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. Conflicts: openbsc/src/nat/bsc_mgcp_utils.c
Diffstat (limited to 'openbsc/include')
-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;