diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2022-10-27 15:53:33 +0200 |
---|---|---|
committer | dexter <pmaier@sysmocom.de> | 2022-10-28 14:26:16 +0000 |
commit | c310bc6ea03353fbcebd5e77589365f90acf8cb5 (patch) | |
tree | 8e5cf7f4950f7385903d45aaa09d2052997441ae /include | |
parent | 79d2f44e65ecd68a9e200e266d7cca4a471a62af (diff) |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/bsc/pcuif_proto.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/osmocom/bsc/pcuif_proto.h b/include/osmocom/bsc/pcuif_proto.h index 4921fc38d..5084cb8f1 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 @@ struct gsm_pcu_if_info_ind { 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 { |