diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-09-07 13:39:07 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-11-12 16:05:35 +0100 |
commit | b50af47d4291abd656a28e31a704d19b3e4413eb (patch) | |
tree | f211cd7bf1040e43164faaa12d1ca456585ed6bc /openbsc/include/openbsc | |
parent | 99b0e0ed6c2e05879ef25937df02bc378bd75c79 (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/openbsc')
-rw-r--r-- | openbsc/include/openbsc/mgcp.h | 7 |
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; |