mgcp_trunk: add value string for trunk type.

Change-Id: I634fb2a03744117e976430468ab5c57d50ab0089
This commit is contained in:
Philipp Maier 2021-07-09 10:24:33 +02:00
parent 97cae477fb
commit bd060c3c99
2 changed files with 10 additions and 0 deletions

View File

@ -13,6 +13,10 @@ enum mgcp_trunk_type {
MGCP_TRUNK_E1,
};
extern const struct value_string mgcp_trunk_type_strs[];
static inline const char *mgcp_trunk_type_strs_str(enum mgcp_trunk_type val)
{ return get_value_string(mgcp_trunk_type_strs, val); }
struct mgcp_trunk {
struct llist_head entry;

View File

@ -28,6 +28,12 @@
#include <osmocom/mgcp/mgcp_e1.h>
#include <osmocom/abis/e1_input.h>
const struct value_string mgcp_trunk_type_strs[] = {
{ MGCP_TRUNK_VIRTUAL, "virtual" },
{ MGCP_TRUNK_E1, "e1" },
{ 0, NULL }
};
/*! allocate trunk and add it (if required) to the trunk list.
* (called once at startup by VTY).
* \param[in] cfg mgcp configuration.