add mgcp_conn_rtp_type_names[]

First use in upcoming Ib89a6779e1d68c6600f00699d4303f6c0ee07132

Change-Id: If3d8bc68a3b26d3aa0ba7eedeab67b820889ed54
This commit is contained in:
Neels Hofmeyr 2023-11-01 21:29:30 +01:00
parent 2bdad960ff
commit c695e9f972
2 changed files with 12 additions and 0 deletions

View File

@ -49,6 +49,11 @@ enum mgcp_conn_rtp_type {
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) */

View File

@ -441,3 +441,10 @@ struct mgcp_conn *mgcp_conn_get_oldest(struct mgcp_endpoint *endp)
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" },
{}
};