Change in osmo-e1d[master]: libosmo-e1d: Add value_string for msg_type and mode

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Tue Jun 30 06:02:01 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/19035 )

Change subject: libosmo-e1d: Add value_string for msg_type and mode
......................................................................

libosmo-e1d: Add value_string for msg_type and mode

Change-Id: I72807f8eb2dcfaaba2819969c7aa62a4a1a79966
---
M include/osmocom/e1d/proto.h
M src/proto.c
2 files changed, 20 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, approved
  tnt: Looks good to me, but someone else must approve



diff --git a/include/osmocom/e1d/proto.h b/include/osmocom/e1d/proto.h
index a3c94bb..f719cff 100644
--- a/include/osmocom/e1d/proto.h
+++ b/include/osmocom/e1d/proto.h
@@ -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 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[];
diff --git a/src/proto.c b/src/proto.c
index ee59ad1..6a32bb7 100644
--- a/src/proto.c
+++ b/src/proto.c
@@ -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)

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/19035
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I72807f8eb2dcfaaba2819969c7aa62a4a1a79966
Gerrit-Change-Number: 19035
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Assignee: tnt <tnt at 246tNt.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: tnt <tnt at 246tNt.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200630/483ba13b/attachment.htm>


More information about the gerrit-log mailing list