neels has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-mgw/+/34941?usp=email )
Change subject: add mgcp_conn_rtp_type_names[]
......................................................................
add mgcp_conn_rtp_type_names[]
First use in upcoming Ib89a6779e1d68c6600f00699d4303f6c0ee07132
Change-Id: If3d8bc68a3b26d3aa0ba7eedeab67b820889ed54
---
M include/osmocom/mgcp/mgcp_conn.h
M src/libosmo-mgcp/mgcp_conn.c
2 files changed, 23 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/41/34941/1
diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h
index 7ac40ab..4f7b705 100644
--- a/include/osmocom/mgcp/mgcp_conn.h
+++ b/include/osmocom/mgcp/mgcp_conn.h
@@ -49,6 +49,11 @@
MGCP_RTP_OSMUX,
MGCP_RTP_IUUP,
};
+extern const struct value_string mgcp_conn_rtp_type_names[];
+static inline const char *mgcp_conn_rtp_type_name(enum mgcp_conn_rtp_type val)
+{
+ return get_value_string(mgcp_conn_rtp_type_names, val);
+}
/*! Connection type, specifies which member of the union "u" in mgcp_conn
* contains a useful connection description (currently only RTP) */
diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c
index 0ba10e5..afc9e4e 100644
--- a/src/libosmo-mgcp/mgcp_conn.c
+++ b/src/libosmo-mgcp/mgcp_conn.c
@@ -441,3 +441,10 @@
return llist_last_entry(&endp->conns, struct mgcp_conn, entry);
}
+
+const struct value_string mgcp_conn_rtp_type_names[] = {
+ { MGCP_RTP_DEFAULT, "rtp" },
+ { MGCP_RTP_OSMUX, "osmux" },
+ { MGCP_RTP_IUUP, "iuup" },
+ {}
+};
--
To view, visit
https://gerrit.osmocom.org/c/osmo-mgw/+/34941?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: If3d8bc68a3b26d3aa0ba7eedeab67b820889ed54
Gerrit-Change-Number: 34941
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange