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

September 2026

  • 1 participants
  • 1894 discussions
[S] Change in pysim[master]: pySim.log: apply cmd2 colors through _style()
by dexter 21 Sep '26

21 Sep '26
Attention is currently required from: Hoernchen. dexter has posted comments on this change by Hoernchen. ( https://gerrit.osmocom.org/c/pysim/+/43567?usp=email ) Change subject: pySim.log: apply cmd2 colors through _style() ...................................................................... Patch Set 2: Code-Review+2 (1 comment) Patchset: PS2: thanks for fixing this. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/43567?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: I8bae9fc3c54f1dab481d743d3b68e32e9d09267a Gerrit-Change-Number: 43567 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Comment-Date: Mon, 21 Sep 2026 11:16:40 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in libosmo-sigtran[master]: Update VTY tests to Cisco like DSCP configuration
by pespin 21 Sep '26

21 Sep '26
Attention is currently required from: jolly. pespin has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/43684?usp=email ) Change subject: Update VTY tests to Cisco like DSCP configuration ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: This should be merged into the previous commit. -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/43684?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: If4f96e27861428bec183e93b765f7f0185d8fc54 Gerrit-Change-Number: 43684 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Comment-Date: Mon, 21 Sep 2026 11:15:00 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
[L] Change in pysim[master]: contrib: SCP81 TLS-PSK RAS for RAM/RFM over HTTPS
by dexter 21 Sep '26

21 Sep '26
Attention is currently required from: Hoernchen, daniel, lynxis lazus. dexter has posted comments on this change by Hoernchen. ( https://gerrit.osmocom.org/c/pysim/+/43547?usp=email ) Change subject: contrib: SCP81 TLS-PSK RAS for RAM/RFM over HTTPS ...................................................................... Patch Set 2: Code-Review+1 (1 comment) File contrib/scp81_admin_server.py: https://gerrit.osmocom.org/c/pysim/+/43547/comment/3fa8571a_0f5c5745?usp=em… : PS2, Line 3: This file has the execution bit not set. -- To view, visit https://gerrit.osmocom.org/c/pysim/+/43547?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: I4f243aeca65d0f33ff34e6932e3f4e156446af8b Gerrit-Change-Number: 43547 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Mon, 21 Sep 2026 11:14:36 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
1 0
0 0
[L] Change in libosmo-sigtran[master]: Add Cisco like DSCP configuration support
by pespin 21 Sep '26

21 Sep '26
Attention is currently required from: jolly. pespin has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/43667?usp=email ) Change subject: Add Cisco like DSCP configuration support ...................................................................... Patch Set 4: (3 comments) Patchset: PS4: +1 once you fix the vty tests in this same commit, see also my other 2 comments regarding vty output improvements. File src/ss7_asp_vty.c: https://gerrit.osmocom.org/c/libosmo-sigtran/+/43667/comment/e50eadfb_7e568… : PS4, Line 420: struct osmo_ss7_asp *asp = vty->index; btw, I'd personally add a vty_out() here telling the user this vty is deprecated and that qos-class should be used instead. https://gerrit.osmocom.org/c/libosmo-sigtran/+/43667/comment/df2fa597_55eae… : PS4, Line 449: vty_out(vty, "%% Config updated: ip-dscp %d -> %d%s", asp->cfg.ip_dscp, qos->ip_dscp, I think you are missing the "qoss-class" somewhere in the string? like " -> qos-class %d (ip-dscp %d)" -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/43667?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: Ic346698fc63771d95e474aec53ffb6c776636b3b Gerrit-Change-Number: 43667 Gerrit-PatchSet: 4 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Comment-Date: Mon, 21 Sep 2026 11:14:00 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
[M] Change in pysim[master]: contrib: add scp81 OTA trigger builder
by dexter 21 Sep '26

21 Sep '26
Attention is currently required from: Hoernchen. dexter has posted comments on this change by Hoernchen. ( https://gerrit.osmocom.org/c/pysim/+/43566?usp=email ) Change subject: contrib: add scp81 OTA trigger builder ...................................................................... Patch Set 3: Code-Review+1 Verified+1 (3 comments) Patchset: PS3: I have tried it (only generating the API, I didn't sent it to a card), seems to work fine. File contrib/scp81_trigger.py: https://gerrit.osmocom.org/c/pysim/+/43566/comment/bf1113ed_f8248a44?usp=em… : PS3, Line 1: #!/usr/bin/env python3 As it seems the execution bit is not set on this file. https://gerrit.osmocom.org/c/pysim/+/43566/comment/6ba49438_ecca2576?usp=em… : PS3, Line 50: ap.add_argument("--psk-id", help="PSK identity for ClientHello (required unless --no-sec)") missing comma: (required, unless ...) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/43566?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: Ic646626319cd7a26195d0ffff55900032abcddeb Gerrit-Change-Number: 43566 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Comment-Date: Mon, 21 Sep 2026 11:08:31 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: smf: Implement f_n11_update_sm_context()
by pespin 21 Sep '26

21 Sep '26
pespin has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43681?usp=email ) Change subject: smf: Implement f_n11_update_sm_context() ...................................................................... smf: Implement f_n11_update_sm_context() Change-Id: I3c79ba747886add0ea8e5ea3003364eedf4c43be --- M library/HTTP2_Msg.ttcn M library/TS29502_Nsmf_PDUSession_Templates.ttcn A library/TS29503_Nudm_UECM_Templates.ttcn M smf/SMF_Session_CT.ttcn M smf/SMF_Session_CT_5G.ttcn M smf/gen_links.sh 6 files changed, 482 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/81/43681/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43681?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3c79ba747886add0ea8e5ea3003364eedf4c43be Gerrit-Change-Number: 43681 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: smf: Expect 201 Created response to our Nsmf sm-contexts creation req
by pespin 21 Sep '26

21 Sep '26
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43672?usp=email ) Change subject: smf: Expect 201 Created response to our Nsmf sm-contexts creation req ...................................................................... smf: Expect 201 Created response to our Nsmf sm-contexts creation req Add the remaining rx paths of HTTP2_Adapter so we can finish successfully the whole req+resp transaction. Change-Id: I2cae1b956f9fa6421543e542823e77cf236f0bb4 --- M library/HTTP2_Adapter.ttcn M library/HTTP2_Templates.ttcn M smf/SMF_Session_CT_5G.ttcn 3 files changed, 73 insertions(+), 14 deletions(-) Approvals: osmith: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/HTTP2_Adapter.ttcn b/library/HTTP2_Adapter.ttcn index 7892618..787dff0 100644 --- a/library/HTTP2_Adapter.ttcn +++ b/library/HTTP2_Adapter.ttcn @@ -90,6 +90,28 @@ f_set_tcp_segmentation(); HTTP2.send(ts_HTTP2_Send_magic(g_self_conn_id)); + f_http2_adapter_initial_handshake(); +} + +private function f_http2_adapter_initial_handshake() +runs on HTTP2_CT { + var HTTP2_Frame rx_http_frame; + var template (value) HTTP2_Setting_list settings := { + ts_HTTP2_Setting_ENABLE_PUSH(0), + ts_HTTP2_Setting_INITIAL_WINDOW_SIZE(4194304), + ts_HTTP2_Setting_MAX_HEADER_LIST_SIZE(10485760) + } + f_http2_adapter_send(ts_HTTP2_Frame_Settings(settings := settings)); + as_http2_adapter_receive(rx_http_frame, tr_HTTP2_Frame_Settings(ack_flag := false)); + as_http2_adapter_receive(rx_http_frame, tr_HTTP2_Frame_Settings(ack_flag := true)); + f_http2_adapter_send(ts_HTTP2_Frame_Window_Update(0, 1073741824)); +} + +function f_http2_adapter_close() +runs on HTTP2_CT { + var IPL4asp_Types.Result res; + res := HTTP2_CodecPort_CtrlFunct.f_IPL4_close(HTTP2, g_self_conn_id, {tcp := {}}); + g_self_conn_id := -1; } function f_http2_adapter_send(template (value) HTTP2_Frame http2_frame) @@ -98,4 +120,14 @@ HTTP2.send(ts_HTTP2_Send(g_self_conn_id, http2_frame)); } +altstep as_http2_adapter_receive(out HTTP2_Frame rx_http_frame, + template (present) HTTP2_Frame exp_http2_frame := ?) +runs on HTTP2_CT +{ + var HTTP2_Recv http2_rx; + [] HTTP2.receive(tr_HTTP2_Recv(g_self_conn_id, exp_http2_frame, omit)) -> value http2_rx { + rx_http_frame := http2_rx.frame; + } +} + } diff --git a/library/HTTP2_Templates.ttcn b/library/HTTP2_Templates.ttcn index e4ba42b..929b324 100644 --- a/library/HTTP2_Templates.ttcn +++ b/library/HTTP2_Templates.ttcn @@ -85,6 +85,15 @@ } } +template (present) HTTP2_Frame +tr_HTTP2_Frame_Window_Update(template (present) integer stream_id := 0, + template (present) integer window_size_increment := ?) := { + window_update_frame := { + stream_id := stream_id, + window_size_increment := window_size_increment + } +} + template (value) HTTP2_Frame ts_HTTP2_Frame_Window_Update(template (value) integer stream_id := 0, template (value) integer window_size_increment) := { @@ -219,7 +228,6 @@ ts_HTTP2_Hdr_content_id(template (omit) charstring header_value := omit) := ts_HTTP2_header_field(c_HTTP2_HDR_content_id, header_value); - template (value) HTTP2_header_field ts_HTTP2_Hdr_content_type(template (omit) charstring header_value := omit) := ts_HTTP2_header_field(c_HTTP2_HDR_content_type, header_value); @@ -244,6 +252,9 @@ ts_HTTP2_Hdr_status(template (omit) charstring header_value := omit) := ts_HTTP2_header_field(c_HTTP2_HDR_status, header_value); +template (present) HTTP2_header_field +tr_HTTP2_Hdr_location(template charstring header_value := *) +:= tr_HTTP2_header_field(c_HTTP2_HDR_location, header_value); template (value) HTTP2_header_field ts_HTTP2_Hdr_location(template (omit) charstring header_value := omit) := ts_HTTP2_header_field(c_HTTP2_HDR_location, header_value); diff --git a/smf/SMF_Session_CT_5G.ttcn b/smf/SMF_Session_CT_5G.ttcn index 70c029a..78cc72f 100644 --- a/smf/SMF_Session_CT_5G.ttcn +++ b/smf/SMF_Session_CT_5G.ttcn @@ -69,15 +69,6 @@ function f_n11_init() runs on SMF_Session_CT { f_http2_adapter_init(); f_http2_adapter_connect(mp_smf_hostname, mp_smf_sbi_port, mp_amf_local_ip, -1); - - var template (value) HTTP2_Setting_list settings := { - ts_HTTP2_Setting_ENABLE_PUSH(0), - ts_HTTP2_Setting_INITIAL_WINDOW_SIZE(4194304), - ts_HTTP2_Setting_MAX_HEADER_LIST_SIZE(10485760) - } - f_http2_adapter_send(ts_HTTP2_Frame_Settings(settings := settings)); - - f_http2_adapter_send(ts_HTTP2_Frame_Window_Update(0, 1073741824)); } function f_http2_encode_body_multipart_json_5gnas(octetstring json_encoded, @@ -103,13 +94,17 @@ var octetstring hdr_enc; var template (value) HTTP2_pseudo_headers pseudo_hdr; var template (value) HTTP2_header_list hdr_li; - var template (value) HTTP2_header_block hb; + var template (value) HTTP2_header_block tx_hb; + var template (present) HTTP2_header_block exp_rx_hb; + var HTTP2_header_block rx_hb; var template (value) NG_NAS_UL_Message_Type nas_ul_msg; var ProcedureTransactionIdentifier pti := f_next_pti(); var template (value) octetstring body; + var HTTP2_Frame rx_http_frame; var template (value) TS29502_Nsmf_PDUSession.PlmnId plmn_id := TS29502_Nsmf_PDUSession_Templates.ts_PlmnId("001", "001"); var template (value) TS29502_Nsmf_PDUSession.PlmnIdNid plmn_id_nid := TS29502_Nsmf_PDUSession_Templates.ts_PlmnIdNid(plmn_id.mcc, plmn_id.mnc); var integer pdu_sess_id := 1; + var integer http2_stream_id := 3; var template (value) SmContextCreateData sm_contexts; var octetstring sm_contexts_enc; @@ -151,9 +146,9 @@ ts_HTTP2_Hdr_content_length(int2str(lengthof(body))), ts_HTTP2_Hdr_accept_encoding("gzip") }; - hb := ts_HTTP2_header_block(pseudo_hdr, hdr_li); - hdr_enc := f_HTTP2_header_block_encode(valueof(hb)); - f_http2_adapter_send(ts_HTTP2_Frame_Header(3, + tx_hb := ts_HTTP2_header_block(pseudo_hdr, hdr_li); + hdr_enc := f_HTTP2_header_block_encode(valueof(tx_hb)); + f_http2_adapter_send(ts_HTTP2_Frame_Header(http2_stream_id, end_stream_flag := false, end_header_flag := true, header_block_fragment := hdr_enc @@ -181,6 +176,27 @@ as_nudm_sdm_get_sm_data(); /* Expect UDM to receive POST sdm-subscriptions: */ as_nudm_sdm_post_sdm_subscriptions(); + + /* Expect to receive "201 Created body={}" answer to our Nsmf sm-contexts request: */ + as_http2_adapter_receive(rx_http_frame, + tr_HTTP2_Frame_Header(stream_id := http2_stream_id, + end_stream_flag := false, + end_header_flag := true, + header_block_fragment := ?)); + rx_hb := f_HTTP2_header_block_decode(rx_http_frame.header_frame.header_block_fragment); + exp_rx_hb := tr_HTTP2_header_block(pseudo_headers := tr_HTTP2_pseudo_headers_Resp(201), + headers := {*, tr_HTTP2_Hdr_location(tr_Nsmf_PDUSession_uri_sm_contexts), *}); + if (not match(rx_hb, exp_rx_hb)) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Rx unexpected HTTP2 response hdr: ", rx_hb, " vs exp ", exp_rx_hb)); + + } + as_http2_adapter_receive(rx_http_frame, + tr_HTTP2_Frame_Data(stream_id := http2_stream_id, + end_stream_flag := true, + data := char2oct("{}"))); + f_http2_adapter_close(); + /* Expect PCF to receive POST sm-policies: */ as_npcf_smpolicycontrol_post_sm_policies(); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43672?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I2cae1b956f9fa6421543e542823e77cf236f0bb4 Gerrit-Change-Number: 43672 Gerrit-PatchSet: 3 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-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: Move HTTP2_Msg to its own file
by pespin 21 Sep '26

21 Sep '26
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43674?usp=email ) Change subject: Move HTTP2_Msg to its own file ...................................................................... Move HTTP2_Msg to its own file It is so far only used by HTTP2_Server_Emulation, but it will be reused by HTTP2_Adapter in a follow-up patch. Change-Id: Ib5ec7c2bb6882b2359c6b98836c01f70b1c28585 --- A library/HTTP2_Msg.ttcn M library/HTTP2_Server_Emulation.ttcn M smf/SMF_Session_CT_5G.ttcn M smf/gen_links.sh 4 files changed, 103 insertions(+), 73 deletions(-) Approvals: osmith: Looks good to me, approved Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve diff --git a/library/HTTP2_Msg.ttcn b/library/HTTP2_Msg.ttcn new file mode 100644 index 0000000..3ff6ab8 --- /dev/null +++ b/library/HTTP2_Msg.ttcn @@ -0,0 +1,100 @@ +/* HTTP2 Emulation in TTCN-3 + * + * (C) 2026 by sysmocom - s.f.m.c. GmbH <info(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 + * + * This module implements a HTTP/HTTPs 2.0 server, + */ + +module HTTP2_Msg { + +import from HTTP2_Types all; +import from HTTP2_CodecPort all; +import from HTTP2_CodecPort_CtrlFunct all; +import from IPL4asp_Types all; +import from IPL4asp_PortType all; +import from Socket_API_Definitions all; + +import from HTTP2_Templates all; +import from HTTP2_Functions all; + +import from Native_Functions all; +import from Misc_Helpers all; + + +/*************** + * HTTP2_Msg + **************/ + +type record HTTP2_Msg { + IPL4asp_Types.ConnectionId conn_id, + integer stream_id, + HTTP2_header_block hb, + HTTP2_Data_frame body optional +} + +template (present) HTTP2_Msg +tr_HTTP2_Msg(template (present) IPL4asp_Types.ConnectionId conn_id := ?, + template (present) integer stream_id := ?, + template (present) HTTP2_header_block hb := ?, + template HTTP2_Data_frame body := *) := { + conn_id := conn_id, + stream_id := stream_id, + hb := hb, + body := body +} + +template (value) HTTP2_Msg +ts_HTTP2_Msg(template (value) IPL4asp_Types.ConnectionId conn_id, + template (value) integer stream_id, + template (value) HTTP2_header_block hb, + template (omit) HTTP2_Data_frame body := omit) := { + conn_id := conn_id, + stream_id := stream_id, + hb := hb, + body := body +} + +template (value) HTTP2_Msg +ts_HTTP2_Msg_Status(template (value) IPL4asp_Types.ConnectionId conn_id, + template (value) integer stream_id, + template (value) integer status, + template (omit) HTTP2_header_list headers := omit, + template (omit) HTTP2_Data_frame body := omit) := +ts_HTTP2_Msg(conn_id, + stream_id, + hb := ts_HTTP2_header_block(pseudo_headers := ts_HTTP2_pseudo_headers_Resp(status), + headers := headers), + body := body + ); + +template (value) HTTP2_Msg +ts_HTTP2_Msg_200_OK(template (value) IPL4asp_Types.ConnectionId conn_id, + template (value) integer stream_id, + template (omit) HTTP2_header_list headers := omit, + template (omit) HTTP2_Data_frame body := omit) := +ts_HTTP2_Msg_Status(conn_id, stream_id, 200, headers, body); + +template (value) HTTP2_Msg +ts_HTTP2_Msg_201_Created(template (value) IPL4asp_Types.ConnectionId conn_id, + template (value) integer stream_id, + template (omit) HTTP2_header_list headers := omit, + template (omit) HTTP2_Data_frame body := omit) := +ts_HTTP2_Msg_Status(conn_id, stream_id, 201, headers, body); + + +function f_HTTP2_Msg_append_hdr_content_length(inout HTTP2_Msg http2_msg) +{ + if (not ispresent(http2_msg.body)) { + return; + } + var integer content_length := lengthof(http2_msg.body.data); /* TODO: http2_msg.body.padding ? */ + http2_msg.hb.headers := http2_msg.hb.headers & + { valueof(ts_HTTP2_Hdr_content_length(int2str(content_length))) }; +} + +} diff --git a/library/HTTP2_Server_Emulation.ttcn b/library/HTTP2_Server_Emulation.ttcn index 46b30d0..528cd94 100644 --- a/library/HTTP2_Server_Emulation.ttcn +++ b/library/HTTP2_Server_Emulation.ttcn @@ -21,82 +21,11 @@ import from HTTP2_Templates all; import from HTTP2_Functions all; +import from HTTP2_Msg all; import from Native_Functions all; import from Misc_Helpers all; - -/*************** - * HTTP2_Msg - **************/ - -type record HTTP2_Msg { - IPL4asp_Types.ConnectionId conn_id, - integer stream_id, - HTTP2_header_block hb, - HTTP2_Data_frame body optional -} - -template (present) HTTP2_Msg -tr_HTTP2_Msg(template (present) IPL4asp_Types.ConnectionId conn_id := ?, - template (present) integer stream_id := ?, - template (present) HTTP2_header_block hb := ?, - template HTTP2_Data_frame body := *) := { - conn_id := conn_id, - stream_id := stream_id, - hb := hb, - body := body -} - -template (value) HTTP2_Msg -ts_HTTP2_Msg(template (value) IPL4asp_Types.ConnectionId conn_id, - template (value) integer stream_id, - template (value) HTTP2_header_block hb, - template (omit) HTTP2_Data_frame body := omit) := { - conn_id := conn_id, - stream_id := stream_id, - hb := hb, - body := body -} - -template (value) HTTP2_Msg -ts_HTTP2_Msg_Status(template (value) IPL4asp_Types.ConnectionId conn_id, - template (value) integer stream_id, - template (value) integer status, - template (omit) HTTP2_header_list headers := omit, - template (omit) HTTP2_Data_frame body := omit) := -ts_HTTP2_Msg(conn_id, - stream_id, - hb := ts_HTTP2_header_block(pseudo_headers := ts_HTTP2_pseudo_headers_Resp(status), - headers := headers), - body := body - ); - -template (value) HTTP2_Msg -ts_HTTP2_Msg_200_OK(template (value) IPL4asp_Types.ConnectionId conn_id, - template (value) integer stream_id, - template (omit) HTTP2_header_list headers := omit, - template (omit) HTTP2_Data_frame body := omit) := -ts_HTTP2_Msg_Status(conn_id, stream_id, 200, headers, body); - -template (value) HTTP2_Msg -ts_HTTP2_Msg_201_Created(template (value) IPL4asp_Types.ConnectionId conn_id, - template (value) integer stream_id, - template (omit) HTTP2_header_list headers := omit, - template (omit) HTTP2_Data_frame body := omit) := -ts_HTTP2_Msg_Status(conn_id, stream_id, 201, headers, body); - - -function f_HTTP2_Msg_append_hdr_content_length(inout HTTP2_Msg http2_msg) -{ - if (not ispresent(http2_msg.body)) { - return; - } - var integer content_length := lengthof(http2_msg.body.data); /* TODO: http2_msg.body.padding ? */ - http2_msg.hb.headers := http2_msg.hb.headers & - { valueof(ts_HTTP2_Hdr_content_length(int2str(content_length))) }; -} - /********************* * HTTP2_Server_Conn ********************/ diff --git a/smf/SMF_Session_CT_5G.ttcn b/smf/SMF_Session_CT_5G.ttcn index b2c20c4..e8db57d 100644 --- a/smf/SMF_Session_CT_5G.ttcn +++ b/smf/SMF_Session_CT_5G.ttcn @@ -8,6 +8,7 @@ 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; diff --git a/smf/gen_links.sh b/smf/gen_links.sh index 352f4a9..b95339f 100755 --- a/smf/gen_links.sh +++ b/smf/gen_links.sh @@ -126,7 +126,7 @@ FILES+="SCTP_Templates.ttcn " FILES+="NTP_Functions.ttcn PFCP_Templates.ttcn PFCP_CodecPort.ttcn PFCP_CodecPort_CtrlFunct.ttcn PFCP_CodecPort_CtrlFunctDef.cc PFCP_Emulation.ttcn " FILES+="Mutex.ttcn " -FILES+="HTTP2_CodecPort.ttcn HTTP2_CodecPort_CtrlFunct.ttcn HTTP2_CodecPort_CtrlFunctDef.cc HTTP2_Templates.ttcn HTTP2_Functions.ttcn HTTP2_Adapter.ttcn HTTP2_Server_Emulation.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+="TS29503_Nudm_SDM_Templates.ttcn TS29502_Nsmf_PDUSession_Templates.ttcn TS29512_Npcf_SMPolicyControl_Templates.ttcn TS29518_Namf_Communication_Templates.ttcn " FILES+="NG_NAS_Osmo_Types.ttcn NG_NAS_Osmo_Templates.ttcn NG_NAS_Functions.ttcn " gen_links $DIR $FILES -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43674?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ib5ec7c2bb6882b2359c6b98836c01f70b1c28585 Gerrit-Change-Number: 43674 Gerrit-PatchSet: 4 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-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: HTTP2_Adapter: Support multiple concurrent open client connections
by pespin 21 Sep '26

21 Sep '26
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43673?usp=email ) Change subject: HTTP2_Adapter: Support multiple concurrent open client connections ...................................................................... HTTP2_Adapter: Support multiple concurrent open client connections Change-Id: I194ba7d5ad72363a0e398847360e985e7f7ec6cb --- M library/HTTP2_Adapter.ttcn M smf/SMF_Session_CT_5G.ttcn 2 files changed, 63 insertions(+), 35 deletions(-) Approvals: fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/HTTP2_Adapter.ttcn b/library/HTTP2_Adapter.ttcn index 787dff0..8616ea4 100644 --- a/library/HTTP2_Adapter.ttcn +++ b/library/HTTP2_Adapter.ttcn @@ -24,16 +24,19 @@ import from Native_Functions all; import from Misc_Helpers all; +const integer HTTP2_MAX_NUM_CLIENTS := 4; + type component HTTP2_CT { - port HTTP2_CODEC_PT HTTP2; + port HTTP2_CODEC_PT HTTP2[HTTP2_MAX_NUM_CLIENTS]; /* double underscore to have "g_pars" available on components extending this one: */ - var template (omit) HTTP2_Adapter_Params g_http2_pars; + var HTTP2_Adapter_Params g_http2_pars[HTTP2_MAX_NUM_CLIENTS]; /* Connection identifier of the client / server itself */ - var IPL4asp_Types.ConnectionId g_self_conn_id := -1; + var IPL4asp_Types.ConnectionId g_self_conn_id[HTTP2_MAX_NUM_CLIENTS]; }; type record HTTP2_Adapter_Params { + integer idx, charstring local_host, integer local_port, charstring remote_host, @@ -42,11 +45,13 @@ }; template (value) HTTP2_Adapter_Params -ts_HTTP2_Adapter_Params(template (value) charstring local_host, +ts_HTTP2_Adapter_Params(template (value) integer idx, + template (value) charstring local_host, template (value) integer local_port, template (value) charstring remote_host, template (value) integer remote_port, template (value) boolean use_ssl) := { + idx := idx, local_host := local_host, local_port := local_port, remote_host := remote_host, @@ -55,7 +60,10 @@ } function f_http2_adapter_init() runs on HTTP2_CT { - map(self:HTTP2, system:HTTP2_CODEC_PT); + for(var integer i := 0; i < HTTP2_MAX_NUM_CLIENTS; i := i + 1) { + map(self:HTTP2[i], system:HTTP2_CODEC_PT); + g_self_conn_id[i] := -1; + } } private function f_http2_adapter_getMsgLen(in octetstring pl_stream, @@ -66,34 +74,45 @@ } -private function f_set_tcp_segmentation() +private function f_set_tcp_segmentation(integer idx := 0) runs on HTTP2_CT { /* Set function for dissecting the binary stream into packets */ var f_IPL4_getMsgLen vl_f := refers(f_http2_adapter_getMsgLen); - HTTP2_CodecPort_CtrlFunct.f_IPL4_setGetMsgLen(HTTP2, g_self_conn_id, vl_f, {}); + HTTP2_CodecPort_CtrlFunct.f_IPL4_setGetMsgLen(HTTP2[idx], g_self_conn_id[idx], vl_f, {}); +} + +/* Obtain index of free slot which can be then used to connect, etc., negative on error. */ +function f_http2_adapter_find_free_idx() +runs on HTTP2_CT return integer { + for(var integer i := 0; i < HTTP2_MAX_NUM_CLIENTS; i := i + 1) { + if (g_self_conn_id[i] == -1) { + return i; + } + } + return -1; } /* Function to use to connect as client to a remote IPA Server */ function f_http2_adapter_connect(charstring remote_host, IPL4asp_Types.PortNumber remote_port, - charstring local_host, IPL4asp_Types.PortNumber local_port, boolean use_ssl := false) + charstring local_host, IPL4asp_Types.PortNumber local_port, boolean use_ssl := false, integer idx := 0) runs on HTTP2_CT { var IPL4asp_Types.Result res; - res := HTTP2_CodecPort_CtrlFunct.f_IPL4_connect(HTTP2, remote_host, remote_port, + res := HTTP2_CodecPort_CtrlFunct.f_IPL4_connect(HTTP2[idx], remote_host, remote_port, local_host, local_port, 0, { tcp:={} }); if (not ispresent(res.connId)) { - setverdict(fail, "Could not connect HTTP2 socket from ", local_host, " port ", local_port, - " to ", remote_host, " port ", remote_port, "; check your configuration"); - mtc.stop; + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str(idx, ": Could not connect HTTP2 socket from ", local_host, " port ", local_port, + " to ", remote_host, " port ", remote_port, "; check your configuration")); } - g_self_conn_id := res.connId; - g_http2_pars := ts_HTTP2_Adapter_Params(remote_host, remote_port, local_host, local_port, use_ssl); + g_self_conn_id[idx] := res.connId; + g_http2_pars[idx] := valueof(ts_HTTP2_Adapter_Params(idx, remote_host, remote_port, local_host, local_port, use_ssl)); - f_set_tcp_segmentation(); - HTTP2.send(ts_HTTP2_Send_magic(g_self_conn_id)); - f_http2_adapter_initial_handshake(); + f_set_tcp_segmentation(idx := idx); + HTTP2[idx].send(ts_HTTP2_Send_magic(g_self_conn_id[idx])); + f_http2_adapter_initial_handshake(idx := idx); } -private function f_http2_adapter_initial_handshake() +private function f_http2_adapter_initial_handshake(integer idx := 0) runs on HTTP2_CT { var HTTP2_Frame rx_http_frame; var template (value) HTTP2_Setting_list settings := { @@ -101,31 +120,33 @@ ts_HTTP2_Setting_INITIAL_WINDOW_SIZE(4194304), ts_HTTP2_Setting_MAX_HEADER_LIST_SIZE(10485760) } - f_http2_adapter_send(ts_HTTP2_Frame_Settings(settings := settings)); - as_http2_adapter_receive(rx_http_frame, tr_HTTP2_Frame_Settings(ack_flag := false)); - as_http2_adapter_receive(rx_http_frame, tr_HTTP2_Frame_Settings(ack_flag := true)); - f_http2_adapter_send(ts_HTTP2_Frame_Window_Update(0, 1073741824)); + f_http2_adapter_send(ts_HTTP2_Frame_Settings(settings := settings), idx := idx); + as_http2_adapter_receive(rx_http_frame, tr_HTTP2_Frame_Settings(ack_flag := false), idx := idx); + as_http2_adapter_receive(rx_http_frame, tr_HTTP2_Frame_Settings(ack_flag := true), idx := idx); + f_http2_adapter_send(ts_HTTP2_Frame_Window_Update(0, 1073741824), idx := idx); } -function f_http2_adapter_close() +function f_http2_adapter_close(integer idx := 0) runs on HTTP2_CT { var IPL4asp_Types.Result res; - res := HTTP2_CodecPort_CtrlFunct.f_IPL4_close(HTTP2, g_self_conn_id, {tcp := {}}); - g_self_conn_id := -1; + res := HTTP2_CodecPort_CtrlFunct.f_IPL4_close(HTTP2[idx], g_self_conn_id[idx], {tcp := {}}); + g_self_conn_id[idx] := -1; } -function f_http2_adapter_send(template (value) HTTP2_Frame http2_frame) +function f_http2_adapter_send(template (value) HTTP2_Frame http2_frame, + integer idx := 0) runs on HTTP2_CT { - HTTP2.send(ts_HTTP2_Send(g_self_conn_id, http2_frame)); + HTTP2[idx].send(ts_HTTP2_Send(g_self_conn_id[idx], http2_frame)); } altstep as_http2_adapter_receive(out HTTP2_Frame rx_http_frame, - template (present) HTTP2_Frame exp_http2_frame := ?) + template (present) HTTP2_Frame exp_http2_frame := ?, + integer idx := 0) runs on HTTP2_CT { var HTTP2_Recv http2_rx; - [] HTTP2.receive(tr_HTTP2_Recv(g_self_conn_id, exp_http2_frame, omit)) -> value http2_rx { + [] HTTP2[idx].receive(tr_HTTP2_Recv(g_self_conn_id[idx], exp_http2_frame, omit)) -> value http2_rx { rx_http_frame := http2_rx.frame; } } diff --git a/smf/SMF_Session_CT_5G.ttcn b/smf/SMF_Session_CT_5G.ttcn index 78cc72f..b2c20c4 100644 --- a/smf/SMF_Session_CT_5G.ttcn +++ b/smf/SMF_Session_CT_5G.ttcn @@ -68,7 +68,6 @@ function f_n11_init() runs on SMF_Session_CT { f_http2_adapter_init(); - f_http2_adapter_connect(mp_smf_hostname, mp_smf_sbi_port, mp_amf_local_ip, -1); } function f_http2_encode_body_multipart_json_5gnas(octetstring json_encoded, @@ -104,6 +103,7 @@ var template (value) TS29502_Nsmf_PDUSession.PlmnId plmn_id := TS29502_Nsmf_PDUSession_Templates.ts_PlmnId("001", "001"); var template (value) TS29502_Nsmf_PDUSession.PlmnIdNid plmn_id_nid := TS29502_Nsmf_PDUSession_Templates.ts_PlmnIdNid(plmn_id.mcc, plmn_id.mnc); var integer pdu_sess_id := 1; + var integer http2_idx; var integer http2_stream_id := 3; var template (value) SmContextCreateData sm_contexts; @@ -148,11 +148,15 @@ }; tx_hb := ts_HTTP2_header_block(pseudo_hdr, hdr_li); hdr_enc := f_HTTP2_header_block_encode(valueof(tx_hb)); + + http2_idx := f_http2_adapter_find_free_idx(); + f_http2_adapter_connect(mp_smf_hostname, mp_smf_sbi_port, mp_amf_local_ip, -1, idx := http2_idx); f_http2_adapter_send(ts_HTTP2_Frame_Header(http2_stream_id, end_stream_flag := false, end_header_flag := true, header_block_fragment := hdr_enc - )); + ), + idx := http2_idx); /////////// START MUTUAL EXCLUSION ZONE //////////// @@ -170,7 +174,8 @@ f_http2_adapter_send(ts_HTTP2_Frame_Data(3, end_stream_flag := true, - data := body)); + data := body), + idx := http2_idx); /* Expect UDM to receive GET sm-data: */ as_nudm_sdm_get_sm_data(); @@ -182,7 +187,8 @@ tr_HTTP2_Frame_Header(stream_id := http2_stream_id, end_stream_flag := false, end_header_flag := true, - header_block_fragment := ?)); + header_block_fragment := ?), + idx := http2_idx); rx_hb := f_HTTP2_header_block_decode(rx_http_frame.header_frame.header_block_fragment); exp_rx_hb := tr_HTTP2_header_block(pseudo_headers := tr_HTTP2_pseudo_headers_Resp(201), headers := {*, tr_HTTP2_Hdr_location(tr_Nsmf_PDUSession_uri_sm_contexts), *}); @@ -194,8 +200,9 @@ as_http2_adapter_receive(rx_http_frame, tr_HTTP2_Frame_Data(stream_id := http2_stream_id, end_stream_flag := true, - data := char2oct("{}"))); - f_http2_adapter_close(); + data := char2oct("{}")), + idx := http2_idx); + f_http2_adapter_close(idx := http2_idx); /* Expect PCF to receive POST sm-policies: */ as_npcf_smpolicycontrol_post_sm_policies(); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43673?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I194ba7d5ad72363a0e398847360e985e7f7ec6cb Gerrit-Change-Number: 43673 Gerrit-PatchSet: 3 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-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-ttcn3-hacks[master]: HTTP2_Templates: add ts_HTTP2_Hdr_content_type_multipart
by pespin 21 Sep '26

21 Sep '26
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43679?usp=email ) ( 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: HTTP2_Templates: add ts_HTTP2_Hdr_content_type_multipart ...................................................................... HTTP2_Templates: add ts_HTTP2_Hdr_content_type_multipart Change-Id: I14903636636bbd6cd139244d5aed8617df458a0c --- M library/HTTP2_Templates.ttcn M smf/SMF_Session_CT_5G.ttcn 2 files changed, 5 insertions(+), 1 deletion(-) Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/library/HTTP2_Templates.ttcn b/library/HTTP2_Templates.ttcn index 929b324..e07d4b6 100644 --- a/library/HTTP2_Templates.ttcn +++ b/library/HTTP2_Templates.ttcn @@ -233,6 +233,10 @@ := ts_HTTP2_header_field(c_HTTP2_HDR_content_type, header_value); template (value) HTTP2_header_field +ts_HTTP2_Hdr_content_type_multipart(template (value) charstring boundary) +:= ts_HTTP2_header_field(c_HTTP2_HDR_content_type, "multipart/related; boundary=\"" & valueof(boundary) & "\""); + +template (value) HTTP2_header_field ts_HTTP2_Hdr_accept(template (omit) charstring header_value := omit) := ts_HTTP2_header_field(c_HTTP2_HDR_accept, header_value); diff --git a/smf/SMF_Session_CT_5G.ttcn b/smf/SMF_Session_CT_5G.ttcn index b74625c..6809785 100644 --- a/smf/SMF_Session_CT_5G.ttcn +++ b/smf/SMF_Session_CT_5G.ttcn @@ -140,7 +140,7 @@ authority := Nsmf_uri_hostport, path := Nsmf_PDUSession_path_sm_contexts), headers := { - ts_HTTP2_Hdr_content_type("multipart/related; boundary=\"" & boundary & "\""), + ts_HTTP2_Hdr_content_type_multipart(boundary), ts_HTTP2_Hdr_accept("application/json,application/vnd.3gpp.ngap,application/problem+json"), ts_HTTP2_Hdr_user_agent("ttcn3-amf"), ts_HTTP2_Hdr_accept_encoding("gzip") -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43679?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I14903636636bbd6cd139244d5aed8617df458a0c Gerrit-Change-Number: 43679 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • ...
  • 190
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.