lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

  • 1 participants
  • 97203 discussions
[XL] Change in osmo-ttcn3-hacks[master]: Introduce scp testsuite
by osmith 27 Nov '26

27 Nov '26
Attention is currently required from: pespin. osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/44180?usp=email ) Change subject: Introduce scp testsuite ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/44180?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I594d71ee90e9126489856e9fbb2dd77e55214553 Gerrit-Change-Number: 44180 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 27 Nov 2026 07:51:20 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: 5G NFs: Fix wrong User-Agent formatting
by osmith 27 Nov '26

27 Nov '26
Attention is currently required from: pespin. osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/44166?usp=email ) Change subject: 5G NFs: Fix wrong User-Agent formatting ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/44166?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I9ef6cc7129553b3f5e8736ed291fc3023b8ec5f7 Gerrit-Change-Number: 44166 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 27 Nov 2026 07:40:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XL] Change in osmo-ttcn3-hacks[master]: Introduce scp testsuite
by fixeria 26 Nov '26

26 Nov '26
Attention is currently required from: osmith, pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/44180?usp=email ) Change subject: Introduce scp testsuite ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/44180?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I594d71ee90e9126489856e9fbb2dd77e55214553 Gerrit-Change-Number: 44180 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Thu, 26 Nov 2026 23:42:43 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: 5G NFs: Fix wrong User-Agent formatting
by fixeria 26 Nov '26

26 Nov '26
Attention is currently required from: osmith, pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/44166?usp=email ) Change subject: 5G NFs: Fix wrong User-Agent formatting ...................................................................... Patch Set 1: Code-Review+1 (1 comment) File nrf/ConnHdlr.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/44166/comment/618bab49_1981… : PS1, Line 130: UDM Just to be sure: is the NF -> UDM change intentional? -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/44166?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I9ef6cc7129553b3f5e8736ed291fc3023b8ec5f7 Gerrit-Change-Number: 44166 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Thu, 26 Nov 2026 23:30:49 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in osmo-remsim[master]: bankd: fix hh_ext pointer arithmetic in worker_transceive_loop()
by fixeria 26 Nov '26

26 Nov '26
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/44183?usp=email ) Change subject: bankd: fix hh_ext pointer arithmetic in worker_transceive_loop() ...................................................................... bankd: fix hh_ext pointer arithmetic in worker_transceive_loop() The pointer to the IPA extension header was calculated as follows: hh_ext = (struct ipaccess_head_ext *) buf + sizeof(*hh); Due to the operator precedence, 'buf' is casted first, so the offset is scaled by sizeof(struct ipaccess_head_ext) rather than being added in bytes. This happens to work only because that struct is 1 byte in size. Point hh_ext to the data following the IPA header instead. No functional change. Change-Id: Ib3675125b4e30cb2d59c799e68167753bef2358c --- M src/bankd/bankd_main.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/83/44183/1 diff --git a/src/bankd/bankd_main.c b/src/bankd/bankd_main.c index d04b468..70aa9f9 100644 --- a/src/bankd/bankd_main.c +++ b/src/bankd/bankd_main.c @@ -1028,7 +1028,7 @@ return 0; } - hh_ext = (struct ipaccess_head_ext *) buf + sizeof(*hh); + hh_ext = (struct ipaccess_head_ext *) hh->data; if (data_len < sizeof(*hh_ext)) { LOGW(worker, "Received short message\n"); return -5; -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/44183?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Ib3675125b4e30cb2d59c799e68167753bef2358c Gerrit-Change-Number: 44183 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-remsim[master]: bankd: fix handling of short reads in blocking_ipa_read()
by fixeria 26 Nov '26

26 Nov '26
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/44182?usp=email ) Change subject: bankd: fix handling of short reads in blocking_ipa_read() ...................................................................... bankd: fix handling of short reads in blocking_ipa_read() blocking_ipa_read() calls recv() once for the IPA header and once for the payload, and treats any short read as an error. However, TCP is a stream protocol and gives no guarantee that a message is delivered by a single recv() call: both the header and the payload may arrive split into several chunks. In this case the client connection would be torn down for no good reason. Add blocking_recv_exact(), which keeps calling recv() until the requested amount of bytes has been received, the peer has closed the connection, or an error occurs. Change-Id: Ibba2002a1cb9b3d84d294151de13056c5d1cd136 --- M src/bankd/bankd_main.c 1 file changed, 31 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/82/44182/1 diff --git a/src/bankd/bankd_main.c b/src/bankd/bankd_main.c index fdd2865..d04b468 100644 --- a/src/bankd/bankd_main.c +++ b/src/bankd/bankd_main.c @@ -639,6 +639,33 @@ } +/* blocking recv of exactly 'len' bytes from the client socket. Returns 'len' on + * success, a smaller non-negative value if the peer closed the connection, -23 if + * the worker got unmapped meanwhile, or a negative value on error. */ +static int blocking_recv_exact(struct bankd_worker *worker, uint8_t *buf, unsigned int len) +{ + unsigned int received = 0; + int rc; + + /* we use 'recv' and not 'read' below, as 'recv' will always fail with -EINTR + * in case of a signal being received */ + + while (received < len) { + rc = recv(worker->client.fd, buf + received, len - received, 0); + if (rc == -1 && errno == EINTR) { + if (worker->state == BW_ST_CONN_CLIENT_UNMAPPED) + return -23; + continue; + } else if (rc < 0) + return rc; + else if (rc == 0) + break; /* connection closed by peer */ + received += rc; + } + + return received; +} + static int blocking_ipa_read(struct bankd_worker *worker, uint8_t *buf, unsigned int buf_size) { struct ipaccess_head *hh; @@ -650,17 +677,9 @@ hh = (struct ipaccess_head *) buf; - /* we use 'recv' and not 'read' below, as 'recv' will always fail with -EINTR - * in case of a signal being received */ - -restart_hdr: /* 1) blocking recv from the socket (IPA header) */ - rc = recv(worker->client.fd, buf, sizeof(*hh), 0); - if (rc == -1 && errno == EINTR) { - if (worker->state == BW_ST_CONN_CLIENT_UNMAPPED) - return -23; - goto restart_hdr; - } else if (rc < 0) + rc = blocking_recv_exact(worker, buf, sizeof(*hh)); + if (rc < 0) return rc; else if (rc < sizeof(*hh)) return -2; @@ -673,14 +692,9 @@ } needed = len; //- sizeof(*hh); -restart_body: /* 2) blocking recv from the socket (payload) */ - rc = recv(worker->client.fd, buf+sizeof(*hh), needed, 0); - if (rc == -1 && errno == EINTR) { - if (worker->state == BW_ST_CONN_CLIENT_UNMAPPED) - return -23; - goto restart_body; - } else if (rc < 0) + rc = blocking_recv_exact(worker, buf + sizeof(*hh), needed); + if (rc < 0) return rc; else if (rc < needed) return -3; -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/44182?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Ibba2002a1cb9b3d84d294151de13056c5d1cd136 Gerrit-Change-Number: 44182 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-remsim[master]: bankd: fix stack buffer overflow in blocking_ipa_read()
by fixeria 26 Nov '26

26 Nov '26
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/44181?usp=email ) Change subject: bankd: fix stack buffer overflow in blocking_ipa_read() ...................................................................... bankd: fix stack buffer overflow in blocking_ipa_read() worker_transceive_loop() passes a 65536 byte buffer to blocking_ipa_read(), which reads the 3 byte IPA header and then receives as many bytes as indicated by its 16 bit length field into the remaining space, without checking whether they actually fit. A length of 65534 or 65535 makes recv() write up to 2 bytes past the end of the on-stack buffer. This can be triggered by any TCP peer, even before it has identified itself. Check that the whole IPA message fits into the given buffer and bail out otherwise. Change-Id: Ib4dc4d3cdc3e17ec0724caaafc4e6f855a6a931a --- M src/bankd/bankd_main.c 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/81/44181/1 diff --git a/src/bankd/bankd_main.c b/src/bankd/bankd_main.c index c85f678..fdd2865 100644 --- a/src/bankd/bankd_main.c +++ b/src/bankd/bankd_main.c @@ -666,6 +666,11 @@ return -2; len = ntohs(hh->len); + if (sizeof(*hh) + len > buf_size) { + LOGW(worker, "IPA message too long (%u + %u > %u bytes)\n", + (unsigned int) sizeof(*hh), len, buf_size); + return -8; + } needed = len; //- sizeof(*hh); restart_body: -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/44181?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: Ib4dc4d3cdc3e17ec0724caaafc4e6f855a6a931a Gerrit-Change-Number: 44181 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-remsim[master]: bankd: fix handling of partial writes in worker_send_rspro()
by fixeria 26 Nov '26

26 Nov '26
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/44184?usp=email ) Change subject: bankd: fix handling of partial writes in worker_send_rspro() ...................................................................... bankd: fix handling of partial writes in worker_send_rspro() worker_send_rspro() calls write() once and treats anything other than a complete write as an error. Even on a blocking socket, write() may transfer less than requested, e.g. if it gets interrupted by a signal (such as SIGMAPDEL or SIGMAPADD) after some data has already been sent. Bailing out in this case leaves a truncated IPA message on the wire. Keep calling write() until the whole message has been sent, retrying on EINTR, and only fail on real errors. While at it, make the error message more informative. Change-Id: I2c1675485404ecedb39f9ca25c234623c71cddf5 --- M src/bankd/bankd_main.c 1 file changed, 15 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/84/44184/1 diff --git a/src/bankd/bankd_main.c b/src/bankd/bankd_main.c index 70aa9f9..5873446 100644 --- a/src/bankd/bankd_main.c +++ b/src/bankd/bankd_main.c @@ -705,6 +705,7 @@ static int worker_send_rspro(struct bankd_worker *worker, RsproPDU_t *pdu) { struct msgb *msg = rspro_enc_msg(pdu); + unsigned int len, written = 0; int rc; if (!msg) { @@ -718,14 +719,21 @@ ipa_prepend_header_ext(msg, IPAC_PROTO_EXT_RSPRO); ipa_prepend_header(msg, IPAC_PROTO_OSMO); - /* actually send it through the socket */ - rc = write(worker->client.fd, msgb_data(msg), msgb_length(msg)); - if (rc == msgb_length(msg)) - rc = 0; - else { - LOGW(worker, "error during write: %d != %d\n", rc, msgb_length(msg)); - rc = -1; + /* actually send it through the socket; a blocking write() may still + * transfer less than requested, e.g. if interrupted by a signal */ + len = msgb_length(msg); + while (written < len) { + rc = write(worker->client.fd, msgb_data(msg) + written, len - written); + if (rc == -1 && errno == EINTR) + continue; + if (rc <= 0) { + LOGW(worker, "error during write (%u of %u bytes written): %s\n", + written, len, rc < 0 ? strerror(errno) : "no progress"); + break; + } + written += rc; } + rc = (written == len) ? 0 : -1; msgb_free(msg); -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/44184?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I2c1675485404ecedb39f9ca25c234623c71cddf5 Gerrit-Change-Number: 44184 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[XL] Change in osmo-ttcn3-hacks[master]: Introduce scp testsuite
by pespin 26 Nov '26

26 Nov '26
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/44180?usp=email ) Change subject: Introduce scp testsuite ...................................................................... Introduce scp testsuite Related: SYS#7073 Change-Id: I594d71ee90e9126489856e9fbb2dd77e55214553 --- M Makefile A library/TS29510_Nnrf_NFDiscovery_Templates.ttcn M library/TS29510_Nnrf_NFManagement_Templates.ttcn A scp/ConnHdlr.ttcn A scp/README.md A scp/SCP_Tests.cfg A scp/SCP_Tests.default A scp/SCP_Tests.ttcn A scp/expected-results.xml A scp/gen_links.sh A scp/open5gs-scp.yaml A scp/regen_makefile.sh A scp/testenv.cfg A scp/testsrcdir.cfg 14 files changed, 1,508 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/80/44180/1 diff --git a/Makefile b/Makefile index 40bbe2c..ab42a73 100644 --- a/Makefile +++ b/Makefile @@ -52,6 +52,7 @@ remsim \ s1gw \ sccp \ + scp \ selftest \ sepp \ sgsn \ diff --git a/library/TS29510_Nnrf_NFDiscovery_Templates.ttcn b/library/TS29510_Nnrf_NFDiscovery_Templates.ttcn new file mode 100644 index 0000000..939eba0 --- /dev/null +++ b/library/TS29510_Nnrf_NFDiscovery_Templates.ttcn @@ -0,0 +1,612 @@ +module TS29510_Nnrf_NFDiscovery_Templates { + +import from JSON_Generic all; +import from TS29510_Nnrf_NFDiscovery all; + +/* 6.2 Nnrf_NFDiscovery Service API */ +const charstring c_Nnrf_DISC_path_api_prefix := "/nnrf-disc/v1"; + +const charstring c_Nnrf_DISC_path_nf_instances +:= c_Nnrf_DISC_path_api_prefix & "/nf-instances"; + +template (present) NFType1 +tr_NFType1(template (present) NFType1_enum enum_val := ?) := { + enum_val := enum_val +} +template (value) NFType1 +ts_NFType1(template (value) NFType1_enum enum_val) := { + enum_val := enum_val +} + +template (value) ServiceName1 +ts_ServiceName1(template (value) ServiceName1_enum enum_val) := { + enum_val := enum_val +} + +template (value) NFStatus1 +ts_NFStatus1(template (value) NFStatus1_enum enum_val) := { + enum_val := enum_val +} + +template (value) NFServiceVersion1 +ts_NFServiceVersion1(template (value) charstring apiVersionInUri, + template (value) charstring apiFullVersion, + template (omit) DateTime expiry := omit) := { + apiVersionInUri := apiVersionInUri, + apiFullVersion := apiFullVersion, + expiry := expiry +} + +template (value) UriScheme1 +ts_UriScheme1(template (value) UriScheme1_enum enum_val) := { + enum_val := enum_val +} + +template (value) NFServiceStatus1 +ts_NFServiceStatus1(template (value) NFServiceStatus1_enum enum_val) := { + enum_val := enum_val +} + +template (value) SearchResult1 +ts_SearchResult1(template (value) integer validityPeriod, + template (value) TS29510_Nnrf_NFDiscovery.SearchResult1.nfInstances nfInstances, + template (omit) TS29510_Nnrf_NFDiscovery.SearchResult1.completeNfInstances completeNfInstances := omit, + template (omit) charstring searchId := omit, + template (omit) Uint321 numNfInstComplete := omit, + template (omit) PreferredSearch1 preferredSearch := omit, + template (omit) SupportedFeatures1 nrfSupportedFeatures := omit, + template (omit) TS29510_Nnrf_NFDiscovery.SearchResult1.nfInstanceList nfInstanceList := omit, + template (omit) SearchResultInfo1 searchResultInfo := omit, + template (omit) boolean alteredPriorityInd := omit, + template (omit) NoProfileMatchInfo1 noProfileMatchInfo := omit, + template (omit) record of charstring ignoredQueryParams := omit, + template (omit) boolean indComWithDelDiscReq := omit, + template (omit) boolean indComWoDelDiscReq := omit, + template (omit) IndComAddInfo1 indComAddInfo := omit) := { + validityPeriod := validityPeriod, + nfInstances := nfInstances, + completeNfInstances := completeNfInstances, + searchId := searchId, + numNfInstComplete := numNfInstComplete, + preferredSearch := preferredSearch, + nrfSupportedFeatures := nrfSupportedFeatures, + nfInstanceList := nfInstanceList, + searchResultInfo := searchResultInfo, + alteredPriorityInd := alteredPriorityInd, + noProfileMatchInfo := noProfileMatchInfo, + ignoredQueryParams := ignoredQueryParams, + indComWithDelDiscReq := indComWithDelDiscReq, + indComWoDelDiscReq := indComWoDelDiscReq, + indComAddInfo := indComAddInfo +} + + +type TS29510_Nnrf_NFDiscovery.NFProfile1.collocatedNfInstances CollocatedNfInstancesList; +type TS29510_Nnrf_NFDiscovery.NFProfile1.plmnList PlmnList; +type TS29510_Nnrf_NFDiscovery.NFProfile1.snpnList SnpnList; +type TS29510_Nnrf_NFDiscovery.NFProfile1.sNssais SNssaisList; +type TS29510_Nnrf_NFDiscovery.NFProfile1.perPlmnSnssaiList PerPlmnSnssaiList; +type TS29510_Nnrf_NFDiscovery.NFProfile1.ipv4Addresses Ipv4Addr1List; +type TS29510_Nnrf_NFDiscovery.NFProfile1.ipv6Addresses Ipv6Addresses; +type TS29510_Nnrf_NFDiscovery.NFProfile1.allowedPlmns AllowedPlmnsList; +type TS29510_Nnrf_NFDiscovery.NFProfile1.allowedSnpns AllowedSnpnsList; +type TS29510_Nnrf_NFDiscovery.NFProfile1.allowedNfTypes AllowedNfTypes; +type TS29510_Nnrf_NFDiscovery.NFProfile1.allowedNssais AllowedNssais; +type TS29510_Nnrf_NFDiscovery.NFProfile1.allowedRuleSet AllowedRuleSet; +type TS29510_Nnrf_NFDiscovery.NFProfile1.extLocality ExtLocalityMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.udrInfoList UdrInfoListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.udmInfoList UdmInfoListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.ausfInfoList AusfInfoListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.amfInfoList AmfInfoListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.smfInfoList SmfInfoListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.upfInfoList UpfInfoListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.pcfInfoList PcfInfoListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.bsfInfoList BsfInfoListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.chfInfoList ChfInfoListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.udsfInfoList UdsfInfoListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.nwdafInfoList NwdaInfoListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.pcscfInfoList PcscfInfoListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.hssInfoList HssInfoListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.nfServices NFService1List; +type TS29510_Nnrf_NFDiscovery.NFProfile1.nfServiceList NfServiceListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.defaultNotificationSubscriptions DefaultNotificationSubscription1List; +type TS29510_Nnrf_NFDiscovery.NFProfile1.nfSetIdList NfSetIdList; +type TS29510_Nnrf_NFDiscovery.NFProfile1.nfSetRecoveryTimeList NfSetRecoveryTimeListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.serviceSetRecoveryTimeList ServiceSetRecoveryTimeListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.supportedVendorSpecificFeatures SupportedVendorSpecificFeatures; +type TS29510_Nnrf_NFDiscovery.NFProfile1.aanfInfoList AanfInfoListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.easdfInfoList EasdfInfoListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.nsacfInfoList NsacfInfoListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.mbSmfInfoList MbSmfInfoListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.tsctsfInfoList TsctsfInfoListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.mbUpfInfoList MbUpfInfoListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.hniList HniList; +type TS29510_Nnrf_NFDiscovery.NFProfile1.dcsfInfoList DcsfInfoListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.mrfInfoList MrfInfoListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.mrfpInfoList MrfpInfoListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.mfInfoList MfInfoListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.adrfInfoList AdrfInfoListMap; +type TS29510_Nnrf_NFDiscovery.NFProfile1.aiotfInfoList AiotfInfoListMap; +template (present) NFProfile1 +tr_NFProfile1(template (present) NfInstanceId1 nfInstanceId := ?, + template charstring nfInstanceName := *, + template (present) NFType1 nfType := ?, + template (present) NFStatus1 nfStatus := ?, + template CollocatedNfInstancesList collocatedNfInstances := *, + template PlmnList plmnList := *, + template SnpnList snpnList := *, + template SNssaisList sNssais := *, + template PerPlmnSnssaiList perPlmnSnssaiList := *, + template record of charstring nsiList := *, + template Fqdn1 fqdn := *, + template Fqdn1 interPlmnFqdn := *, + template Ipv4Addr1List ipv4Addresses := *, + template Ipv6Addresses ipv6Addresses := *, + template AllowedPlmnsList allowedPlmns := *, + template AllowedSnpnsList allowedSnpns := *, + template AllowedNfTypes allowedNfTypes := *, + template record of charstring allowedNfDomains := *, + template AllowedNssais allowedNssais := *, + template AllowedRuleSet allowedRuleSet := *, + template integer priority := *, + template integer capacity := *, + template integer load := *, + template DateTime2 loadTimeStamp := *, + template charstring locality := *, + template ExtLocalityMap extLocality := *, + template UdrInfo1 udrInfo := *, + template UdrInfoListMap udrInfoList := *, + template UdmInfo1 udmInfo := *, + template UdmInfoListMap udmInfoList := *, + template AusfInfo1 ausfInfo := *, + template AusfInfoListMap ausfInfoList := *, + template AmfInfo1 amfInfo := *, + template AmfInfoListMap amfInfoList := *, + template SmfInfo1 smfInfo := *, + template SmfInfoListMap smfInfoList := *, + template UpfInfo1 upfInfo := *, + template UpfInfoListMap upfInfoList := *, + template PcfInfo1 pcfInfo := *, + template PcfInfoListMap pcfInfoList := *, + template BsfInfo1 bsfInfo := *, + template BsfInfoListMap bsfInfoList := *, + template ChfInfo1 chfInfo := *, + template ChfInfoListMap chfInfoList := *, + template NefInfo1 nefInfo := *, + template UdsfInfo1 udsfInfo := *, + template UdsfInfoListMap udsfInfoList := *, + template NwdafInfo1 nwdafInfo := *, + template NwdaInfoListMap nwdafInfoList := *, + template PcscfInfoListMap pcscfInfoList := *, + template HssInfoListMap hssInfoList := *, + template JSON_Generic.JSON_generic_val customInfo := *, + template DateTime2 recoveryTime := *, + template boolean nfServicePersistence := *, + template NFService1List nfServices := *, + template NfServiceListMap nfServiceList := *, + template DefaultNotificationSubscription1List defaultNotificationSubscriptions := *, + template LmfInfo1 lmfInfo := *, + template GmlcInfo1 gmlcInfo := *, + template NfSetIdList nfSetIdList := *, + template record of charstring servingScope := *, + template boolean lcHSupportInd := *, + template boolean olcHSupportInd := *, + template NfSetRecoveryTimeListMap nfSetRecoveryTimeList := *, + template ServiceSetRecoveryTimeListMap serviceSetRecoveryTimeList := *, + template record of charstring scpDomains := *, + template ScpInfo1 scpInfo := *, + template SeppInfo1 seppInfo := *, + template VendorId1 vendorId := *, + template SupportedVendorSpecificFeatures supportedVendorSpecificFeatures := *, + template AanfInfoListMap aanfInfoList := *, + template MfafInfo1 mfafInfo := *, + template EasdfInfoListMap easdfInfoList := *, + template DccfInfo1 dccfInfo := *, + template NsacfInfoListMap nsacfInfoList := *, + template MbSmfInfoListMap mbSmfInfoList := *, + template TsctsfInfoListMap tsctsfInfoList := *, + template MbUpfInfoListMap mbUpfInfoList := *, + template TrustAfInfo1 trustAfInfo := *, + template NssaafInfo1 nssaafInfo := *, + template HniList hniList := *, + template IwmscInfo1 iwmscInfo := *, + template MnpfInfo1 mnpfInfo := *, + template SmsfInfo1 smsfInfo := *, + template DcsfInfoListMap dcsfInfoList := *, + template MrfInfoListMap mrfInfoList := *, + template MrfpInfoListMap mrfpInfoList := *, + template MfInfoListMap mfInfoList := *, + template AdrfInfoListMap adrfInfoList := *, + template SelectionConditions1 selectionConditions := *, + template boolean canaryRelease := *, + template boolean exclusiveCanaryReleaseSelection := *, + template charstring sharedProfileDataId := *, + template ImsasInfo1 imsasInfo := *, + template AiotfInfoListMap aiotfInfoList := *, + template NssfInfo1 nssfInfo := *, + template AdmInfo1 admInfo := *) := { + nfInstanceId := nfInstanceId, + nfInstanceName := nfInstanceName, + nfType := nfType, + nfStatus := nfStatus, + collocatedNfInstances := collocatedNfInstances, + plmnList := plmnList, + snpnList := snpnList, + sNssais := sNssais, + perPlmnSnssaiList := perPlmnSnssaiList, + nsiList := nsiList, + fqdn := fqdn, + interPlmnFqdn := interPlmnFqdn, + ipv4Addresses := ipv4Addresses, + ipv6Addresses := ipv6Addresses, + allowedPlmns := allowedPlmns, + allowedSnpns := allowedSnpns, + allowedNfTypes := allowedNfTypes, + allowedNfDomains := allowedNfDomains, + allowedNssais := allowedNssais, + allowedRuleSet := allowedRuleSet, + priority := priority, + capacity := capacity, + load := load, + loadTimeStamp := loadTimeStamp, + locality := locality, + extLocality := extLocality, + udrInfo := udrInfo, + udrInfoList := udrInfoList, + udmInfo := udmInfo, + udmInfoList := udmInfoList, + ausfInfo := ausfInfo, + ausfInfoList := ausfInfoList, + amfInfo := amfInfo, + amfInfoList := amfInfoList, + smfInfo := smfInfo, + smfInfoList := smfInfoList, + upfInfo := upfInfo, + upfInfoList := upfInfoList, + pcfInfo := pcfInfo, + pcfInfoList := pcfInfoList, + bsfInfo := bsfInfo, + bsfInfoList := bsfInfoList, + chfInfo := chfInfo, + chfInfoList := chfInfoList, + nefInfo := nefInfo, + udsfInfo := udsfInfo, + udsfInfoList := udsfInfoList, + nwdafInfo := nwdafInfo, + nwdafInfoList := nwdafInfoList, + pcscfInfoList := pcscfInfoList, + hssInfoList := hssInfoList, + customInfo := customInfo, + recoveryTime := recoveryTime, + nfServicePersistence := nfServicePersistence, + nfServices := nfServices, + nfServiceList := nfServiceList, + defaultNotificationSubscriptions := defaultNotificationSubscriptions, + lmfInfo := lmfInfo, + gmlcInfo := gmlcInfo, + nfSetIdList := nfSetIdList, + servingScope := servingScope, + lcHSupportInd := lcHSupportInd, + olcHSupportInd := olcHSupportInd, + nfSetRecoveryTimeList := nfSetRecoveryTimeList, + serviceSetRecoveryTimeList := serviceSetRecoveryTimeList, + scpDomains := scpDomains, + scpInfo := scpInfo, + seppInfo := seppInfo, + vendorId := vendorId, + supportedVendorSpecificFeatures := supportedVendorSpecificFeatures, + aanfInfoList := aanfInfoList, + mfafInfo := mfafInfo, + easdfInfoList := easdfInfoList, + dccfInfo := dccfInfo, + nsacfInfoList := nsacfInfoList, + mbSmfInfoList := mbSmfInfoList, + tsctsfInfoList := tsctsfInfoList, + mbUpfInfoList := mbUpfInfoList, + trustAfInfo := trustAfInfo, + nssaafInfo := nssaafInfo, + hniList := hniList, + iwmscInfo := iwmscInfo, + mnpfInfo := mnpfInfo, + smsfInfo := smsfInfo, + dcsfInfoList := dcsfInfoList, + mrfInfoList := mrfInfoList, + mrfpInfoList := mrfpInfoList, + mfInfoList := mfInfoList, + adrfInfoList := adrfInfoList, + selectionConditions := selectionConditions, + canaryRelease := canaryRelease, + exclusiveCanaryReleaseSelection := exclusiveCanaryReleaseSelection, + sharedProfileDataId := sharedProfileDataId, + imsasInfo := imsasInfo, + aiotfInfoList := aiotfInfoList, + nssfInfo := nssfInfo, + admInfo := admInfo +} + +template (value) NFProfile1 +ts_NFProfile1(template (value) NfInstanceId1 nfInstanceId, + template (omit) charstring nfInstanceName := omit, + template (value) NFType1 nfType, + template (value) NFStatus1 nfStatus, + template (omit) CollocatedNfInstancesList collocatedNfInstances := omit, + template (omit) PlmnList plmnList := omit, + template (omit) SnpnList snpnList := omit, + template (omit) SNssaisList sNssais := omit, + template (omit) PerPlmnSnssaiList perPlmnSnssaiList := omit, + template (omit) record of charstring nsiList := omit, + template (omit) Fqdn1 fqdn := omit, + template (omit) Fqdn1 interPlmnFqdn := omit, + template (omit) Ipv4Addr1List ipv4Addresses := omit, + template (omit) Ipv6Addresses ipv6Addresses := omit, + template (omit) AllowedPlmnsList allowedPlmns := omit, + template (omit) AllowedSnpnsList allowedSnpns := omit, + template (omit) AllowedNfTypes allowedNfTypes := omit, + template (omit) record of charstring allowedNfDomains := omit, + template (omit) AllowedNssais allowedNssais := omit, + template (omit) AllowedRuleSet allowedRuleSet := omit, + template (omit) integer priority := omit, + template (omit) integer capacity := omit, + template (omit) integer load := omit, + template (omit) DateTime2 loadTimeStamp := omit, + template (omit) charstring locality := omit, + template (omit) ExtLocalityMap extLocality := omit, + template (omit) UdrInfo1 udrInfo := omit, + template (omit) UdrInfoListMap udrInfoList := omit, + template (omit) UdmInfo1 udmInfo := omit, + template (omit) UdmInfoListMap udmInfoList := omit, + template (omit) AusfInfo1 ausfInfo := omit, + template (omit) AusfInfoListMap ausfInfoList := omit, + template (omit) AmfInfo1 amfInfo := omit, + template (omit) AmfInfoListMap amfInfoList := omit, + template (omit) SmfInfo1 smfInfo := omit, + template (omit) SmfInfoListMap smfInfoList := omit, + template (omit) UpfInfo1 upfInfo := omit, + template (omit) UpfInfoListMap upfInfoList := omit, + template (omit) PcfInfo1 pcfInfo := omit, + template (omit) PcfInfoListMap pcfInfoList := omit, + template (omit) BsfInfo1 bsfInfo := omit, + template (omit) BsfInfoListMap bsfInfoList := omit, + template (omit) ChfInfo1 chfInfo := omit, + template (omit) ChfInfoListMap chfInfoList := omit, + template (omit) NefInfo1 nefInfo := omit, + template (omit) UdsfInfo1 udsfInfo := omit, + template (omit) UdsfInfoListMap udsfInfoList := omit, + template (omit) NwdafInfo1 nwdafInfo := omit, + template (omit) NwdaInfoListMap nwdafInfoList := omit, + template (omit) PcscfInfoListMap pcscfInfoList := omit, + template (omit) HssInfoListMap hssInfoList := omit, + template (omit) JSON_Generic.JSON_generic_val customInfo := omit, + template (omit) DateTime2 recoveryTime := omit, + template (omit) boolean nfServicePersistence := omit, + template (omit) NFService1List nfServices := omit, + template (omit) NfServiceListMap nfServiceList := omit, + template (omit) DefaultNotificationSubscription1List defaultNotificationSubscriptions := omit, + template (omit) LmfInfo1 lmfInfo := omit, + template (omit) GmlcInfo1 gmlcInfo := omit, + template (omit) NfSetIdList nfSetIdList := omit, + template (omit) record of charstring servingScope := omit, + template (omit) boolean lcHSupportInd := omit, + template (omit) boolean olcHSupportInd := omit, + template (omit) NfSetRecoveryTimeListMap nfSetRecoveryTimeList := omit, + template (omit) ServiceSetRecoveryTimeListMap serviceSetRecoveryTimeList := omit, + template (omit) record of charstring scpDomains := omit, + template (omit) ScpInfo1 scpInfo := omit, + template (omit) SeppInfo1 seppInfo := omit, + template (omit) VendorId1 vendorId := omit, + template (omit) SupportedVendorSpecificFeatures supportedVendorSpecificFeatures := omit, + template (omit) AanfInfoListMap aanfInfoList := omit, + template (omit) MfafInfo1 mfafInfo := omit, + template (omit) EasdfInfoListMap easdfInfoList := omit, + template (omit) DccfInfo1 dccfInfo := omit, + template (omit) NsacfInfoListMap nsacfInfoList := omit, + template (omit) MbSmfInfoListMap mbSmfInfoList := omit, + template (omit) TsctsfInfoListMap tsctsfInfoList := omit, + template (omit) MbUpfInfoListMap mbUpfInfoList := omit, + template (omit) TrustAfInfo1 trustAfInfo := omit, + template (omit) NssaafInfo1 nssaafInfo := omit, + template (omit) HniList hniList := omit, + template (omit) IwmscInfo1 iwmscInfo := omit, + template (omit) MnpfInfo1 mnpfInfo := omit, + template (omit) SmsfInfo1 smsfInfo := omit, + template (omit) DcsfInfoListMap dcsfInfoList := omit, + template (omit) MrfInfoListMap mrfInfoList := omit, + template (omit) MrfpInfoListMap mrfpInfoList := omit, + template (omit) MfInfoListMap mfInfoList := omit, + template (omit) AdrfInfoListMap adrfInfoList := omit, + template (omit) SelectionConditions1 selectionConditions := omit, + template (omit) boolean canaryRelease := omit, + template (omit) boolean exclusiveCanaryReleaseSelection := omit, + template (omit) charstring sharedProfileDataId := omit, + template (omit) ImsasInfo1 imsasInfo := omit, + template (omit) AiotfInfoListMap aiotfInfoList := omit, + template (omit) NssfInfo1 nssfInfo := omit, + template (omit) AdmInfo1 admInfo := omit) := { + nfInstanceId := nfInstanceId, + nfInstanceName := nfInstanceName, + nfType := nfType, + nfStatus := nfStatus, + collocatedNfInstances := collocatedNfInstances, + plmnList := plmnList, + snpnList := snpnList, + sNssais := sNssais, + perPlmnSnssaiList := perPlmnSnssaiList, + nsiList := nsiList, + fqdn := fqdn, + interPlmnFqdn := interPlmnFqdn, + ipv4Addresses := ipv4Addresses, + ipv6Addresses := ipv6Addresses, + allowedPlmns := allowedPlmns, + allowedSnpns := allowedSnpns, + allowedNfTypes := allowedNfTypes, + allowedNfDomains := allowedNfDomains, + allowedNssais := allowedNssais, + allowedRuleSet := allowedRuleSet, + priority := priority, + capacity := capacity, + load := load, + loadTimeStamp := loadTimeStamp, + locality := locality, + extLocality := extLocality, + udrInfo := udrInfo, + udrInfoList := udrInfoList, + udmInfo := udmInfo, + udmInfoList := udmInfoList, + ausfInfo := ausfInfo, + ausfInfoList := ausfInfoList, + amfInfo := amfInfo, + amfInfoList := amfInfoList, + smfInfo := smfInfo, + smfInfoList := smfInfoList, + upfInfo := upfInfo, + upfInfoList := upfInfoList, + pcfInfo := pcfInfo, + pcfInfoList := pcfInfoList, + bsfInfo := bsfInfo, + bsfInfoList := bsfInfoList, + chfInfo := chfInfo, + chfInfoList := chfInfoList, + nefInfo := nefInfo, + udsfInfo := udsfInfo, + udsfInfoList := udsfInfoList, + nwdafInfo := nwdafInfo, + nwdafInfoList := nwdafInfoList, + pcscfInfoList := pcscfInfoList, + hssInfoList := hssInfoList, + customInfo := customInfo, + recoveryTime := recoveryTime, + nfServicePersistence := nfServicePersistence, + nfServices := nfServices, + nfServiceList := nfServiceList, + defaultNotificationSubscriptions := defaultNotificationSubscriptions, + lmfInfo := lmfInfo, + gmlcInfo := gmlcInfo, + nfSetIdList := nfSetIdList, + servingScope := servingScope, + lcHSupportInd := lcHSupportInd, + olcHSupportInd := olcHSupportInd, + nfSetRecoveryTimeList := nfSetRecoveryTimeList, + serviceSetRecoveryTimeList := serviceSetRecoveryTimeList, + scpDomains := scpDomains, + scpInfo := scpInfo, + seppInfo := seppInfo, + vendorId := vendorId, + supportedVendorSpecificFeatures := supportedVendorSpecificFeatures, + aanfInfoList := aanfInfoList, + mfafInfo := mfafInfo, + easdfInfoList := easdfInfoList, + dccfInfo := dccfInfo, + nsacfInfoList := nsacfInfoList, + mbSmfInfoList := mbSmfInfoList, + tsctsfInfoList := tsctsfInfoList, + mbUpfInfoList := mbUpfInfoList, + trustAfInfo := trustAfInfo, + nssaafInfo := nssaafInfo, + hniList := hniList, + iwmscInfo := iwmscInfo, + mnpfInfo := mnpfInfo, + smsfInfo := smsfInfo, + dcsfInfoList := dcsfInfoList, + mrfInfoList := mrfInfoList, + mrfpInfoList := mrfpInfoList, + mfInfoList := mfInfoList, + adrfInfoList := adrfInfoList, + selectionConditions := selectionConditions, + canaryRelease := canaryRelease, + exclusiveCanaryReleaseSelection := exclusiveCanaryReleaseSelection, + sharedProfileDataId := sharedProfileDataId, + imsasInfo := imsasInfo, + aiotfInfoList := aiotfInfoList, + nssfInfo := nssfInfo, + admInfo := admInfo +} + + +template (value) NFService1 +ts_NFService1( + template (value) charstring serviceInstanceId, + template (value) ServiceName1 serviceName, + template (value) TS29510_Nnrf_NFDiscovery.NFService1.versions versions, + template (value) UriScheme1 scheme, + template (value) NFServiceStatus1 nfServiceStatus, + template (omit) Fqdn1 fqdn := omit, + template (omit) Fqdn1 interPlmnFqdn := omit, + template (omit) TS29510_Nnrf_NFDiscovery.NFService1.ipEndPoints ipEndPoints := omit, + template (omit) charstring apiPrefix := omit, + template (omit) TS29510_Nnrf_NFDiscovery.NFService1.callbackUriPrefixList callbackUriPrefixList := omit, + template (omit) TS29510_Nnrf_NFDiscovery.NFService1.defaultNotificationSubscriptions defaultNotificationSubscriptions := omit, + template (omit) TS29510_Nnrf_NFDiscovery.NFService1.allowedPlmns allowedPlmns := omit, + template (omit) TS29510_Nnrf_NFDiscovery.NFService1.allowedSnpns allowedSnpns := omit, + template (omit) TS29510_Nnrf_NFDiscovery.NFService1.allowedNfTypes allowedNfTypes := omit, + template (omit) record of charstring allowedNfDomains := omit, + template (omit) TS29510_Nnrf_NFDiscovery.NFService1.allowedNssais allowedNssais := omit, + template (omit) integer capacity := omit, + template (omit) integer load := omit, + template (omit) DateTime1 loadTimeStamp := omit, + template (omit) integer priority := omit, + template (omit) DateTime1 recoveryTime := omit, + template (omit) SupportedFeatures1 supportedFeatures := omit, + template (omit) TS29510_Nnrf_NFDiscovery.NFService1.nfServiceSetIdList nfServiceSetIdList := omit, + template (omit) TS29510_Nnrf_NFDiscovery.NFService1.sNssais sNssais := omit, + template (omit) TS29510_Nnrf_NFDiscovery.NFService1.perPlmnSnssaiList perPlmnSnssaiList := omit, + template (omit) VendorId1 vendorId := omit, + template (omit) TS29510_Nnrf_NFDiscovery.NFService1.supportedVendorSpecificFeatures supportedVendorSpecificFeatures := omit, + template (omit) boolean oauth2Required := omit, + template (omit) TS29510_Nnrf_NFDiscovery.NFService1.allowedOperationsPerNfType allowedOperationsPerNfType := omit, + template (omit) TS29510_Nnrf_NFDiscovery.NFService1.allowedOperationsPerNfInstance allowedOperationsPerNfInstance := omit, + template (omit) boolean allowedOperationsPerNfInstanceOverrides := omit, + template (omit) TS29510_Nnrf_NFDiscovery.NFService1.allowedScopesRuleSet allowedScopesRuleSet := omit, + template (omit) SelectionConditions1 selectionConditions := omit, + template (omit) boolean canaryRelease := omit, + template (omit) boolean exclusiveCanaryReleaseSelection := omit, + template (omit) charstring sharedServiceDataId := omit) := { + serviceInstanceId := serviceInstanceId, + serviceName := serviceName, + versions := versions, + scheme := scheme, + nfServiceStatus := nfServiceStatus, + fqdn := fqdn, + interPlmnFqdn := interPlmnFqdn, + ipEndPoints := ipEndPoints, + apiPrefix := apiPrefix, + callbackUriPrefixList := callbackUriPrefixList, + defaultNotificationSubscriptions := defaultNotificationSubscriptions, + allowedPlmns := allowedPlmns, + allowedSnpns := allowedSnpns, + allowedNfTypes := allowedNfTypes, + allowedNfDomains := allowedNfDomains, + allowedNssais := allowedNssais, + capacity := capacity, + load := load, + loadTimeStamp := loadTimeStamp, + priority := priority, + recoveryTime := recoveryTime, + supportedFeatures := supportedFeatures, + nfServiceSetIdList := nfServiceSetIdList, + sNssais := sNssais, + perPlmnSnssaiList := perPlmnSnssaiList, + vendorId := vendorId, + supportedVendorSpecificFeatures := supportedVendorSpecificFeatures, + oauth2Required := oauth2Required, + allowedOperationsPerNfType := allowedOperationsPerNfType, + allowedOperationsPerNfInstance := allowedOperationsPerNfInstance, + allowedOperationsPerNfInstanceOverrides := allowedOperationsPerNfInstanceOverrides, + allowedScopesRuleSet := allowedScopesRuleSet, + selectionConditions := selectionConditions, + canaryRelease := canaryRelease, + exclusiveCanaryReleaseSelection := exclusiveCanaryReleaseSelection, + sharedServiceDataId := sharedServiceDataId +} + +template (value) IpEndPoint1 +ts_IpEndPoint1(template (omit) Ipv4Addr ipv4Address := omit, + template (omit) Ipv6Addr ipv6Address := omit, + template (omit) TransportProtocol transport := omit, + template (omit) integer port_ := omit) := { + ipv4Address := ipv4Address, + ipv6Address := ipv6Address, + transport := transport, + port_ := port_ +} + +} diff --git a/library/TS29510_Nnrf_NFManagement_Templates.ttcn b/library/TS29510_Nnrf_NFManagement_Templates.ttcn index b709285..2fca125 100644 --- a/library/TS29510_Nnrf_NFManagement_Templates.ttcn +++ b/library/TS29510_Nnrf_NFManagement_Templates.ttcn @@ -9,11 +9,21 @@ const charstring c_Nnrf_NFM_path_nf_instances := c_Nnrf_NFM_path_api_prefix & "/nf-instances"; +const charstring c_Nnrf_NFM_path_subscriptions +:= c_Nnrf_NFM_path_api_prefix & "/subscriptions"; + template (present) charstring tr_Nnrf_NFM_path_nf_instance(template (present) charstring nf_instance_id := pattern "?+") := pattern c_Nnrf_NFM_path_nf_instances & "/" & nf_instance_id; template (value) charstring ts_Nnrf_NFM_path_nf_instance(template (value) charstring nf_instance_id) := c_Nnrf_NFM_path_nf_instances & "/" & valueof(nf_instance_id); +template (value) charstring ts_Nnrf_NFM_path_subscription(template (value) charstring subscriptionID) +:= c_Nnrf_NFM_path_subscriptions & "/" & valueof(subscriptionID); + +template (present) NFType1 +tr_NFType1(template (present) NFType1_enum enum_val := ?) := { + enum_val := enum_val +} template (value) NFType1 ts_NFType1(template (value) NFType1_enum enum_val) := { enum_val := enum_val @@ -587,4 +597,65 @@ admInfo := admInfo } +template (present) SubscriptionData1 +tr_SubscriptionData1(template (present) charstring nfStatusNotificationUri := ?, + template NfInstanceId1 reqNfInstanceId := *, + template record of charstring sharedDataIds := *, + template SubscrCond1 subscrCond := *, + template charstring subscriptionId := *, + template DateTime2 validityTime := *, + template TS29510_Nnrf_NFManagement.SubscriptionData1.reqNotifEvents reqNotifEvents := *, + template PlmnId1 plmnId := *, + template Nid1 nid := *, + template NotifCondition1 notifCondition := *, + template NFType1 reqNfType := *, + template Fqdn1 reqNfFqdn := *, + template TS29510_Nnrf_NFManagement.SubscriptionData1.reqSnssais reqSnssais := *, + template TS29510_Nnrf_NFManagement.SubscriptionData1.reqPerPlmnSnssais reqPerPlmnSnssais := *, + template TS29510_Nnrf_NFManagement.SubscriptionData1.reqPlmnList reqPlmnList := *, + template TS29510_Nnrf_NFManagement.SubscriptionData1.reqSnpnList reqSnpnList := *, + template TS29510_Nnrf_NFManagement.SubscriptionData1.servingScope servingScope := *, + template SupportedFeatures1 requesterFeatures := *, + template SupportedFeatures1 nrfSupportedFeatures := *, + template Uri1 hnrfUri := *, + template boolean onboardingCapability := *, + template Fqdn1 targetHni := *, + template charstring preferredLocality := *, + template TS29510_Nnrf_NFManagement.SubscriptionData1.extPreferredLocality extPreferredLocality := *, + template boolean completeProfileSubscription := *) := { + nfStatusNotificationUri := nfStatusNotificationUri, + reqNfInstanceId := reqNfInstanceId, + sharedDataIds := sharedDataIds, + subscrCond := subscrCond, + subscriptionId := subscriptionId, + validityTime := validityTime, + reqNotifEvents := reqNotifEvents, + plmnId := plmnId, + nid := nid, + notifCondition := notifCondition, + reqNfType := reqNfType, + reqNfFqdn := reqNfFqdn, + reqSnssais := reqSnssais, + reqPerPlmnSnssais := reqPerPlmnSnssais, + reqPlmnList := reqPlmnList, + reqSnpnList := reqSnpnList, + servingScope := servingScope, + requesterFeatures := requesterFeatures, + nrfSupportedFeatures := nrfSupportedFeatures, + hnrfUri := hnrfUri, + onboardingCapability := onboardingCapability, + targetHni := targetHni, + preferredLocality := preferredLocality, + extPreferredLocality := extPreferredLocality, + completeProfileSubscription := completeProfileSubscription +} + + +template (present) SubscrCond1 +tr_SubscrCond1_NFtype(template (present) NFType1_enum nfType := ?) := { + field3 := { + nfType := tr_NFType1(nfType) + } +} + } diff --git a/scp/ConnHdlr.ttcn b/scp/ConnHdlr.ttcn new file mode 100644 index 0000000..2e5195e --- /dev/null +++ b/scp/ConnHdlr.ttcn @@ -0,0 +1,408 @@ +/* SCP test suite in TTCN-3 (3GPP TS 23.501, 3GPP TS 29.570), ConnHdlr + * (C) 2026 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> + * All rights reserved. + * Author: Pau Espin Pedrol <pespin(a)sysmocom.de> + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +module ConnHdlr { + +import from TCCEncoding_Functions all; + +import from General_Types all; +import from Native_Functions all; +import from IPL4asp_Types all; +import from Misc_Helpers all; + +import from Osmocom_Types all; +import from GSM_Types all; + +import from HTTP2_Types all; +import from HTTP2_Templates all; +import from HTTP2_Functions all; +import from HTTP2_Msg all; +import from HTTP2_Adapter all; +import from HTTP2_Server_Emulation all; + +import from Prometheus_Checker all; + +import from TS29510_Nnrf_NFManagement all; +import from TS29510_Nnrf_NFManagement_Templates all; +import from TS29510_Nnrf_NFDiscovery all; +import from TS29510_Nnrf_NFDiscovery_Templates all; + +import from SCP_Tests all; + +const integer HTTP2_CONN_NRF := 0; +const integer HTTP2_CONN_NF := 1; + +/* These are a preset of path matches which can be applied through the entire lifecycle of the session: */ +function f_http2_server_path_match_nrf() +runs on ConnHdlr return charstring { + var charstring nf_instance_match := c_Nnrf_NFM_path_nf_instances & "/?+"; + var charstring subscription_match := c_Nnrf_NFM_path_subscriptions & "/?+"; + var charstring match_ := "(" & c_Nnrf_NFM_path_nf_instances & + ")|(" & nf_instance_match & + ")|(" & c_Nnrf_NFM_path_subscriptions & + ")|(" & subscription_match & + ")|(" & c_Nnrf_DISC_path_nf_instances & "\??+" & + ")"; + return match_; +} + +function f_http2_server_path_match_nf() +runs on ConnHdlr return charstring { + var charstring match_ := "(/nudr-dr/v1/subscription-data/?+)" + return match_; +} + +type record ConnHdlrPars { + integer idx, + charstring fqdn_sender, + charstring n32f_context_id +} + +type component ConnHdlr extends HTTP2_CT, HTTP2_ConnHdlr, Prometheus_Checker_CT { + var ConnHdlrPars g_pars; +} + +type function void_fn() runs on ConnHdlr; + +function f_ConnHdlrPars(integer idx := 0) return ConnHdlrPars +{ + var template (value) ConnHdlrPars pars := { + idx := idx, + fqdn_sender := "UDR.localdomain", + n32f_context_id := int2str(idx) /* 3GPP TS 29.573 Table 6.2.5.2.9-1 n32fContextId */ + }; + return valueof(pars); +} + +function f_ConnHdlr_init(void_fn fn, ConnHdlrPars pars) runs on ConnHdlr { + /* make parameters available via component variable */ + g_pars := pars; + + /* Setup */ + /* Register SCP HTTP2 sever, where IUT will send all SBI requests: */ + f_http2_server_emu_register(f_http2_server_path_match_nrf(), idx := HTTP2_CONN_NRF); + f_http2_server_emu_register(f_http2_server_path_match_nf(), idx := HTTP2_CONN_NF); + f_http2_adapter_init(); + + fn.apply(); + + /* Cleanup */ +} + +function f_http2_adapter_connect_scp(integer idx := 0) +runs on ConnHdlr { + f_http2_adapter_connect(mp_scp_hostname, mp_scp_port, mp_nf_local_ip, idx := idx); +} + +function f_http2_adapter_connect_send_scp(template (value) HTTP2_Msg http2_msg, integer idx := 0) +runs on ConnHdlr { + f_http2_adapter_connect_scp(idx := idx); + f_http2_adapter_send(http2_msg); +} + +/**************************************************** + * SBI emulated NF consumer, originator towards SCP (IUT), 3GPP TS 23.501, 3GPP TS 29.570 + ****************************************************/ +const charstring c_SCP_uri_hostport := mp_scp_hostname & ":" & int2str(mp_scp_port); +const charstring c_SCP_uri_prefix := "http://" & c_SCP_uri_hostport; +const charstring c_SCP_uri_fqdn := "http://5gc.mnc" & mp_scp_local_plmn_mnc & ".mcc" & mp_scp_local_plmn_mcc & ".3gppnetwork.org"; + +const charstring c_HTTP2_HDR_3Gpp_Sbi_Target_apiRoot := "3gpp-sbi-target-apiroot"; + +/* suffixes in TS 29.510 Table 6.2.3.2.3.1-1 */ +const charstring c_HTTP2_HDR_3gpp_Sbi_Discovery_prefix +:= "3gpp-sbi-discovery-" +const charstring c_HTTP2_HDR_3gpp_Sbi_Discovery_target_nf_type +:= c_HTTP2_HDR_3gpp_Sbi_Discovery_prefix & "target-nf-type"; +const charstring c_HTTP2_HDR_3gpp_Sbi_Discovery_service_names +:= c_HTTP2_HDR_3gpp_Sbi_Discovery_prefix & "service-names"; + +/* Test msg to be forwarded:*/ +const charstring c_Nudr_DR_path := "/nudr-dr/v1/subscription-data/imsi-345645645433/authentication-data/authentication-subscription"; + +/* Prepare some sample msg to be forwarded by the IUT SCP + * payload: (3GPP TS 29.505 5.2.2.3.1 Resource: AuthenticationSubscription (GET)) */ +function f_n35_prepare_get_authentication_subscription(template (omit) charstring sbi_target_apiroot := omit) +runs on ConnHdlr return HTTP2_Msg { + var integer http2_idx := f_http2_adapter_find_free_idx(); + var integer http2_stream_id := f_http2_adapter_next_stream_id(http2_idx); + var template (value) HTTP2_Msg http2_tx; + + http2_tx := ts_HTTP2_Msg(http2_idx, + http2_stream_id, + hb := { + pseudo_headers := ts_HTTP2_pseudo_headers_Req(method := "GET", + scheme := "http", + authority := c_SCP_uri_hostport, + path := c_Nudr_DR_path), + headers := { + ts_HTTP2_Hdr_content_type("application/json"), + ts_HTTP2_Hdr_accept("application/json"), + ts_HTTP2_Hdr_user_agent("UDM-ttcn3"), + ts_HTTP2_Hdr_accept_encoding("gzip"), + ts_HTTP2_header_field(c_HTTP2_HDR_3gpp_Sbi_Discovery_target_nf_type, "UDR"), + ts_HTTP2_header_field(c_HTTP2_HDR_3gpp_Sbi_Discovery_service_names, "nudr-dr") + } + }); + if (isvalue(sbi_target_apiroot)) { + http2_tx.hb.headers := valueof(http2_tx.hb.headers) & + { valueof(ts_HTTP2_header_field(c_HTTP2_HDR_3Gpp_Sbi_Target_apiRoot, + valueof(sbi_target_apiroot))) } + } + return valueof(http2_tx); +} + +/**************************************************** + * SBI Emulated NF producer, 3GPP TS 23.501 + ****************************************************/ + +const charstring c_NF_uri_hostport := mp_nf_local_ip & ":" & int2str(mp_nf_local_port); +const charstring c_NF_uri_prefix := "http://" & c_NF_uri_hostport; + +/* Receive content of f_n35_get_authentication_subscription() forwarded by the IUT SCP to our emulated UDM: */ +function f_tr_receive_forwarded_traffic() +runs on ConnHdlr return template (present) HTTP2_Msg { + var template (present) HTTP2_Msg http2_msg; + var template (present) HTTP2_header_block hb; + var template (present) HTTP2_pseudo_headers pseudo_headers; + var template HTTP2_header_list headers := *; + + pseudo_headers := tr_HTTP2_pseudo_headers_Req(method := "GET", + path := c_Nudr_DR_path); + hb := tr_HTTP2_header_block(pseudo_headers, headers); + http2_msg := tr_HTTP2_Msg(?, ?, + hb := hb, + body := omit); + return http2_msg; +} +altstep as_nf_producer_receive_forwarded_traffic(template (present) HTTP2_Msg http2_exp) +runs on ConnHdlr { + var HTTP2_Msg http2_rx; + [] HTTP2_CONN[HTTP2_CONN_NF].receive(http2_exp) -> value http2_rx { + var template (value) HTTP2_Msg http2_tx; + + http2_tx := ts_HTTP2_Msg_200_OK(http2_rx.conn_id, + http2_rx.stream_id, + headers := { + ts_HTTP2_Hdr_content_type("application/json") + }, + body := omit); + HTTP2_CONN[HTTP2_CONN_NF].send(http2_tx); + setverdict(pass); + } +} + +/**************************************************** + * Nnrf (SBI) Emulated NRF, 3GPP TS 29.510 + ****************************************************/ +const charstring c_Nnrf_uri_hostport := mp_nrf_local_ip & ":" & int2str(mp_nrf_local_port); +const charstring c_Nnrf_uri_prefix := "http://" & c_Nnrf_uri_hostport; + +template (value) charstring +ts_Nnrf_NFM_uri_nf_instance(template (value) charstring nf_instance_id) +:= c_Nnrf_uri_prefix & "/" & valueof(ts_Nnrf_NFM_path_nf_instance(nf_instance_id)); + +template (value) charstring +ts_Nnrf_NFM_uri_subscription(template (value) charstring subscriptionID) +:= c_Nnrf_uri_prefix & "/" & valueof(ts_Nnrf_NFM_path_subscription(subscriptionID)); + +/* 6.1.3.2 Resource: nf-instances (Store) (GET) */ +function f_tr_Nnrf_NFM_get_nf_instances() +runs on ConnHdlr return template (present) HTTP2_Msg { + var template (present) HTTP2_Msg http2_msg; + var template (present) HTTP2_header_block hb; + var template (present) HTTP2_pseudo_headers pseudo_headers; + var template HTTP2_header_list headers := *; + + pseudo_headers := tr_HTTP2_pseudo_headers_Req(method := "GET", + path := c_Nnrf_NFM_path_nf_instances); + hb := tr_HTTP2_header_block(pseudo_headers, headers); + http2_msg := tr_HTTP2_Msg(?, ?, + hb := hb, + body := omit); + return http2_msg; +} + +/* 6.1.3.2 Resource: nf-instances (Store) (GET) */ +altstep as_Nnrf_NFM_get_nf_instances() +runs on ConnHdlr { + var HTTP2_Msg http2_rx; + [] HTTP2_CONN[HTTP2_CONN_NRF].receive(f_tr_Nnrf_NFM_get_nf_instances()) -> value http2_rx { + var template (value) UriList1 uri_list; + var octetstring body_enc; + var template (value) HTTP2_Msg http2_tx; + + uri_list := ts_UriList1(links := { {"item", ts_LinksValueSchema1(ts_Link1("heyval"))} }); + body_enc := f_enc_UriList1(valueof(uri_list)); + + http2_tx := ts_HTTP2_Msg_200_OK(http2_rx.conn_id, + http2_rx.stream_id, + headers := { + ts_HTTP2_Hdr_content_type("application/json") + }, + body := ts_HTTP2_Data_frame(http2_rx.stream_id, + end_stream_flag := true, + data := body_enc)); + HTTP2_CONN[HTTP2_CONN_NRF].send(http2_tx); + setverdict(pass); + } +} + +/* 6.1.3.3 Resource: nf-instance (PUT) */ +function f_tr_Nnrf_NFM_put_nf_instance() +runs on ConnHdlr return template (present) HTTP2_Msg { + var template (present) HTTP2_Msg http2_msg; + var template (present) HTTP2_header_block hb; + var template (present) HTTP2_pseudo_headers pseudo_headers; + var template HTTP2_header_list headers := *; + + pseudo_headers := tr_HTTP2_pseudo_headers_Req(method := "PUT", + path := tr_Nnrf_NFM_path_nf_instance); + hb := tr_HTTP2_header_block(pseudo_headers, headers); + http2_msg := tr_HTTP2_Msg(?, ?, + hb := hb, + body := tr_HTTP2_Data_frame(data := decmatch TS29510_Nnrf_NFManagement_Templates.tr_NFProfile1)); + return http2_msg; +} + +/* 6.1.3.3 Resource: nf-instance (PUT) */ +altstep as_Nnrf_NFM_put_nf_instance() +runs on ConnHdlr { + var HTTP2_Msg http2_rx; + [] HTTP2_CONN[HTTP2_CONN_NRF].receive(f_tr_Nnrf_NFM_put_nf_instance()) -> value http2_rx { + var TS29510_Nnrf_NFManagement.NFProfile1 profile; + var octetstring body_enc; + var template (value) HTTP2_Msg http2_tx; + + f_dec_NFProfile1(http2_rx.body.data, profile); // TODO: check rc + profile.plmnList := { valueof(ts_PlmnId1(mcc := mp_scp_plmn_mcc, mnc := mp_scp_plmn_mnc)) }; + body_enc := f_enc_NFProfile1(profile); + + http2_tx := ts_HTTP2_Msg_201_Created(http2_rx.conn_id, + http2_rx.stream_id, + headers := { + ts_HTTP2_Hdr_content_type("application/json"), + ts_HTTP2_Hdr_location(http2_rx.hb.pseudo_headers.path) + }, + body := ts_HTTP2_Data_frame(http2_rx.stream_id, + end_stream_flag := true, + data := body_enc)); + HTTP2_CONN[HTTP2_CONN_NRF].send(http2_tx); + setverdict(pass); + } +} + +/* 6.1.3.4.3.1 Resource: subscriptions (Collection) (POST) */ +function f_tr_Nnrf_NFM_post_subscriptions(template SubscrCond1 subscrCond := *) +runs on ConnHdlr return template (present) HTTP2_Msg { + var template (present) HTTP2_Msg http2_msg; + var template (present) HTTP2_header_block hb; + var template (present) HTTP2_pseudo_headers pseudo_headers; + var template HTTP2_header_list headers := *; + var template (present) TS29510_Nnrf_NFManagement.SubscriptionData1 exp_subscr_data; + + exp_subscr_data := TS29510_Nnrf_NFManagement_Templates.tr_SubscriptionData1( + subscrCond := subscrCond, + reqNfType := TS29510_Nnrf_NFManagement_Templates.tr_NFType1(SCP)); + + pseudo_headers := tr_HTTP2_pseudo_headers_Req(method := "POST", + path := c_Nnrf_NFM_path_subscriptions); + hb := tr_HTTP2_header_block(pseudo_headers, headers); + http2_msg := tr_HTTP2_Msg(?, ?, + hb := hb, + body := tr_HTTP2_Data_frame(data := decmatch exp_subscr_data)); + return http2_msg; +} + +/* 6.1.3.4.3.1 Resource: subscriptions (Collection) (POST) */ +altstep as_Nnrf_NFM_post_subscriptions(template SubscrCond1 subscrCond := *) +runs on ConnHdlr { + var HTTP2_Msg http2_rx; + [] HTTP2_CONN[HTTP2_CONN_NRF].receive(f_tr_Nnrf_NFM_post_subscriptions(subscrCond := subscrCond)) -> value http2_rx { + var SubscriptionData1 subscr_data; + var octetstring body_enc; + var template (value) HTTP2_Msg http2_tx; + + f_dec_SubscriptionData1(http2_rx.body.data, subscr_data); // TODO: check rc + body_enc := f_enc_SubscriptionData1(subscr_data); + + http2_tx := ts_HTTP2_Msg_201_Created(http2_rx.conn_id, + http2_rx.stream_id, + headers := { + ts_HTTP2_Hdr_content_type("application/json"), + ts_HTTP2_Hdr_location(ts_Nnrf_NFM_uri_subscription(int2str(g_pars.idx))) + }, + body := ts_HTTP2_Data_frame(http2_rx.stream_id, + end_stream_flag := true, + data := body_enc)); + HTTP2_CONN[HTTP2_CONN_NRF].send(http2_tx); + setverdict(pass); + } +} + +function f_Nnrf_NFM_wait_all_post_subscriptions() +runs on ConnHdlr { + as_Nnrf_NFM_post_subscriptions(subscrCond := tr_SubscrCond1_NFtype(SEPP)); + as_Nnrf_NFM_post_subscriptions(subscrCond := tr_SubscrCond1_NFtype(AMF)); + as_Nnrf_NFM_post_subscriptions(subscrCond := tr_SubscrCond1_NFtype(AUSF)); + as_Nnrf_NFM_post_subscriptions(subscrCond := tr_SubscrCond1_NFtype(BSF)); + as_Nnrf_NFM_post_subscriptions(subscrCond := tr_SubscrCond1_NFtype(NSSF)); + as_Nnrf_NFM_post_subscriptions(subscrCond := tr_SubscrCond1_NFtype(PCF)); + as_Nnrf_NFM_post_subscriptions(subscrCond := tr_SubscrCond1_NFtype(SMF)); + as_Nnrf_NFM_post_subscriptions(subscrCond := tr_SubscrCond1_NFtype(UDM)); + as_Nnrf_NFM_post_subscriptions(subscrCond := tr_SubscrCond1_NFtype(UDR)); +} + + +/* 6.2.3.2.3.1 Resource: nf-instances (Store) (GET) */ +function f_tr_Nnrf_DISC_get_nf_instances() +runs on ConnHdlr return template (present) HTTP2_Msg { + var template (present) HTTP2_Msg http2_msg; + var template (present) HTTP2_header_block hb; + var template (present) HTTP2_pseudo_headers pseudo_headers; + var template HTTP2_header_list headers := *; + + pseudo_headers := tr_HTTP2_pseudo_headers_Req(method := "GET", + path := pattern c_Nnrf_DISC_path_nf_instances & "\??+" ); + hb := tr_HTTP2_header_block(pseudo_headers, headers); + http2_msg := tr_HTTP2_Msg(?, ?, + hb := hb, + body := omit); + return http2_msg; +} + +/* 6.2.3.2.3.1 Resource: nf-instances (Store) (GET) */ +altstep as_Nnrf_DISC_get_nf_instances(template (value) TS29510_Nnrf_NFDiscovery.NFProfile1 resp_nf_instance) +runs on ConnHdlr { + var HTTP2_Msg http2_rx; + [] HTTP2_CONN[HTTP2_CONN_NRF].receive(f_tr_Nnrf_DISC_get_nf_instances()) -> value http2_rx { + var template (value) SearchResult1 sr; + var octetstring body_enc; + var template (value) HTTP2_Msg http2_tx; + + sr := ts_SearchResult1(validityPeriod := 10, nfInstances := { resp_nf_instance }); + body_enc := f_enc_SearchResult1(valueof(sr)); + + /* Table 6.2.3.2.3.1-3 */ + http2_tx := ts_HTTP2_Msg_200_OK(http2_rx.conn_id, + http2_rx.stream_id, + headers := { + ts_HTTP2_Hdr_content_type("application/json") + }, + body := ts_HTTP2_Data_frame(http2_rx.stream_id, + end_stream_flag := true, + data := body_enc)); + HTTP2_CONN[HTTP2_CONN_NRF].send(http2_tx); + setverdict(pass); + } +} + +} diff --git a/scp/README.md b/scp/README.md new file mode 100644 index 0000000..d822494 --- /dev/null +++ b/scp/README.md @@ -0,0 +1,20 @@ +# SCP_Tests.ttcn + +* external interfaces + * SBI (emulates NRF) + * SBI (emulates NFs) + * N116 (SBI, emulates NWDAF) + * N117 (SBI, emulates DCCF) + +{% dot scp_tests.svg +digraph G { + rankdir=LR; + ATS [label="ATS\nSCP_Tests.ttcn"]; + SCP [label="AMF\open5gs-scpd",shape="box"]; + + ATS <- SCP [label="NRF"]; + ATS -> SCP [label="N116 (NWDAF)"]; + ATS -> SCP [label="N117 (DCCF)"]; + ATS -> SCP [label="NF producers/consumers"]; +} +%} diff --git a/scp/SCP_Tests.cfg b/scp/SCP_Tests.cfg new file mode 100644 index 0000000..b370df1 --- /dev/null +++ b/scp/SCP_Tests.cfg @@ -0,0 +1,26 @@ +[ORDERED_INCLUDE] +# Common configuration, shared between test suites +"../Common.cfg" +# testsuite specific configuration, not expected to change +"./SCP_Tests.default" + +# Local configuration below + +[LOGGING] + +[TESTPORT_PARAMETERS] + +[MODULE_PARAMETERS] +SCP_Tests.mp_scp_hostname := "127.0.0.200"; +SCP_Tests.mp_scp_port := 7777; +SCP_Tests.mp_scp_fqdn_sender := "scp1.localdomain"; + +SCP_Tests.mp_nrf_local_ip := "127.0.0.10"; +SCP_Tests.mp_nrf_local_port := 7777; +SCP_Tests.mp_nf_local_ip := "127.0.0.50"; +SCP_Tests.mp_nf_local_port := 7777; + +[MAIN_CONTROLLER] + +[EXECUTE] +SCP_Tests.control diff --git a/scp/SCP_Tests.default b/scp/SCP_Tests.default new file mode 100644 index 0000000..b03f59e --- /dev/null +++ b/scp/SCP_Tests.default @@ -0,0 +1,12 @@ +[LOGGING] +FileMask := LOG_ALL | TTCN_DEBUG | TTCN_MATCHING | DEBUG_ENCDEC; + +[TESTPORT_PARAMETERS] +*.TCP.noDelay := "yes" // turn off nagle +*.HTTP.use_notification_ASPs := "yes" + +[MODULE_PARAMETERS] + +[MAIN_CONTROLLER] + +[EXECUTE] diff --git a/scp/SCP_Tests.ttcn b/scp/SCP_Tests.ttcn new file mode 100644 index 0000000..ef28ee5 --- /dev/null +++ b/scp/SCP_Tests.ttcn @@ -0,0 +1,248 @@ +/* SCP test suite in TTCN-3 (3GPP TS 23.501, 3GPP TS 29.570) + * (C) 2026 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> + * All rights reserved. + * Author: Pau Espin Pedrol <pespin(a)sysmocom.de> + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +module SCP_Tests { + +import from General_Types all; +import from Native_Functions all; +import from IPL4asp_Types all; +import from Misc_Helpers all; + +import from Osmocom_Types all; +import from GSM_Types all; + +import from TCCEncoding_Functions all; + +import from HTTP2_Templates all; +import from HTTP2_Msg all; +import from HTTP2_Adapter all; +import from HTTP2_Server_Emulation all; + +import from TS29510_Nnrf_NFDiscovery all; +import from TS29510_Nnrf_NFDiscovery_Templates all; + +import from ConnHdlr all; + +modulepar { + + charstring mp_scp_hostname := "127.0.0.200"; + integer mp_scp_port := 7777; + + charstring mp_scp_fqdn_sender := "scp1.localdomain"; + charstring mp_scp_plmn_mcc := "002"; + charstring mp_scp_plmn_mnc := "001"; + + charstring mp_nrf_local_ip := "127.0.0.10"; + integer mp_nrf_local_port := 7777; + + /* IP address at which we listen for HTTP2/SBI to emulate a NF in ttcn3 */ + charstring mp_nf_local_ip := "127.0.0.50"; + integer mp_nf_local_port := 7777; + + charstring mp_scp_local_plmn_mcc := "456"; + charstring mp_scp_local_plmn_mnc := "123"; +} + +type component MTC_CT extends HTTP2_CT, HTTP2_ConnHdlr { + /* emulated SCP */ + var HTTP2_Server_Emulation_CT vc_HTTP2_SRV_NRF; + var HTTP2_Server_Emulation_CT vc_HTTP2_SRV_NF; + + timer g_Tguard := 30.0; +} + +private function f_init_http2_srv(charstring id) runs on MTC_CT { + id := id & "-HTTP2SRV"; + + var Http2ServerEmulationCfg http2_srv_cfg := { + http2_bind_ip := mp_nrf_local_ip, + http2_bind_port := mp_nrf_local_port, + one_req_per_conn := false + }; + vc_HTTP2_SRV_NRF := HTTP2_Server_Emulation_CT.create(id & "-NRF") alive; + vc_HTTP2_SRV_NRF.start(HTTP2_Server_Emulation.main(http2_srv_cfg)); + + http2_srv_cfg := { + http2_bind_ip := mp_nf_local_ip, + http2_bind_port := mp_nf_local_port, + one_req_per_conn := false + }; + vc_HTTP2_SRV_NF := HTTP2_Server_Emulation_CT.create(id & "-NF") alive; + vc_HTTP2_SRV_NF.start(HTTP2_Server_Emulation.main(http2_srv_cfg)); + + + connect(self:HTTP2_CONN_PROC[HTTP2_CONN_NRF], vc_HTTP2_SRV_NRF:CONN_PROC); + connect(self:HTTP2_CONN_PROC[HTTP2_CONN_NF], vc_HTTP2_SRV_NF:CONN_PROC); +} + + +private function f_init(integer imsi_suffix := 0, float t_guard := 30.0) runs on MTC_CT { + var charstring id := testcasename(); + + g_Tguard.start(t_guard); + activate(as_Tguard()); + + f_init_http2_srv(id); +} + +private function f_shutdown() runs on MTC_CT { + f_http2_server_close_conn_all(idx := HTTP2_CONN_NRF); + f_http2_server_close_conn_all(idx := HTTP2_CONN_NF); + setverdict(pass); +} + +private function f_start_handler_create() +runs on MTC_CT return ConnHdlr +{ + var ConnHdlr vc_conn; + var charstring id := testcasename(); + + vc_conn := ConnHdlr.create(id); + + if (isbound(vc_HTTP2_SRV_NRF)) { + connect(vc_conn:HTTP2_CONN[HTTP2_CONN_NRF], vc_HTTP2_SRV_NRF:CONN); + connect(vc_conn:HTTP2_CONN_PROC[HTTP2_CONN_NRF], vc_HTTP2_SRV_NRF:CONN_PROC); + } + + if (isbound(vc_HTTP2_SRV_NF)) { + connect(vc_conn:HTTP2_CONN[HTTP2_CONN_NF], vc_HTTP2_SRV_NF:CONN); + connect(vc_conn:HTTP2_CONN_PROC[HTTP2_CONN_NF], vc_HTTP2_SRV_NF:CONN_PROC); + } + + return vc_conn; +} + +private function f_start_handler_run(ConnHdlr vc_conn, void_fn fn, ConnHdlrPars pars) runs on MTC_CT +{ + vc_conn.start(f_ConnHdlr_init(fn, pars)); +} + +/* start a connection handler with given parameters */ +private function f_start_handler(void_fn fn, ConnHdlrPars pars) +runs on MTC_CT return ConnHdlr { + var ConnHdlr vc_conn; + vc_conn := f_start_handler_create(); + f_start_handler_run(vc_conn, fn, pars); + return vc_conn; +} + +private altstep as_Tguard() runs on MTC_CT { + [] g_Tguard.timeout { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Tguard timeout"); + } +} + +/* NF consumer sends to SCP without header 3gpp-sbi-target-apiroot. + * SCP discovers an NF producer through NRF Discovery function and forwards to it. */ +private function f_TC_startup_nrf_subscriptions() runs on ConnHdlr { + var HTTP2_Msg http2_tx; + var HTTP2_Msg http2_rx; + var template (present) HTTP2_Msg http2_exp_rx; + + as_Nnrf_NFM_put_nf_instance(); + f_Nnrf_NFM_wait_all_post_subscriptions(); + as_Nnrf_NFM_get_nf_instances(); +} +testcase TC_startup_nrf_subscriptions() runs on MTC_CT { + var ConnHdlr vc_conn; + var ConnHdlrPars pars := f_ConnHdlrPars(0); + f_init(); + vc_conn := f_start_handler(refers(f_TC_startup_nrf_subscriptions), pars); + vc_conn.done; + f_shutdown(); +} + +/* NF consumer sends to SCP without header 3gpp-sbi-target-apiroot. + * SCP discovers an NF producer through NRF Discovery function and forwards to it. */ +private function f_TC_indirect_route_discovery() runs on ConnHdlr { + var HTTP2_Msg http2_tx; + var HTTP2_Msg http2_rx; + var template (present) HTTP2_Msg http2_exp_rx; + + /* Test NF sendig data through IUT c-SEPP to our emulated SEPP and back: */ + http2_tx := f_n35_prepare_get_authentication_subscription(); + f_http2_adapter_connect_send_scp(http2_tx, idx := http2_tx.conn_id); + + var template (value) TS29510_Nnrf_NFDiscovery.NFProfile1 resp_nf_instance := + ts_NFProfile1(nfInstanceId := "foobar", + nfType := TS29510_Nnrf_NFDiscovery_Templates.ts_NFType1(UDR), + nfStatus := ts_NFStatus1(REGISTERED), + ipv4Addresses := { mp_nf_local_ip }, + nfServices := { ts_NFService1(serviceInstanceId := "foobar", + serviceName := ts_ServiceName1(nudr_dr), + versions := {ts_NFServiceVersion1("v1", "v1")}, + scheme := ts_UriScheme1(http), + nfServiceStatus := ts_NFServiceStatus1(REGISTERED), + ipEndPoints := {ts_IpEndPoint1(ipv4Address := mp_nf_local_ip, + port_ := mp_nf_local_port)}) } ); + as_Nnrf_DISC_get_nf_instances(resp_nf_instance := resp_nf_instance); + + as_nf_producer_receive_forwarded_traffic(f_tr_receive_forwarded_traffic()); + + /* IUT SCP forwards the answer back to the NF consumer: */ + http2_exp_rx := tr_HTTP2_Msg(http2_tx.conn_id, + http2_tx.stream_id, + tr_HTTP2_header_block(pseudo_headers := tr_HTTP2_pseudo_headers_Resp(200)), + omit); + as_http2_adapter_receive(http2_rx, http2_exp_rx, idx := http2_tx.conn_id); + + f_http2_adapter_close(idx := http2_tx.conn_id); + setverdict(pass); +} +testcase TC_indirect_route_discovery() runs on MTC_CT { + var ConnHdlr vc_conn; + var ConnHdlrPars pars := f_ConnHdlrPars(0); + f_init(); + vc_conn := f_start_handler(refers(f_TC_indirect_route_discovery), pars); + vc_conn.done; + f_shutdown(); +} + +/* NF consumer sends to SCP with header 3gpp-sbi-target-apiroot to already known NF producer. SCP fowards to it. */ +private function f_TC_indirect_route_target_apiroot() runs on ConnHdlr { + var HTTP2_Msg http2_tx; + var HTTP2_Msg http2_rx; + var template (present) HTTP2_Msg http2_exp_rx; + + /* Test NF consumer sendig data through IUT SCP to our emulated NF producer and back: */ + http2_tx := f_n35_prepare_get_authentication_subscription(sbi_target_apiroot := c_NF_uri_prefix); + f_http2_adapter_connect_send_scp(http2_tx, idx := http2_tx.conn_id); + + as_nf_producer_receive_forwarded_traffic(f_tr_receive_forwarded_traffic()); + + /* IUT SCP forwards the answer back to the NF consumer: */ + http2_exp_rx := tr_HTTP2_Msg(http2_tx.conn_id, + http2_tx.stream_id, + tr_HTTP2_header_block(pseudo_headers := tr_HTTP2_pseudo_headers_Resp(200)), + omit); + as_http2_adapter_receive(http2_rx, http2_exp_rx, idx := http2_tx.conn_id); + + f_http2_adapter_close(idx := http2_tx.conn_id); + setverdict(pass); +} +testcase TC_indirect_route_target_apiroot() runs on MTC_CT { + var ConnHdlr vc_conn; + var ConnHdlrPars pars := f_ConnHdlrPars(0); + f_init(); + vc_conn := f_start_handler(refers(f_TC_indirect_route_target_apiroot), pars); + vc_conn.done; + f_shutdown(); +} + +control { + /* This one must be the first one: */ + execute( TC_startup_nrf_subscriptions() ); + + execute( TC_indirect_route_discovery() ); + execute( TC_indirect_route_target_apiroot() ); +} + +} diff --git a/scp/expected-results.xml b/scp/expected-results.xml new file mode 100644 index 0000000..b5795ed --- /dev/null +++ b/scp/expected-results.xml @@ -0,0 +1,6 @@ +<?xml version="1.0"?> +<testsuite name='Titan' tests='1' failures='0' errors='0' skipped='0' inconc='0' time='MASKED'> + <testcase classname='SCP_Tests' name='TC_startup_nrf_subscriptions' time='MASKED'/> + <testcase classname='SCP_Tests' name='TC_indirect_route_discovery' time='MASKED'/> + <testcase classname='SCP_Tests' name='TC_indirect_route_target_apiroot' time='MASKED'/> +</testsuite> diff --git a/scp/gen_links.sh b/scp/gen_links.sh new file mode 100755 index 0000000..2542c68 --- /dev/null +++ b/scp/gen_links.sh @@ -0,0 +1,52 @@ +#!/bin/bash -e + +BASEDIR=../deps + +. ../_buildsystem/gen_links.inc.sh + +DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src +FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn TCCConversion.cc TCCInterface.cc TCCInterface_ip.h" +FILES+=" TCCEncoding_Functions.ttcn TCCEncoding.cc " # GSM 7-bit coding +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.TestPorts.Common_Components.Socket-API/src +FILES="Socket_API_Definitions.ttcn" +gen_links $DIR $FILES + +# Required by MGCP and IPA +DIR=$BASEDIR/titan.TestPorts.IPL4asp/src +FILES="IPL4asp_Functions.ttcn IPL4asp_PT.cc IPL4asp_PT.hh IPL4asp_PortType.ttcn IPL4asp_Types.ttcn IPL4asp_discovery.cc IPL4asp_protocol_L234.hh" +gen_links $DIR $FILES + +# Needed by HTTP_Adapter (Prometheus_Checker.ttcn metrics): +DIR=$BASEDIR/titan.TestPorts.Common_Components.Abstract_Socket/src +FILES="Abstract_Socket.cc Abstract_Socket.hh " +gen_links $DIR $FILES + +# Needed by HTTP_Adapter (Prometheus_Checker.ttcn metrics): +DIR=$BASEDIR/titan.TestPorts.HTTPmsg/src +FILES="HTTPmsg_MessageLen.ttcn HTTPmsg_MessageLen_Function.cc HTTPmsg_PT.cc HTTPmsg_PT.hh HTTPmsg_PortType.ttcn HTTPmsg_Types.ttcn " +gen_links $DIR $FILES + +# Needed by HTTP2_Adapter: +DIR=$BASEDIR/titan.ProtocolModules.HTTP2/src +FILES="HTTP2_EncDec.cc HTTP2_Types.ttcn" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.ProtocolModules.JSON_v07_2006/src +FILES="JSON_Generic_Null_Def.asn JSON_Generic.ttcn" +gen_links $DIR $FILES + +DIR=$BASEDIR/osmo-ttcn3-openapi-generator/openapi-specs/3GPP_5GC_Rel19/ttcn3 +FILES="TS29571_CommonData.ttcn TS29510_Nnrf_NFManagement.ttcn TS29510_Nnrf_NFDiscovery.ttcn " +gen_links $DIR $FILES + +DIR=../library +FILES="Misc_Helpers.ttcn General_Types.ttcn GSM_Types.ttcn Osmocom_Types.ttcn Native_Functions.ttcn Native_FunctionDefs.cc IPCP_Types.ttcn IPCP_Templates.ttcn " +FILES+="SCTP_Templates.ttcn " +FILES+="HTTP2_CodecPort.ttcn HTTP2_CodecPort_CtrlFunct.ttcn HTTP2_CodecPort_CtrlFunctDef.cc HTTP2_Templates.ttcn HTTP2_Functions.ttcn HTTP2_Msg.ttcn HTTP2_Adapter.ttcn HTTP2_Server_Emulation.ttcn " +FILES+="HTTP_Adapter.ttcn Prometheus_Checker.ttcn " +FILES+="TS29571_CommonData_Templates.ttcn TS29510_Nnrf_NFManagement_Templates.ttcn TS29510_Nnrf_NFDiscovery_Templates.ttcn " +gen_links $DIR $FILES + +gen_links_finish diff --git a/scp/open5gs-scp.yaml b/scp/open5gs-scp.yaml new file mode 100644 index 0000000..e91a200 --- /dev/null +++ b/scp/open5gs-scp.yaml @@ -0,0 +1,17 @@ +# See https://github.com/open5gs/open5gs/blob/main/configs/open5gs/scp.yaml.in + +logger: + level: debug + +global: + max: + ue: 1024 + +scp: + sbi: + server: + - address: 127.0.0.200 + port: 7777 + client: + nrf: + - uri: http://127.0.0.10:7777 diff --git a/scp/regen_makefile.sh b/scp/regen_makefile.sh new file mode 100755 index 0000000..454b337 --- /dev/null +++ b/scp/regen_makefile.sh @@ -0,0 +1,23 @@ +#!/bin/sh -e + +NAME=SCP_Tests + +FILES=" + *.asn + *.ttcn + Abstract_Socket.cc + HTTPmsg_MessageLen_Function.cc + HTTPmsg_PT.cc + HTTP2_EncDec.cc + HTTP2_CodecPort_CtrlFunctDef.cc + IPL4asp_PT.cc + IPL4asp_discovery.cc + Native_FunctionDefs.cc + TCCConversion.cc + TCCEncoding.cc + TCCInterface.cc +" + +. ../_buildsystem/regen_makefile.inc.sh + +sed -i -e 's/^LINUX_LIBS = -lxml2 -lsctp/LINUX_LIBS = -lxml2 -lsctp -lgnutls/' Makefile diff --git a/scp/testenv.cfg b/scp/testenv.cfg new file mode 100644 index 0000000..34750bd --- /dev/null +++ b/scp/testenv.cfg @@ -0,0 +1,10 @@ +[testsuite] +program=SCP_Tests +config=SCP_Tests.cfg + +[scp] +program=open5gs-scpd -c open5gs-scp.yaml +make=open5gs +package=open5gs-scp +copy=open5gs-scp.yaml + diff --git a/scp/testsrcdir.cfg b/scp/testsrcdir.cfg new file mode 100644 index 0000000..7f19289 --- /dev/null +++ b/scp/testsrcdir.cfg @@ -0,0 +1,2 @@ +[testsrcdir] +max_jobs_per_gb_ram=0.3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/44180?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I594d71ee90e9126489856e9fbb2dd77e55214553 Gerrit-Change-Number: 44180 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in libosmocore[master]: cbsp: cbsp_decode_cell_list(): tweak coding style
by pespin 26 Nov '26

26 Nov '26
Attention is currently required from: fixeria. pespin has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/libosmocore/+/44179?usp=email ) Change subject: cbsp: cbsp_decode_cell_list(): tweak coding style ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/44179?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Icf9db71afe482c139cd07ca1a3df308af6877b4a Gerrit-Change-Number: 44179 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: Jenkins Builder Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Thu, 26 Nov 2026 19:03:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • ...
  • 9721
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.