dexter has submitted this change. (
https://gerrit.osmocom.org/c/osmo-bsc/+/29901 )
Change subject: pcuif_proto: cosmetic: add constant PCU_IF_NUM_NSVC and replace magic
numbers
......................................................................
pcuif_proto: cosmetic: add constant PCU_IF_NUM_NSVC and replace magic numbers
The number of NSVCs is fixed but lets not use magic numbers to define
the sizes of the arrays that hold the config values. In osmo-pcu there
is already a define constant, so lets use a define here as well.
Change-Id: Ic94dadd3374c6db9323baca83b6b07b89e96768c
---
M include/osmocom/bsc/pcuif_proto.h
1 file changed, 7 insertions(+), 5 deletions(-)
Approvals:
dexter: Verified
pespin: Looks good to me, but someone else must approve
osmith: Looks good to me, approved
diff --git a/include/osmocom/bsc/pcuif_proto.h b/include/osmocom/bsc/pcuif_proto.h
index 4921fc3..5084cb8 100644
--- a/include/osmocom/bsc/pcuif_proto.h
+++ b/include/osmocom/bsc/pcuif_proto.h
@@ -62,6 +62,8 @@
#define PCU_IF_ADDR_TYPE_IPV4 0x04 /* IPv4 address */
#define PCU_IF_ADDR_TYPE_IPV6 0x29 /* IPv6 address */
+#define PCU_IF_NUM_NSVC 2
+
enum gsm_pcu_if_text_type {
PCU_VERSION,
PCU_OML_ALERT,
@@ -173,14 +175,14 @@
uint8_t initial_cs;
uint8_t initial_mcs;
/* NSVC */
- uint16_t nsvci[2];
- uint16_t local_port[2];
- uint16_t remote_port[2];
- uint8_t address_type[2];
+ uint16_t nsvci[PCU_IF_NUM_NSVC];
+ uint16_t local_port[PCU_IF_NUM_NSVC];
+ uint16_t remote_port[PCU_IF_NUM_NSVC];
+ uint8_t address_type[PCU_IF_NUM_NSVC];
union {
struct in_addr v4;
struct in6_addr v6;
- } remote_ip[2];
+ } remote_ip[PCU_IF_NUM_NSVC];
} __attribute__ ((packed));
struct gsm_pcu_if_act_req {
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bsc/+/29901
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ic94dadd3374c6db9323baca83b6b07b89e96768c
Gerrit-Change-Number: 29901
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged