diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-05-06 15:41:53 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-05-13 18:56:56 +0200 |
commit | 497611ae84038bd9d1fc6bd2bdbb47d9a9df97ba (patch) | |
tree | a13cd5ef9569543b3bda5a04cbfeb16b25f801be | |
parent | 2b89617aad68520264614dc21c05e93672b1c9ca (diff) |
osmux: Introduce mgcp_conn_rtp_is_osmux() helper
This is going to be useful to know if a conn is to use Osmux without
looking at implementation details. Currently we have some duplicated
information (type, osmux.state, etc.) which we may want to refactor
later. This will allow changing implementation details without caring
much about rest of code.
Change-Id: Ib5a239fdbc319bcb16317f5e959d9a724b7a444a
-rw-r--r-- | include/osmocom/mgcp/mgcp_internal.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index 82ff6c836..e9d5d2db3 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -312,6 +312,11 @@ void mgcp_rtp_annex_count(struct mgcp_endpoint *endp, struct mgcp_rtp_state *sta int mgcp_set_ip_tos(int fd, int tos); +/* 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; +} + enum { MGCP_DEST_NET = 0, MGCP_DEST_BTS, |