libosmo-e1d: Add value_string for msg_type and mode

Change-Id: I72807f8eb2dcfaaba2819969c7aa62a4a1a79966
This commit is contained in:
Harald Welte 2020-06-28 16:51:11 +02:00
parent 946eaba82b
commit 0b621b43e7
2 changed files with 20 additions and 0 deletions

View File

@ -27,6 +27,7 @@
#include <stdint.h>
#include <osmocom/core/select.h>
#include <osmocom/core/utils.h>
/* E1DP_CMD_INTF_QUERY
@ -107,3 +108,6 @@ struct osmo_e1dp_ts_info {
struct msgb *osmo_e1dp_recv(struct osmo_fd *ofd, int *fd);
int osmo_e1dp_send(struct osmo_fd *ofd, struct msgb *msgb, int fd);
extern const struct value_string osmo_e1dp_msg_type_names[];
extern const struct value_string osmo_e1dp_ts_mode_names[];

View File

@ -37,6 +37,22 @@
#include "log.h"
const struct value_string osmo_e1dp_msg_type_names[] = {
{ E1DP_CMD_INTF_QUERY, "CMD_INTF_QUERY" },
{ E1DP_CMD_LINE_QUERY, "CMD_LINE_QUERY" },
{ E1DP_CMD_TS_QUERY, "CMD_TS_QUERY" },
{ E1DP_CMD_TS_OPEN, "CMD_TS_OPEN" },
{ E1DP_EVT_TYPE, "EVT_TYPE" },
{ E1DP_RESP_TYPE, "RESP_TYPE" },
{ E1DP_ERR_TYPE, "ERR_TYPE" },
{ 0, NULL }
};
const struct value_string osmo_e1dp_ts_mode_names[] = {
{ E1DP_TSMODE_OFF, "OFF" },
{ E1DP_TSMODE_RAW, "RAW" },
{ E1DP_TSMODE_HDLCFCS, "HDLC-FCS" },
{ 0, NULL }
};
struct msgb *
osmo_e1dp_recv(struct osmo_fd *ofd, int *fd)