pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29568 )
Change subject: osmux: Unify rtp_conn osmux type into a single type ......................................................................
osmux: Unify rtp_conn osmux type into a single type
There's no need to separate between BSS and CN side nowadays, the different types are used nowehere. This separation dates from osmo-bsc-nat code days.
Change-Id: I65effeddf033eb1955553e8d659c593b4e67f7bc --- M include/osmocom/mgcp/mgcp_conn.h M src/libosmo-mgcp/mgcp_iuup.c M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_osmux.c M src/libosmo-mgcp/mgcp_protocol.c 5 files changed, 7 insertions(+), 11 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/68/29568/1
diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h index d9b38c0..7ac40ab 100644 --- a/include/osmocom/mgcp/mgcp_conn.h +++ b/include/osmocom/mgcp/mgcp_conn.h @@ -46,8 +46,7 @@ /* Specific rtp connection type (see struct mgcp_conn_rtp) */ enum mgcp_conn_rtp_type { MGCP_RTP_DEFAULT = 0, - MGCP_OSMUX_BSC, - MGCP_OSMUX_BSC_NAT, + MGCP_RTP_OSMUX, MGCP_RTP_IUUP, };
@@ -224,7 +223,7 @@
/* Was conn configured to handle Osmux? */ static inline bool mgcp_conn_rtp_is_osmux(const struct mgcp_conn_rtp *conn) { - return conn->type == MGCP_OSMUX_BSC || conn->type == MGCP_OSMUX_BSC_NAT; + return conn->type == MGCP_RTP_OSMUX; }
/* Was conn configured to handle Osmux? */ diff --git a/src/libosmo-mgcp/mgcp_iuup.c b/src/libosmo-mgcp/mgcp_iuup.c index 142b002..48e4ce7 100644 --- a/src/libosmo-mgcp/mgcp_iuup.c +++ b/src/libosmo-mgcp/mgcp_iuup.c @@ -342,8 +342,7 @@ return bridge_iuup_to_iuup_peer(conn_rtp_src, conn_rtp_dst, irp); case MGCP_RTP_DEFAULT: return bridge_iuup_to_rtp_peer(conn_rtp_src, conn_rtp_dst, irp); - case MGCP_OSMUX_BSC: - case MGCP_OSMUX_BSC_NAT: + case MGCP_RTP_OSMUX: default: LOGPCONN(conn_rtp_src->conn, DRTP, LOGL_ERROR, "Forward of IuUP payload to RTP connection type %u not supported!\n", diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c index a3c245a..5246160 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -1013,10 +1013,9 @@ "using mgcp_send() to forward data directly\n"); return mgcp_send(endp, proto == MGCP_PROTO_RTP, mc->from_addr, msg, conn_src, conn_dst); - case MGCP_OSMUX_BSC_NAT: - case MGCP_OSMUX_BSC: + case MGCP_RTP_OSMUX: LOGPENDP(endp, DRTP, LOGL_DEBUG, - "endpoint type is MGCP_OSMUX_BSC_NAT, " + "endpoint type is MGCP_RTP_OSMUX, " "using osmux_xfrm_to_osmux() to forward data through OSMUX\n"); return osmux_xfrm_to_osmux((char*)msgb_data(msg), msgb_length(msg), conn_dst); case MGCP_RTP_IUUP: diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c index 0e058c9..b548dc5 100644 --- a/src/libosmo-mgcp/mgcp_osmux.c +++ b/src/libosmo-mgcp/mgcp_osmux.c @@ -623,7 +623,7 @@
conn->osmux.local_cid = (uint8_t) osmux_cid; conn->osmux.local_cid_allocated = true; - conn->type = MGCP_OSMUX_BSC; + conn->type = MGCP_RTP_OSMUX; return osmux_cid; }
diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 711ca31..79fbc53 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -150,8 +150,7 @@
switch (conn->type) { case MGCP_RTP_DEFAULT: - case MGCP_OSMUX_BSC: - case MGCP_OSMUX_BSC_NAT: + case MGCP_RTP_OSMUX: case MGCP_RTP_IUUP: break; default: