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 -----
  • 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

December 2025

  • 1 participants
  • 1175 discussions
[L] Change in pysim[master]: card_key_provider: add PostgreSQL support
by dexter 22 Dec '25

22 Dec '25
Attention is currently required from: daniel, fixeria, laforge. dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/41508?usp=email ) Change subject: card_key_provider: add PostgreSQL support ...................................................................... Patch Set 9: (2 comments) File contrib/csv-to-pgsql.py: https://gerrit.osmocom.org/c/pysim/+/41508/comment/ac29290a_d7330054?usp=em… : PS8, Line 37: PQSQL > PGSQL or PSQL are usual acronyms for postgres. […] Done https://gerrit.osmocom.org/c/pysim/+/41508/comment/72a70abc_64ec120c?usp=em… : PS8, Line 261: str(Path.home()) + "/.osmocom/pysim/card_data_pqsql.cfg" > Not critical, but I guess the clean/pythonic way would be to use `os.path. […] Thanks, having the user name in the helptext is indeed something we should avoid. I remember having problems with resolving ~, but os.path.expanduser() works well when I apply it on the path when accessing opts.pqsql. I have also fixed this for pySim-shell.py -- To view, visit https://gerrit.osmocom.org/c/pysim/+/41508?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Icba625c02a60d7e1f519b506a46bda5ded0537d3 Gerrit-Change-Number: 41508 Gerrit-PatchSet: 9 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Mon, 22 Dec 2025 13:50:55 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
1 0
0 0
[S] Change in pysim[master]: pySim-shell: output git hash in case get_distribution fails
by laforge 22 Dec '25

22 Dec '25
Attention is currently required from: dexter, fixeria. laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/41738?usp=email ) Change subject: pySim-shell: output git hash in case get_distribution fails ...................................................................... Patch Set 2: Code-Review+1 (1 comment) File pySim-shell.py: https://gerrit.osmocom.org/c/pysim/+/41738/comment/88b928f9_51c60694?usp=em… : PS2, Line 530: cwd + "/.git" AFAIK os.path.join instead of string concatenation exists so would be the OS-independent version that would still work e.g. on windows where backslashes are used. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/41738?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I2b9038f88cfcaa07894a2f09c7f5ad8a5474083d Gerrit-Change-Number: 41738 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Mon, 22 Dec 2025 13:26:24 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in libosmo-abis[master]: trau cosmetic: update osmo_trau2rtp API comments
by laforge 22 Dec '25

22 Dec '25
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/41743?usp=email ) Change subject: trau cosmetic: update osmo_trau2rtp API comments ...................................................................... trau cosmetic: update osmo_trau2rtp API comments Since the writing of Doxygen API comments for osmo_trau2rtp() and osmo_trau2rtp_ufe(), these APIs gained the ability to convert CSD TRAU frames to TW-TS-007 in addition to CLEARMODE - document this addition. Also update comments regarding AMR, which is now supported via AMR TRAU frame interworking facility with its own API. Change-Id: Id287474c5824ab334da244701700051f9f014e66 --- M src/trau/trau_rtp_conv.c 1 file changed, 10 insertions(+), 6 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/trau/trau_rtp_conv.c b/src/trau/trau_rtp_conv.c index 9d23065..9b1dc58 100644 --- a/src/trau/trau_rtp_conv.c +++ b/src/trau/trau_rtp_conv.c @@ -1719,9 +1719,10 @@ * * In the case of FR/EFR speech, the output format is either RFC 3551 or * TW-TS-001; in the case of HRv1 speech, the output format is either RFC 5993 - * or TW-TS-002. st->rtp_extensions field selects the use or non-use of - * Themyscira RTP extensions; the structure passed in \ref st currently - * has no other uses in the TRAU->RTP direction. + * or TW-TS-002. In the case of CSD, the output format is either 160-octet + * CLEARMODE or compressed TW-TS-007. st->rtp_extensions field selects the use + * or non-use of Themyscira RTP extensions; the structure passed in \ref st + * currently has no other uses in the TRAU->RTP direction. * * The following TRAU frame types are _not_ supported: * @@ -1734,7 +1735,9 @@ * - D144 sync frames: these special frames are not convertible to RTP; * their synchronization function needs to be handled by the application. * - * - AMR speech frames: not currently implemented. + * - AMR speech frames are not supported by this API; AMR TRAU frame + * interworking facility of <osmocom/trau/amr_trau.h> needs to be used + * instead. */ int osmo_trau2rtp(uint8_t *out, size_t out_len, const struct osmo_trau_frame *tf, struct osmo_trau2rtp_state *st) @@ -1767,8 +1770,9 @@ * * - UFE checks exist only for HRv1 and EFR speech frames; for all other frame * types, this function never writes to *ufe. (AMR is another frame type - * for which TRAU-UL decoding would include a UFE check, but we currently - * don't support AMR at all.) + * for which high-level decoding can produce UFE and DFE results, but those + * frames need to be decoded with osmo_amrt_decode_trau_frame() and not the + * present API.) */ int osmo_trau2rtp_ufe(uint8_t *out, size_t out_len, const struct osmo_trau_frame *tf, struct osmo_trau2rtp_state *st, bool *ufe) -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/41743?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Id287474c5824ab334da244701700051f9f014e66 Gerrit-Change-Number: 41743 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in libosmo-abis[master]: trau2rtp: rm defunct AMR WIP code
by laforge 22 Dec '25

22 Dec '25
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/41744?usp=email ) Change subject: trau2rtp: rm defunct AMR WIP code ...................................................................... trau2rtp: rm defunct AMR WIP code When the present TRAU<->RTP conversion module was initially introduced in 2020, there was a WIP plan to eventually extend it to support AMR in addition to FR/HR/EFR. Defunct code for a beginning of trau2rtp implementation for AMR has sat in trau_rtp_conv.c under '#if 0' all these years - but it never became anything beyond dead code. When the time came to implement AMR TRAU support for real, the existing TRAU<->RTP API from 2020 design turned out to be insufficient; the AMR support that was merged just before 2025-12 major release takes the form of an entirely new AMR TRAU frame interworking facility with its own API. As a result of these developments, the original defunct AMR code from 2020 now only adds confusion - remove it. Change-Id: Ieeee8eb6dbf9c753458a91e13f2bf22311936259 --- M src/trau/trau_rtp_conv.c 1 file changed, 0 insertions(+), 136 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/trau/trau_rtp_conv.c b/src/trau/trau_rtp_conv.c index 9b1dc58..56cc109 100644 --- a/src/trau/trau_rtp_conv.c +++ b/src/trau/trau_rtp_conv.c @@ -1121,142 +1121,6 @@ return 0; } -#if 0 -static inline memcpy_inc(uint8_t *out, const uint8_t *in, size_t len, unsigned int *idx) -{ - memcpy_inc(out, in, len); - *idx += len; -} - -static int amr_speech_extract_sbits(ubit_t *s_bits, const struct osmo_trau_frame *tf, - enum osmo_amr_mode mode) -{ - unsigned int s_idx = 0; - - switch (mode) { - case AMR_4_75: - memcpy_inc(s_bits + s_idx, tf->d_bits + 44, 67 - 44, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 67, 92 - 67, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 95, 108 - 95, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 111, 132 - 111, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 135, 148 - 135, &s_idx); - break; - case AMR_5_15: - memcpy_inc(s_bits + s_idx, tf->d_bits + 46, 96 - 46, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 69, 92 - 69, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 95, 114 - 95, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 117, 136 - 117, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 139, 158 - 139, &s_idx); - break; - case AMR_5_90: - memcpy_inc(s_bits + s_idx, tf->d_bits + 41, 67 - 41, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 67, 92 - 67, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 95, 116 - 95, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 119, 144 - 119, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 147, 168 - 147, &s_idx); - break; - case AMR_6_70: - memcpy_inc(s_bits + s_idx, tf->d_bits + 37, 63 - 37, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 63, 92 - 63, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 95, 120 - 95, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 123, 152 - 123, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 155, 180 - 155, &s_idx); - break; - case AMR_7_40: - memcpy_inc(s_bits + s_idx, tf->d_bits + 34, 60 - 34, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 60, 92 - 60, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 95, 124 - 95, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 127, 159 - 127, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 162, 191 - 162, &s_idx); - break; - case AMR_7_95: - memcpy_inc(s_bits + s_idx, tf->d_bits + 31, 58 - 31, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 58, 92 - 58, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 95, 127 - 95, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 130, 164 - 130, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 167, 199 - 167, &s_idx); - break; - case AMR_10_2: - memcpy_inc(s_bits + s_idx, tf->d_bits + 20, 46 - 20, &s_idx); /* D21..D46 */ - memcpy_inc(s_bits + s_idx, tf->d_bits + 46, 92 - 46, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 95, 138 - 95, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 141, 187 - 141, &s_idx); - memcpy_inc(s_bits + s_idx, tf->d_bits + 190, 233 - 190, &s_idx); - break; - case AMR_12_2: - memcpy_inc(s_bits + s_idx, tf->d_bits + 0, 38 - 0, &s_idx); /* D1..D38 */ - memcpy_inc(s_bits + s_idx, tf->d_bits + 38, 91 - 38, &s_idx); /* D39..D91 */ - memcpy_inc(s_bits + s_idx, tf->d_bits + 94, 144 - 94, &s_idx); /* D95..D144 */ - memcpy_inc(s_bits + s_idx, tf->d_bits + 147, 200 - 147, &s_idx);/* D148..D200 */ - memcpy_inc(s_bits + s_idx, tf->d_bits + 203, 253 - 203, &s_idx);/* D204..D253 */ - break; - } - - return s_idx; -} - -/* TS 48.060 Section 5.5.1.2.2 */ -static int trau2rtp_16(uint8_t *out, const struct osmo_trau_frame *tf, enum osmo_amr_mode last_cmi) -{ - enum osmo_amr_mode mode = last_cmi; - uint8_t frame_class = tf->c_bits[21] << 1 | tf->c_bits[20]; - uint8_t cmr_cmi = tf->c_bits[23] << 2 | tf->c_bits[24] << 1 | tf->cb_bits[25]; - uint8_t no_speech_cls; - uint8_t s_bits[242]; - uint8_t d_bits[242]; - unsigned int s_idx = 0; - ubit_t rif = FIXME; - - if (tf->type != OSMO_TRAU16_FT_AMR) - return -EINVAL; - - if (rif == 0) - mode = cmr_cmi; - - switch (frame_class) { - case 0: // no speech - no_speech_cls = tf->d_bits[32] << 2 | tf->d_bits[33] << 1 | tf->d_bits[34]; - cmi_abs = tf->d_bits[35] << 2 | tf->d_bits[36] < 1 || tf->d_bits[37]; - cmr_abs = tf->d_bits[38] << 2 | tf->d_bits[39] < 1 || tf->d_bits[40]; - switch (no_speech_cls) { - case 7: // sid first - break; - case 6: // onset - break; - case 5: // sid_update - break; - case 4: // sid_bad - break; - case 0: // no_data - break; - } - break; - case 1: // speech bad - break; - case 2: - case 3: - /* Extract the s-bits from the TRAU frame */ - amr_speech_extract_sbits(s_bits, tf, mode); - /* Convert the s-bits to d-bits */ - osmo_amr_s_to_d(d_bits, s_bits, mode); - break; - } -} - -int trau2rtp_amr(uint8_t *out, const struct osmo_trau_frame *tf, enum osmo_amr_mode last_cmi)) -{ - switch (tf->type) { - case OSMO_TRAU16_FT_AMR: - return trau2rtp_16(out, tf, last_cmi); - case OSMO_TRAU8_AMR_LOW: - case OSMO_TRAU8_AMR_6k7: - case OSMO_TRAU8_AMR_7k4: - default: - return -EINVAL; - } -} -#endif - /* * CSD support: converting TRAU frames of type 'data' to 64 kbit/s * like the RA part of TRAU, using RTP clearmode representation. -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/41744?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Ieeee8eb6dbf9c753458a91e13f2bf22311936259 Gerrit-Change-Number: 41744 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in libosmo-abis[master]: trau_rtp cosmetic: rm dead const lines
by laforge 22 Dec '25

22 Dec '25
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/41745?usp=email ) Change subject: trau_rtp cosmetic: rm dead const lines ...................................................................... trau_rtp cosmetic: rm dead const lines The two const data items removed in this patch were already commented out, and it is not clear where or how they were ever intended to be used. Remove them to reduce clutter. Change-Id: Ic1b091ec96eafc8759d90d14201c8698ef251761 --- M src/trau/trau_rtp_conv.c 1 file changed, 0 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/trau/trau_rtp_conv.c b/src/trau/trau_rtp_conv.c index 56cc109..b0c36a3 100644 --- a/src/trau/trau_rtp_conv.c +++ b/src/trau/trau_rtp_conv.c @@ -97,9 +97,6 @@ memcpy(check_bits + 6 , d_bits + 252, 2); } -//static const uint8_t c_bits_check_fr[] = { 0, 0, 0, 1, 0 }; -//static const uint8_t c_bits_check_efr[] = { 1, 1, 0, 1, 0 }; - /* * This little helper function modifies a marked-bad (BFI=1) GSM-FR payload * so it would no longer classify as SID by the bit counting rules -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/41745?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Ic1b091ec96eafc8759d90d14201c8698ef251761 Gerrit-Change-Number: 41745 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in libosmo-abis[master]: trau_rtp cosmetic: rm dead const lines
by laforge 22 Dec '25

22 Dec '25
Attention is currently required from: falconia. laforge has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/41745?usp=email ) Change subject: trau_rtp cosmetic: rm dead const lines ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/41745?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Ic1b091ec96eafc8759d90d14201c8698ef251761 Gerrit-Change-Number: 41745 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Mon, 22 Dec 2025 13:25:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in libosmo-abis[master]: trau2rtp: rm defunct AMR WIP code
by laforge 22 Dec '25

22 Dec '25
Attention is currently required from: falconia. laforge has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/41744?usp=email ) Change subject: trau2rtp: rm defunct AMR WIP code ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/41744?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Ieeee8eb6dbf9c753458a91e13f2bf22311936259 Gerrit-Change-Number: 41744 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Mon, 22 Dec 2025 13:25:10 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in libosmo-abis[master]: trau cosmetic: update osmo_trau2rtp API comments
by laforge 22 Dec '25

22 Dec '25
Attention is currently required from: falconia. laforge has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/41743?usp=email ) Change subject: trau cosmetic: update osmo_trau2rtp API comments ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/41743?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Id287474c5824ab334da244701700051f9f014e66 Gerrit-Change-Number: 41743 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Mon, 22 Dec 2025 13:24:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: 5gc: Test UE Triggered Service Request
by pespin 22 Dec '25

22 Dec '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41747?usp=email ) Change subject: 5gc: Test UE Triggered Service Request ...................................................................... 5gc: Test UE Triggered Service Request Change-Id: I65cf7844d11be55d9d5c8e31fd87a3c72e6a607b --- M 5gc/C5G_Tests.ttcn M 5gc/ConnHdlr.ttcn M 5gc/expected-results.xml M library/NGAP_Functions.ttcn M library/NG_NAS_Osmo_Templates.ttcn M library/NG_NAS_Osmo_Types.ttcn 6 files changed, 345 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/47/41747/1 diff --git a/5gc/C5G_Tests.ttcn b/5gc/C5G_Tests.ttcn index 699d998..4076a09 100644 --- a/5gc/C5G_Tests.ttcn +++ b/5gc/C5G_Tests.ttcn @@ -413,6 +413,93 @@ } } +/* 3GPP TS 23.502 4.2.3.2 UE Triggered Service Request. + * UE signals the active session as active, and it has UL data for it */ +private function f_TC_ue_service_request_cm_idle_ul_data() runs on ConnHdlr { + var PDU_SessionStatus pdu_session_status; + + f_register(); + f_pdu_sess_establish(false); + pdu_session_status := f_PDU_SessionStatus(); + f_service_request_cm_idle(ul_data_status := pdu_session_status, + pdu_sess_status := pdu_session_status); + + as_ngap_handle_PDUSessionResourceSetupReq(); + + NGAP.receive(cr_NG_SERVICE_ACCEPT(p_PDU_SessionStatus := cr_PDU_SessionStatus('00000010'B, '00000000'B))); + + f_deregister(); +} +testcase TC_ue_service_request_cm_idle_ul_data() runs on MTC_CT { + f_init(); + f_ngap_setup(0); + + var ConnHdlrPars pars := f_init_pars(ue_idx := 0); + var ConnHdlr vc_conn; + vc_conn := f_start_handler_with_pars(refers(f_TC_ue_service_request_cm_idle_ul_data), pars); + vc_conn.done; +} + +/* 3GPP TS 23.502 4.2.3.2 UE Triggered Service Request. + * UE signals that the active session is now inactive. AMF sends a PFCP Session Delete to SMF. */ +private function f_TC_ue_service_request_cm_idle_inact_sess() runs on ConnHdlr { + f_register(); + f_pdu_sess_establish(false); + f_service_request_cm_idle(pdu_sess_status := cs_PDU_SessionStatus('00000000'B, '00000000'B)); + NGAP.receive(cr_NG_SERVICE_ACCEPT(p_PDU_SessionStatus := cr_PDU_SessionStatus('00000000'B, '00000000'B))); + f_deregister(); +} +testcase TC_ue_service_request_cm_idle_inact_sess() runs on MTC_CT { + f_init(); + f_ngap_setup(0); + + var ConnHdlrPars pars := f_init_pars(ue_idx := 0); + var ConnHdlr vc_conn; + vc_conn := f_start_handler_with_pars(refers(f_TC_ue_service_request_cm_idle_inact_sess), pars); + vc_conn.done; +} + +/* 3GPP TS 23.502 4.2.3.2 UE Triggered Service Request. + * UE signals that a session unknown to netowrk is active: */ +private function f_TC_ue_service_request_cm_idle_unknown_sess_active() runs on ConnHdlr { + f_register(); + /* TODO: calculate bitmask based on PDU Session Id obtained during PDU Session Establish procedure */ + f_service_request_cm_idle(pdu_sess_status := cs_PDU_SessionStatus('00000010'B, '00000000'B)); + NGAP.receive(cr_NG_SERVICE_ACCEPT(p_PDU_SessionStatus := cr_PDU_SessionStatus('00000000'B, '00000000'B))); + f_deregister(); +} +testcase TC_ue_service_request_cm_idle_unknown_sess_active() runs on MTC_CT { + f_init(); + f_ngap_setup(0); + + var ConnHdlrPars pars := f_init_pars(ue_idx := 0); + var ConnHdlr vc_conn; + vc_conn := f_start_handler_with_pars(refers(f_TC_ue_service_request_cm_idle_unknown_sess_active), pars); + vc_conn.done; +} + +/* 3GPP TS 23.502 4.2.3.2 UE Triggered Service Request. While in CM-CONNECTED state. */ +private function f_TC_ue_service_request_cm_connected() runs on ConnHdlr { + var PDU_SessionStatus pdu_session_status; + + f_register(); + f_pdu_sess_establish(false); + pdu_session_status := f_PDU_SessionStatus(); + f_service_request_cm_connected(ul_data_status := cs_PDU_SessionStatus('00000000'B, '00000000'B), + pdu_sess_status := pdu_session_status); + NGAP.receive(cr_NG_SERVICE_ACCEPT(p_PDU_SessionStatus := cr_PDU_SessionStatus('00000010'B, '00000000'B))); + f_deregister(); +} +testcase TC_ue_service_request_cm_connected() runs on MTC_CT { + f_init(); + f_ngap_setup(0); + + var ConnHdlrPars pars := f_init_pars(ue_idx := 0); + var ConnHdlr vc_conn; + vc_conn := f_start_handler_with_pars(refers(f_TC_ue_service_request_cm_connected), pars); + vc_conn.done; +} + control { execute( TC_ng_setup() ); @@ -429,13 +516,17 @@ } execute( TC_ng_register_ping4() ); execute( TC_ng_register_ping4_256() ); + + execute( TC_ue_service_request_cm_idle_ul_data() ); + execute( TC_ue_service_request_cm_idle_inact_sess() ); + execute( TC_ue_service_request_cm_idle_unknown_sess_active() ); + execute( TC_ue_service_request_cm_connected() ); } /* TODO: * - 3GPP TS 23.502 4.2.2.2.3 Registration with AMF re-allocation * - 3GPP TS 23.502 4.2.2.2.4 Registration with Onboarding SNPN * - 3GPP TS 23.502 4.2.2.3.3 Network-initiated Deregistration - * - 3GPP TS 23.502 4.2.3.2 UE Triggered Service Request * - 3GPP TS 23.502 4.2.3.3 Network Triggered Service Request * - 3GPP TS 23.502 4.2.4.3 UE Configuration Update procedure for transparent UE Policy delivery * - 3GPP TS 23.502 4.2.5.2 UE Reachability Notification Request procedure diff --git a/5gc/ConnHdlr.ttcn b/5gc/ConnHdlr.ttcn index 3e51545..840a9df 100644 --- a/5gc/ConnHdlr.ttcn +++ b/5gc/ConnHdlr.ttcn @@ -182,6 +182,22 @@ return g_pars.ue_pars.pti; } +/* 3GPP TS 24.501 9.11.3.44 PDU session status */ +function f_PDU_SessionStatus() runs on ConnHdlr return PDU_SessionStatus +{ + var template (value) PDU_SessionStatus st; + var BIT1 sess_id1_active; + + if (ispresent(g_pars.ue_pars.sess_pars.cn_gtpu_teid)) { + sess_id1_active := '1'B; + } else { + sess_id1_active := '0'B; + } + + st := cs_PDU_SessionStatus('000000'B & sess_id1_active & '0'B, '00000000'B); + return valueof(st); +} + /* 3GPP TS 24.501 5.4.1.3.2, 3GPP TS 33.501 6.1.3.2 */ private altstep as_ngap_handle_auth(boolean allow_resync := true) runs on ConnHdlr { var NG_NAS_DL_Message_Type rx_nas; @@ -281,18 +297,13 @@ } } -/* Handle a PDUSessionResourceSetupRequestTransfer contained inside NGAP InitialContextSetupRequest and return a Result for InitialContextSetupResponse */ -private function f_pdu_handle_session_resource_setup_item(PDUSessionResourceSetupItemCxtReq req) runs on ConnHdlr return PDUSessionResourceSetupItemCxtRes -{ - var PDUSessionResourceSetupItemCxtRes resp; - var octetstring setup_trans_enc; - var NGAP_IEs.PDUSessionResourceSetupRequestTransfer setup_req_transf; - var NGAP_IEs.PDUSessionResourceSetupResponseTransfer setup_resp_transf; +/* Handle a PDUSessionResourceSetupRequestTransfer and return a Result */ +private function f_pdu_handle_PDUSessionResourceSetupRequestTransfer(NGAP_IEs.PDUSessionResourceSetupRequestTransfer setup_req_transf) +runs on ConnHdlr return NGAP_IEs.PDUSessionResourceSetupResponseTransfer { var template (value) UPTransportLayerInformation utla; var template (value) QosFlowPerTNLInformation qos; + var NGAP_IEs.PDUSessionResourceSetupResponseTransfer setup_resp_transf; - /* Parse PDUSessionResourceSetupRequestTransfer contained inside InitialContextSetupRequest's PDUSessionResourceSetup Item: */ - setup_req_transf := dec_NGAP_PDUSessionResourceSetupRequestTransfer(req.pDUSessionResourceSetupRequestTransfer); for (var integer i := 0; i < lengthof(setup_req_transf.protocolIEs); i := i + 1) { if (setup_req_transf.protocolIEs[i].id == id_UL_NGU_UP_TNLInformation) { var UPTransportLayerInformation utli := setup_req_transf.protocolIEs[i].value_.uPTransportLayerInformation; @@ -307,17 +318,33 @@ p_gtp_teid := g_pars.ue_pars.sess_pars.ran_gtpu_teid)); qos := m_qosFlowPerTNLInformation(utla, { m_associatedQosFlowItem(1) }); setup_resp_transf := valueof(m_pDUSessionResourceSetupResponseTransfer(qos)); + + return setup_resp_transf; +} + +/* Handle a PDUSessionResourceSetupRequestTransfer contained inside NGAP InitialContextSetupRequest and return a Result for InitialContextSetupResponse */ +private function f_pdu_handle_session_resource_setup_item_ctx(PDUSessionResourceSetupItemCxtReq req) runs on ConnHdlr return PDUSessionResourceSetupItemCxtRes +{ + var PDUSessionResourceSetupItemCxtRes resp; + var octetstring setup_trans_enc; + var NGAP_IEs.PDUSessionResourceSetupRequestTransfer setup_req_transf; + var NGAP_IEs.PDUSessionResourceSetupResponseTransfer setup_resp_transf; + + /* Parse PDUSessionResourceSetupRequestTransfer contained inside InitialContextSetupRequest's PDUSessionResourceSetup Item: */ + setup_req_transf := dec_NGAP_PDUSessionResourceSetupRequestTransfer(req.pDUSessionResourceSetupRequestTransfer); + setup_resp_transf := f_pdu_handle_PDUSessionResourceSetupRequestTransfer(setup_req_transf); + setup_trans_enc := enc_NGAP_PDUSessionResourceSetupResponseTransfer(setup_resp_transf) resp := valueof(m_pDUSessionResourceSetupItemCxtRes(req.pDUSessionID, setup_trans_enc)); return resp; } -private function f_pdu_handle_session_resource_setup_list(PDUSessionResourceSetupListCxtReq li_req) runs on ConnHdlr return PDUSessionResourceSetupListCxtRes +private function f_pdu_handle_session_resource_setup_list_ctx(PDUSessionResourceSetupListCxtReq li_req) runs on ConnHdlr return PDUSessionResourceSetupListCxtRes { var PDUSessionResourceSetupListCxtRes li_resp; for (var integer i := 0; i < lengthof(li_req); i := i + 1) { var PDUSessionResourceSetupItemCxtRes it_resp; - it_resp := f_pdu_handle_session_resource_setup_item(li_req[i]); + it_resp := f_pdu_handle_session_resource_setup_item_ctx(li_req[i]); if (i == 0) { /* min 1 item in list doesn't allow previously allocating an empty list */ li_resp := { it_resp }; } else { @@ -347,7 +374,7 @@ continue; } var PDUSessionResourceSetupListCxtReq li := ctx_setup_req.protocolIEs[i].value_.pDUSessionResourceSetupListCxtReq; - resources := f_pdu_handle_session_resource_setup_list(li); + resources := f_pdu_handle_session_resource_setup_list_ctx(li); } NGAP.send(m_ngap_succMsg(m_n2_InitialContextSetupResponse(g_pars.ue_pars.amf_id, g_pars.ue_pars.ran_id, @@ -355,6 +382,64 @@ } } +/* Handle a PDUSessionResourceSetupRequestTransfer contained inside NGAP InitialContextSetupRequest and return a Result for InitialContextSetupResponse */ +private function f_pdu_handle_session_resource_setup_item_su(PDUSessionResourceSetupItemSUReq req) runs on ConnHdlr return PDUSessionResourceSetupItemSURes +{ + var PDUSessionResourceSetupItemSURes resp; + var octetstring setup_trans_enc; + var NGAP_IEs.PDUSessionResourceSetupRequestTransfer setup_req_transf; + var NGAP_IEs.PDUSessionResourceSetupResponseTransfer setup_resp_transf; + + /* Parse PDUSessionResourceSetupRequestTransfer contained inside InitialContextSetupRequest's PDUSessionResourceSetup Item: */ + setup_req_transf := dec_NGAP_PDUSessionResourceSetupRequestTransfer(req.pDUSessionResourceSetupRequestTransfer); + setup_resp_transf := f_pdu_handle_PDUSessionResourceSetupRequestTransfer(setup_req_transf); + + setup_trans_enc := enc_NGAP_PDUSessionResourceSetupResponseTransfer(setup_resp_transf) + resp := valueof(m_pDUSessionResourceSetupItemSURes(req.pDUSessionID, setup_trans_enc)); + return resp; +} + +private function f_pdu_handle_session_resource_setup_list_su(PDUSessionResourceSetupListSUReq li_req) runs on ConnHdlr return PDUSessionResourceSetupListSURes +{ + var PDUSessionResourceSetupListSURes li_resp; + for (var integer i := 0; i < lengthof(li_req); i := i + 1) { + var PDUSessionResourceSetupItemSURes it_resp; + it_resp := f_pdu_handle_session_resource_setup_item_su(li_req[i]); + if (i == 0) { /* min 1 item in list doesn't allow previously allocating an empty list */ + li_resp := { it_resp }; + } else { + li_resp := li_resp & { it_resp }; + } + } + return li_resp; +} + +/* 3GPP TS 38.413 9.2.1.1 PDU SESSION RESOURCE SETUP REQUEST */ +altstep as_ngap_handle_PDUSessionResourceSetupReq() runs on ConnHdlr { + var NGAP_PDU rx_ngap; + var template (present) NGAP_PDU exp_ngap := + mw_ngap_initMsg(f_mw_n2_PDUSessionResourceSetupRequest(g_pars.ue_pars.amf_id, + g_pars.ue_pars.ran_id, + p_nAS_PDU := ?, + p_pDUSessionResourceSetupListSUReq := ?)); + + [] NGAP.receive(exp_ngap) -> value rx_ngap { + var PDUSessionResourceSetupRequest pdu := rx_ngap.initiatingMessage.value_.pDUSessionResourceSetupRequest; + var PDUSessionResourceSetupListSURes resources; + + for (var integer i := 0; i < lengthof(pdu.protocolIEs); i := i + 1) { + if (pdu.protocolIEs[i].id != id_PDUSessionResourceSetupListSUReq) { + continue; + } + var PDUSessionResourceSetupListSUReq li := pdu.protocolIEs[i].value_.pDUSessionResourceSetupListSUReq; + resources := f_pdu_handle_session_resource_setup_list_su(li); + } + NGAP.send(m_ngap_succMsg(m_n2_PDUSessionResourceSetupResponse(g_pars.ue_pars.amf_id, + g_pars.ue_pars.ran_id, + resources))); + } +} + /* 3GPP TS 23.502 4.3.2.2 UE Requested PDU Session Establishment */ function f_pdu_sess_establish(boolean configure_userplane := true) runs on ConnHdlr { var template (value) NG_NAS_UL_Message_Type nas_ul_msg; @@ -594,6 +679,66 @@ as_ngap_handle_configuration_update(); } + +/* 3GPP TS 24.501 5.6.1 Service request procedure + * 3GPP TS 23.502 4.2.3.2 UE Triggered Service Request */ +function f_service_request_cm_connected(template (omit) ULDataStatus ul_data_status := omit, + template (omit) PDU_SessionStatus pdu_sess_status := omit) runs on ConnHdlr { + var template (value) NGAP_PDU tx_pdu; + var template (value) NG_NAS_UL_Message_Type nas_ul_msg; + var NAS_PDU nas_pdu; + var NG_NAS_DL_Message_Type rx_nas; + + nas_ul_msg := cs_NG_SERVICE_REQUEST(c_ServiceType_signalling, + g_pars.kset_id, + cs_NG_MobileIdentity_STMSI(omit, g_pars.ue_pars.guti), + p_ULDataStatus := ul_data_status, + p_PDU_SessionStatus := pdu_sess_status); + nas_pdu := enc_NG_NAS_UL_Message_Type(valueof(nas_ul_msg)); + NGAP.send(nas_ul_msg); +} + +/* 3GPP TS 24.501 5.6.1 Service request procedure + * 3GPP TS 23.502 4.2.3.2 UE Triggered Service Request */ +function f_service_request_cm_idle(template (omit) ULDataStatus ul_data_status := omit, + template (omit) PDU_SessionStatus pdu_sess_status := omit) runs on ConnHdlr { + var template (value) NGAP_PDU tx_pdu; + var template (value) NG_NAS_UL_Message_Type nas_ul_msg; + var NAS_PDU nas_pdu; + + nas_ul_msg := cs_NG_SERVICE_REQUEST(c_ServiceType_signalling, + g_pars.kset_id, + cs_NG_MobileIdentity_STMSI(omit, g_pars.ue_pars.guti), + p_ULDataStatus := ul_data_status, + p_PDU_SessionStatus := pdu_sess_status); + nas_pdu := enc_NG_NAS_UL_Message_Type(valueof(nas_ul_msg)); + nas_ul_msg := cs_NG_SERVICE_REQUEST(c_ServiceType_signalling, + g_pars.kset_id, + cs_NG_MobileIdentity_STMSI(omit, g_pars.ue_pars.guti), + p_Msg := cs_ReplayedNASMessageContainerTLV(nas_pdu)); + + //TODO: add a function to send a NAS_UL_MSG and receive the encoded one. + var BIT4 sec_hdr_t := '0001'B; + var integer tx_count := 0; + nas_pdu := enc_NG_NAS_UL_Message_Type(valueof(nas_ul_msg)); + var OCT4 mac := f_NG_NAS_mac_calc(NG_NAS_ALG_IP_NIA1, f_kdf_ng_nas_int(g_keys.kamf, NG_NAS_ALG_IP_NIA1), + tx_count, + bit2int(tsc_NG_RegResult_3GPP), + false, '00'O & nas_pdu); + var NG_NAS_UL_Message_Type nas_out; + nas_out := valueof(cs_NG_SECURITY_PROTECTED_NAS_MESSAGE(tsc_EPD_GMM, + sec_hdr_t, + mac, + int2oct(tx_count, 1), + nas_pdu)); + nas_pdu := enc_NG_NAS_UL_Message_Type(valueof(nas_out)); + tx_pdu := m_ngap_initMsg(m_n2_initialUeMessage(g_pars.ue_pars.ran_id, + nas_pdu, /* Service request */ + f_ULI(), + mo_Signalling)); + NGAP.send(tx_pdu); +} + /* 3GPP TS 24.501 5.5.2.2 UE-initiated de-registration procedure, * 3GPP TS 23.502 4.2.2.3.2 UE-initiated Deregistration */ function f_deregister() runs on ConnHdlr { diff --git a/5gc/expected-results.xml b/5gc/expected-results.xml index 852a77d..e0f7c35 100644 --- a/5gc/expected-results.xml +++ b/5gc/expected-results.xml @@ -10,4 +10,8 @@ <testcase classname='C5G_Tests' name='TC_pdu_sess_modification' time='MASKED'/> <testcase classname='C5G_Tests' name='TC_ng_register_ping4' time='MASKED'/> <testcase classname='C5G_Tests' name='TC_ng_register_ping4_256' time='MASKED'/> + <testcase classname='C5G_Tests' name='TC_ue_service_request_cm_idle_ul_data' time='MASKED'/> + <testcase classname='C5G_Tests' name='TC_ue_service_request_cm_idle_inact_sess' time='MASKED'/> + <testcase classname='C5G_Tests' name='TC_ue_service_request_cm_idle_unknown_sess_active' time='MASKED'/> + <testcase classname='C5G_Tests' name='TC_ue_service_request_cm_connected' time='MASKED'/> </testsuite> diff --git a/library/NGAP_Functions.ttcn b/library/NGAP_Functions.ttcn index d7b8893..c096214 100644 --- a/library/NGAP_Functions.ttcn +++ b/library/NGAP_Functions.ttcn @@ -31,6 +31,9 @@ case (id_UEContextRelease) { return im.value_.uEContextReleaseCommand.protocolIEs[0].value_.uE_NGAP_IDs.uE_NGAP_ID_pair.aMF_UE_NGAP_ID; } + case (id_PDUSessionResourceSetup) { + return im.value_.pDUSessionResourceSetupRequest.protocolIEs[0].value_.aMF_UE_NGAP_ID; + } case (id_PDUSessionResourceModify) { return im.value_.pDUSessionResourceModifyRequest.protocolIEs[0].value_.aMF_UE_NGAP_ID; } @@ -80,6 +83,9 @@ case (id_UEContextRelease) { return im.value_.uEContextReleaseCommand.protocolIEs[0].value_.uE_NGAP_IDs.uE_NGAP_ID_pair.rAN_UE_NGAP_ID; } + case (id_PDUSessionResourceSetup) { + return im.value_.pDUSessionResourceSetupRequest.protocolIEs[1].value_.RAN_UE_NGAP_ID; + } case (id_PDUSessionResourceModify) { return im.value_.pDUSessionResourceModifyRequest.protocolIEs[1].value_.RAN_UE_NGAP_ID; } @@ -157,6 +163,15 @@ } return omit; } + case (id_PDUSessionResourceSetup) { + var PDUSessionResourceSetupRequest msg := im.value_.pDUSessionResourceSetupRequest; + for (i := 0; i < lengthof(msg.protocolIEs); i := i+1) { + if (msg.protocolIEs[i].id == id_NAS_PDU) { + return msg.protocolIEs[i].value_.NAS_PDU; + } + } + return omit; + } case (id_PDUSessionResourceModify) { var PDUSessionResourceModifyRequest msg := im.value_.pDUSessionResourceModifyRequest; for (i := 0; i < lengthof(msg.protocolIEs); i := i+1) { diff --git a/library/NG_NAS_Osmo_Templates.ttcn b/library/NG_NAS_Osmo_Templates.ttcn index 423a05e..393ae69 100644 --- a/library/NG_NAS_Osmo_Templates.ttcn +++ b/library/NG_NAS_Osmo_Templates.ttcn @@ -18,6 +18,8 @@ import from NG_NAS_Templates all; import from NG_NAS_MsgContainers all; +import from NG_NAS_Osmo_Types all; + /* 24.501 cl. 9.11.3.54 */ template (value) NG_UE_SecurityCapability cs_NG_UE_SecurityCapabilityTLV(template (value) O1_Type ngeaCap := 'f0'O, @@ -133,6 +135,18 @@ sessionId := p_Id }; +/* 24.501 cl. 9.11.3.44 */ +template (value) PDU_SessionStatus +cs_PDU_SessionStatus(template (value) B8_Type p_Psi0_7 := '00000000'B, + template (value) B8_Type p_Psi8_15 := '00000000'B):= +{ + iei := '50'O, + iel := '02'O, + psi0_7 := p_Psi0_7, + psi8_15 := p_Psi8_15, + spare := omit +}; + /* 24.501 cl. 9.11.3.47 */ template (value) NG_Request_Type cs_NG_Request_TypeTV(B3_Type p_RequestValue) := { @@ -441,6 +455,60 @@ } }; +/* 24.501 cl. 8.2.16 Service request */ +template (value) NG_NAS_UL_Message_Type +cs_NG_SERVICE_REQUEST(template (value) B4_Type p_ServiceType := c_ServiceType_signalling, + template (value) NAS_KeySetIdentifier p_KSI, + template (value) NG_MobileIdentity p_S_TMSI, + template (omit) ULDataStatus p_ULDataStatus := omit, + template (omit) PDU_SessionStatus p_PDU_SessionStatus := omit, + template (omit) AllowedPDU_SessionStatus p_AllowedPDU_SessionStatus := omit, + template (omit) NASMessageContainer p_Msg := omit, + template (omit) UE_RequestType p_UeRequestType := omit, + template (omit) NG_PagingRestriction p_PagingRestrict := omit) := { + service_Request := { + protocolDiscriminator := tsc_EPD_GMM, /* cl. 9.2 M V 1 */ + spareHalfOctet := tsc_SpareHalfOctet, /* cl. 9.3 M V 1/2 */ + securityHeaderType := tsc_SHT_NoSecurityProtection, + messageType := tsc_MT_NG_ServiceRequest, /* cl. 9.7 M V 1 */ + serviceType := p_ServiceType, /* cl. 9.11.3.50 M V 1/2 */ + ngKSI := p_KSI, /* cl. 9.11.3.32 M V 1/2 */ + s_TMSI := p_S_TMSI, /* cl. 9.11.3.4 M LV 6 */ + ulDataStatus := p_ULDataStatus, /* cl. 9.11.2.57 O TLV 4-34 IEI=40 */ + pduSessionStatus := p_PDU_SessionStatus, /* cl. 9.11.2.44 O TLV 4-34 IEI=50 */ + allowedPDUSessionStatus := p_AllowedPDU_SessionStatus, /* cl. 9.11.3.13 O TLV 4-34 IEI=25 */ + nasMsg := p_Msg, /* cl. 9.11.3.33 O TLV-E 4-n IEI=71 Dec18 */ + ueRequestType := p_UeRequestType, /* cl. 9.11.3.76 O TLV 3 IEI=29 Sep22 @sic R5s221179 Baseline Moving sic@ */ + pagingRestrict := p_PagingRestrict /* cl. 9.11.3.77 O TLV 3-35 IEI=28 Sep22 @sic R5s221179 Baseline Moving sic@ */ + } +} + +/* 24.501 cl. 8.2.17 Service accept */ +template NG_NAS_DL_Message_Type +cr_NG_SERVICE_ACCEPT(template PDU_SessionStatus p_PDU_SessionStatus := *, + template PDU_SessionReactivationResult p_PDU_SessionReactivationResult := *, + template PDU_SessionReactivationError p_PDU_SessionReactivationError := *, + template EAP_Message p_EAP := *, + template GPRS_Timer2 p_T3448 := *, + template NG_AddReqResult p_AddRequestResult := *, + template NG_TrackingAreaIdList p_ForbidTAIList_Roaming := *, + template NG_TrackingAreaIdList p_ForbidTAIList_RegProvService := *) := { + service_Accept := { + protocolDiscriminator := tsc_EPD_GMM, /* cl. 9.2 M V 1 */ + spareHalfOctet := tsc_SpareHalfOctet, /* cl. 9.3 M V 1/2 */ + securityHeaderType := tsc_SHT_NoSecurityProtection, + messageType := tsc_MT_NG_ServiceAccept, /* cl. 9.7 M V 1 */ + pduSessionStatus := p_PDU_SessionStatus, /* cl. 9.11.2.44 O TLV 4-34 IEI=50 */ + pduSessionReactivationResult := p_PDU_SessionReactivationResult, /* cl. 9.11.3.42 O TLV 4-32 IEI=26 */ + pduSessionReactResultError := p_PDU_SessionReactivationError, /* cl. 9.11.3.43 O TLV-E 5-515 IEI=7E */ + eapMessage := p_EAP, /* cl. 9.11.2.2 O TLV-E 7-1503 IEI=78*/ + t3448 := p_T3448, /* cl. 9.11.2.4 O TLV 3 IEI=6B Sep20 @sic R5s201387 Baseline Moving sic@ */ + ngAddRequestResult := p_AddRequestResult, /* cl. 9.11.3.81 O TLV 3 IEI=34 Sep22 @sic R5s221179 Baseline Moving sic@ */ + forbidTAIList_Roaming := p_ForbidTAIList_Roaming, /* cl. 9.11.3.9 O TLV 9-114 IEI=1D Sep22 @sic R5s221179 Baseline Moving sic@ */ + forbidTAIList_RegProvService := p_ForbidTAIList_RegProvService /* cl. 9.11.3.9 O TLV 9-114 IEI=1E Sep22 @sic R5s221179 Baseline Moving sic@ */ + } +} + /* 24.501 cl. 8.2.19 */ template (present) NG_NAS_DL_Message_Type cr_NG_CONFIGURATION_UPDATE_COMMAND(template ConfigUpdateInd p_ConfigUpdateInd := *, diff --git a/library/NG_NAS_Osmo_Types.ttcn b/library/NG_NAS_Osmo_Types.ttcn index c152ad6..a1a5263 100644 --- a/library/NG_NAS_Osmo_Types.ttcn +++ b/library/NG_NAS_Osmo_Types.ttcn @@ -39,6 +39,15 @@ const NAS_CauseValue_Type c_5GSM_Cause_RegularDeactivation := '00100100'B; +/* 3GPP TS 24.501 9.11.3.50 Service type */ +const BIT4 c_ServiceType_signalling := '0000'B; +const BIT4 c_ServiceType_data := '0001'B; +const BIT4 c_ServiceType_mobile_terminated_services := '0010'B; +const BIT4 c_ServiceType_emergency_services := '0011'B; +const BIT4 c_ServiceType_emergency_services_fallback := '0100'B; +const BIT4 c_ServiceType_high_priority_access := '0101'B; +const BIT4 c_ServiceType_elevated_signalling := '0110'B; + /* This is a subset of the msgs in NG_NAS_DL_Message_Type. The subset is formed * by Session Management messages, see 3GPP TS 24.501 clause 6 and clause 8.3. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41747?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: I65cf7844d11be55d9d5c8e31fd87a3c72e6a607b Gerrit-Change-Number: 41747 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: library/NGAP_Templates: PDUSessionResourceSetupRequest: Allow matchin...
by pespin 22 Dec '25

22 Dec '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41746?usp=email ) Change subject: library/NGAP_Templates: PDUSessionResourceSetupRequest: Allow matching optional IEs ...................................................................... library/NGAP_Templates: PDUSessionResourceSetupRequest: Allow matching optional IEs Change-Id: I7a61b4d7a70994e35f2fa5cbadc90f1088b32e64 --- M library/ngap/NGAP_Templates.ttcn 1 file changed, 79 insertions(+), 28 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/46/41746/1 diff --git a/library/ngap/NGAP_Templates.ttcn b/library/ngap/NGAP_Templates.ttcn index 1910120..27a9e33 100644 --- a/library/ngap/NGAP_Templates.ttcn +++ b/library/ngap/NGAP_Templates.ttcn @@ -145,35 +145,86 @@ /** * @see ETSI TS 138 413 V16.12.0 (2023-05) Clause 9.2.1.1 PDU SESSION RESOURCE SETUP REQUEST */ - template (present) InitiatingMessage mw_n2_PDUSessionResourceSetupRequest( - template (present) AMF_UE_NGAP_ID p_amfUeNgapID := ?, - template (present) RAN_UE_NGAP_ID p_ranUeNgapID := ?, - template (present) PDUSessionResourceSetupListSUReq p_pDUSessionResourceSetupListSUReq := ? - ) := { - procedureCode := id_PDUSessionResourceSetup, - criticality := reject, - value_ := { - PDUSessionResourceSetupRequest := { - protocolIEs := { - { - id := id_AMF_UE_NGAP_ID, - criticality := reject, - value_ := { AMF_UE_NGAP_ID := p_amfUeNgapID } - }, - { - id := id_RAN_UE_NGAP_ID, - criticality := reject, - value_ := { RAN_UE_NGAP_ID := p_ranUeNgapID } - }, - { - id := id_PDUSessionResourceSetupListSUReq, - criticality := reject, - value_ := { PDUSessionResourceSetupListSUReq := p_pDUSessionResourceSetupListSUReq } - } - } - } + function f_mw_n2_PDUSessionResourceSetupRequest(template (present) AMF_UE_NGAP_ID p_amfUeNgapID := ?, + template (present) RAN_UE_NGAP_ID p_ranUeNgapID := ?, + template RANPagingPriority p_rANPagingPriority := omit, + template NAS_PDU p_nAS_PDU := omit, + template (present) PDUSessionResourceSetupListSUReq p_pDUSessionResourceSetupListSUReq := ?, + template UEAggregateMaximumBitRate p_uEAggregateMaximumBitRate := omit, + template UESliceMaximumBitRateList p_uESliceMaximumBitRateList := omit + ) return template (present) InitiatingMessage { + + var template (present) InitiatingMessage pdu := { + procedureCode := id_PDUSessionResourceSetup, + criticality := reject, + value_ := { + PDUSessionResourceSetupRequest := { + protocolIEs := { + { + id := id_AMF_UE_NGAP_ID, + criticality := reject, + value_ := { AMF_UE_NGAP_ID := p_amfUeNgapID } + }, + { + id := id_RAN_UE_NGAP_ID, + criticality := reject, + value_ := { RAN_UE_NGAP_ID := p_ranUeNgapID } } - } // End of template mw_n2_PDUSessionResourceSetupRequest + } + } + } + }; + var integer idx := lengthof(pdu.value_.PDUSessionResourceSetupRequest.protocolIEs); + + /* RAN Paging Priority */ + if (not istemplatekind(p_rANPagingPriority, "omit")) { + pdu.value_.PDUSessionResourceSetupRequest.protocolIEs[idx] := { + id := id_RANPagingPriority, + criticality := ignore, + value_ := { RANPagingPriority := p_rANPagingPriority } + }; + idx := idx + 1; + } + + /* NAS-PDU */ + if (not istemplatekind(p_nAS_PDU, "omit")) { + pdu.value_.PDUSessionResourceSetupRequest.protocolIEs[idx] := { + id := id_NAS_PDU, + criticality := reject, + value_ := { NAS_PDU := p_nAS_PDU } + }; + idx := idx + 1; + } + + /* PDU Session Resource Setup Request List */ + pdu.value_.PDUSessionResourceSetupRequest.protocolIEs[idx] := { + id := id_PDUSessionResourceSetupListSUReq, + criticality := reject, + value_ := { PDUSessionResourceSetupListSUReq := p_pDUSessionResourceSetupListSUReq } + }; + idx := idx + 1; + + /* UE Aggregate Maximum Bit Rate */ + if (not istemplatekind(p_uEAggregateMaximumBitRate, "omit")) { + pdu.value_.PDUSessionResourceSetupRequest.protocolIEs[idx] := { + id := id_UEAggregateMaximumBitRate, + criticality := ignore, + value_ := { UEAggregateMaximumBitRate := p_uEAggregateMaximumBitRate } + }; + idx := idx + 1; + } + + /* UE Slice Maximum Bit Rate List */ + if (not istemplatekind(p_uESliceMaximumBitRateList, "omit")) { + pdu.value_.PDUSessionResourceSetupRequest.protocolIEs[idx] := { + id := id_UESliceMaximumBitRateList, + criticality := ignore, + value_ := { UESliceMaximumBitRateList := p_uESliceMaximumBitRateList } + }; + idx := idx + 1; + } + return pdu; + } // End of function f_mw_n2_PDUSessionResourceSetupRequest } // End of group Receive -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41746?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: I7a61b4d7a70994e35f2fa5cbadc90f1088b32e64 Gerrit-Change-Number: 41746 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • ...
  • 118
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.