Change in osmo-e1d[master]: Introduce a #define for the maximum HDLC buffer size (264)

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
Sat Jan 1 14:39:45 UTC 2022


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

Change subject: Introduce a #define for the maximum HDLC buffer size (264)
......................................................................

Introduce a #define for the maximum HDLC buffer size (264)

The purpose of turning the magic number into a #define is to allow
clients to use it.

Change-Id: I9281a4cd85d79823d06860ffaaa09b6d67bc0de3
---
M include/osmocom/e1d/proto.h
M src/e1d.h
2 files changed, 5 insertions(+), 2 deletions(-)

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



diff --git a/include/osmocom/e1d/proto.h b/include/osmocom/e1d/proto.h
index 6457f14..3033f11 100644
--- a/include/osmocom/e1d/proto.h
+++ b/include/osmocom/e1d/proto.h
@@ -92,6 +92,7 @@
 #define E1DP_INVALID	0xff
 #define E1DP_DEFAULT_SOCKET "/tmp/osmo-e1d.ctl"
 
+#define E1DP_MAX_SIZE_HDLC	264
 
 struct osmo_e1dp_msg_hdr {
 	uint16_t magic;
diff --git a/src/e1d.h b/src/e1d.h
index e824f8f..af6c09e 100644
--- a/src/e1d.h
+++ b/src/e1d.h
@@ -30,6 +30,8 @@
 #include <osmocom/core/timer.h>
 #include <osmocom/vty/command.h>
 
+#include <osmocom/e1d/proto.h>
+
 enum e1d_vty_node {
 	E1D_NODE = _LAST_OSMOVTY_NODE + 1,
 	LINE_NODE
@@ -66,8 +68,8 @@
 		struct osmo_isdnhdlc_vars tx;
 		struct osmo_isdnhdlc_vars rx;
 
-		uint8_t rx_buf[264];
-		uint8_t tx_buf[264];
+		uint8_t rx_buf[E1DP_MAX_SIZE_HDLC];
+		uint8_t tx_buf[E1DP_MAX_SIZE_HDLC];
 		int tx_ofs;
 		int tx_len;
 	} hdlc;

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

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I9281a4cd85d79823d06860ffaaa09b6d67bc0de3
Gerrit-Change-Number: 26702
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
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/20220101/602ebdfb/attachment.htm>


More information about the gerrit-log mailing list