summaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-09-07 13:39:07 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-16 15:32:32 +0100
commitaee3a12634d0013591b1c9f53702d00ab2cc6a6c (patch)
treeaeafac13ef9ae93de8e4edb1fd838bf7c4447123 /openbsc/include
parent7be6e7f37c41c2e12f04d857b42ba43dd2f8fe70 (diff)
libmgcp: add value strings for mgcp_connection_mode
Add file mgcp_common.c to implement the value strings for the mgcp_connection_mode. Add in a separate file because of the upcoming mgcpgw_client.c implementation, introducing a file that contains implementations commonly used in MGCP GW as well as its clients. Change-Id: I6fe365c4c89207f2172943cc456b508a207b1135
Diffstat (limited to 'openbsc/include')
-rw-r--r--openbsc/include/openbsc/mgcp.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/mgcp.h b/openbsc/include/openbsc/mgcp.h
index 12e0e9ce1..7cf83b27c 100644
--- a/openbsc/include/openbsc/mgcp.h
+++ b/openbsc/include/openbsc/mgcp.h
@@ -178,6 +178,13 @@ enum mgcp_connection_mode {
MGCP_CONN_LOOPBACK = 4 | MGCP_CONN_RECV_SEND,
};
+extern const struct value_string mgcp_connection_mode_strs[];
+
+static inline const char *mgcp_cmode_name(enum mgcp_connection_mode mode)
+{
+ return get_value_string(mgcp_connection_mode_strs, mode);
+}
+
struct mgcp_config {
int source_port;
char *local_ip;