- cmInetAddr((S8*)DU_IP_V4_ADDR, &ipv4_du);
- cmInetAddr((S8*)RIC_IP_V4_ADDR, &ipv4_ric);
-
- ricCfgParams.sctpParams.duPort = DU_PORT;
- ricCfgParams.sctpParams.ricPort = RIC_PORT;
+ ricCfgParams.sctpParams.numDu = 0;
+ numDu = &ricCfgParams.sctpParams.numDu;
+ while(*numDu < MAX_DU_SUPPORTED)
+ {
+ /* DU IP Address and Port*/
+ memset(&ipv4_du, 0, sizeof(uint32_t));
+ cmInetAddr((S8*)DU_IP_V4_ADDR[*numDu], &ipv4_du);
+ ricCfgParams.sctpParams.sctpAssoc[*numDu].duIpAddr.ipV4Addr = ipv4_du;
+ ricCfgParams.sctpParams.sctpAssoc[*numDu].duIpAddr.ipV6Pres = false;
+ ricCfgParams.sctpParams.sctpAssoc[*numDu].duPort = DU_SCTP_PORT[*numDu];
+
+ /* RIC IP Address and Port*/
+ memset(&ipv4_du, 0, sizeof(uint32_t));
+ cmInetAddr((S8*)RIC_IP_V4_ADDR, &ipv4_ric);
+ ricCfgParams.sctpParams.sctpAssoc[*numDu].ricIpAddr.ipV4Addr = ipv4_ric;
+ ricCfgParams.sctpParams.sctpAssoc[*numDu].ricIpAddr.ipV6Pres = false;
+ ricCfgParams.sctpParams.sctpAssoc[*numDu].ricPort = RIC_SCTP_PORT_TO_DU[*numDu];
+ (*numDu)++;
+ }