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

February 2024

  • 1 participants
  • 1748 discussions
Change in osmo-ccid-firmware[master]: add simple gangupdater for multiple octsim boards
by roh 15 Mar '25

15 Mar '25
roh has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/26896 ) Change subject: add simple gangupdater for multiple octsim boards ...................................................................... add simple gangupdater for multiple octsim boards Change-Id: Ic10572c121ac55586ec43126b63d69529757132b --- A contrib/flash_all_octsim.sh 1 file changed, 22 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/96/26896/1 diff --git a/contrib/flash_all_octsim.sh b/contrib/flash_all_octsim.sh new file mode 100644 index 0000000..4f4c89b --- /dev/null +++ b/contrib/flash_all_octsim.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# this script is to scan for octsim boards, sort them by usb path and call dfu-util on each to update the board +# basic flow +# - get usb path and serialno tupel from dfu-util -l +# - reformat and sort by usbpath, drop the usbpath (grep cut tr sort cut) +# - flash the boards + +# TODO: +# - error handling +# - filter dfu-util output and generate nice summary + +dfu-util -l \ + | grep "^Found" \ + | grep "\[1d50:6141\]" \ + | cut -d ' ' -f 8,13 \ + | tr -d ',' \ + | cut -d \" -f 2,4 \ + | tr \" ' ' \ + | sort \ + | cut -d ' ' -f 2 + | xargs -n 1 dfu-util -d 1d50:6141 -D sysmoOCTSIM.bin -R -p -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/26896 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ic10572c121ac55586ec43126b63d69529757132b Gerrit-Change-Number: 26896 Gerrit-PatchSet: 1 Gerrit-Owner: roh <jsteiger(a)sysmocom.de> Gerrit-MessageType: newchange
2 2
0 0
[L] Change in osmo-ttcn3-hacks[master]: Split GTP_CodecPort/GTP_Templates into C and U variants
by pespin 29 Feb '24

29 Feb '24
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36126?usp=email ) Change subject: Split GTP_CodecPort/GTP_Templates into C and U variants ...................................................................... Patch Set 4: (1 comment) Patchset: PS4: With this patch I can add GTPv1-U support to GTPv2C_Emulation without having to includes tons of GTPC related code. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36126?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ic15c9a2e92828cbafb4dda7355ee534107051e2d Gerrit-Change-Number: 36126 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Comment-Date: Thu, 29 Feb 2024 19:56:46 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: Split GTP_CodecPort/GTP_Templates into C and U variants
by pespin 29 Feb '24

29 Feb '24
Attention is currently required from: pespin. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36126?usp=email to look at the new patch set (#4). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: Split GTP_CodecPort/GTP_Templates into C and U variants ...................................................................... Split GTP_CodecPort/GTP_Templates into C and U variants The Types are already split in the dependent modules in GTPC_Types and GTPU_Types. There's no point in keeping them together in the same file since those 2 protocols are mostly independent. Furthermore, testsuites using GTPv2C + GTPv1U don't need GTPv1C. Change-Id: Ic15c9a2e92828cbafb4dda7355ee534107051e2d --- M gbproxy/gen_links.sh M gbproxy/regen_makefile.sh M ggsn_tests/GGSN_Tests.default M ggsn_tests/GGSN_Tests.ttcn M ggsn_tests/gen_links.sh M ggsn_tests/regen_makefile.sh M hnodeb/HNBGW_ConnectionHandler.ttcn M hnodeb/HNB_Tests.ttcn M hnodeb/gen_links.sh M hnodeb/regen_makefile.sh M library/GTP_Emulation.ttcn R library/GTPv1C_CodecPort.ttcn R library/GTPv1C_CodecPort_CtrlFunct.ttcn R library/GTPv1C_CodecPort_CtrlFunctDef.cc R library/GTPv1C_Templates.ttcn A library/GTPv1U_CodecPort.ttcn A library/GTPv1U_CodecPort_CtrlFunct.ttcn A library/GTPv1U_CodecPort_CtrlFunctDef.cc A library/GTPv1U_Templates.ttcn M library/GTPv2_CodecPort.ttcn M library/GTPv2_Emulation.ttcn M mme/MME_Tests.ttcn M mme/gen_links.sh M mme/regen_makefile.sh M pgw/gen_links.sh M pgw/regen_makefile.sh M sgsn/SGSN_Tests.ttcn M sgsn/gen_links.sh M sgsn/regen_makefile.sh 29 files changed, 375 insertions(+), 294 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/26/36126/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36126?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ic15c9a2e92828cbafb4dda7355ee534107051e2d Gerrit-Change-Number: 36126 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: Split GTP_CodecPort/GTP_Templates into C and U variants
by pespin 29 Feb '24

29 Feb '24
Attention is currently required from: pespin. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36126?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: Split GTP_CodecPort/GTP_Templates into C and U variants ...................................................................... Split GTP_CodecPort/GTP_Templates into C and U variants The Types are already split in the dependent modules in GTPC_Types and GTPU_Types. There's no point in keeping them together in the same file since those 2 protocols are mostly independent. Furthermore, testsuites using GTPv2C + GTPv1U don't need GTPv1C. Change-Id: Ic15c9a2e92828cbafb4dda7355ee534107051e2d --- M gbproxy/gen_links.sh M gbproxy/regen_makefile.sh M ggsn_tests/GGSN_Tests.default M ggsn_tests/GGSN_Tests.ttcn M ggsn_tests/gen_links.sh M ggsn_tests/regen_makefile.sh M hnodeb/HNBGW_ConnectionHandler.ttcn M hnodeb/HNB_Tests.ttcn M hnodeb/gen_links.sh M hnodeb/regen_makefile.sh M library/GTP_Emulation.ttcn R library/GTPv1C_CodecPort.ttcn R library/GTPv1C_CodecPort_CtrlFunct.ttcn R library/GTPv1C_CodecPort_CtrlFunctDef.cc R library/GTPv1C_Templates.ttcn A library/GTPv1U_CodecPort.ttcn A library/GTPv1U_CodecPort_CtrlFunct.ttcn A library/GTPv1U_CodecPort_CtrlFunctDef.cc A library/GTPv1U_Templates.ttcn M library/GTPv2_CodecPort.ttcn M library/GTPv2_Emulation.ttcn M mme/MME_Tests.ttcn M mme/gen_links.sh M mme/regen_makefile.sh M pgw/gen_links.sh M pgw/regen_makefile.sh M sgsn/SGSN_Tests.ttcn M sgsn/gen_links.sh M sgsn/regen_makefile.sh 29 files changed, 377 insertions(+), 294 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/26/36126/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36126?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ic15c9a2e92828cbafb4dda7355ee534107051e2d Gerrit-Change-Number: 36126 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: Split GTP_CodecPort/GTP_Templates into C and U variants
by pespin 29 Feb '24

29 Feb '24
Attention is currently required from: pespin. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36126?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: Split GTP_CodecPort/GTP_Templates into C and U variants ...................................................................... Split GTP_CodecPort/GTP_Templates into C and U variants The Types are already split in the dependent modules in GTPC_Types and GTPU_Types. There's no point in keeping them together in the same file since those 2 protocols are mostly independent. Furthermore, testsuites using GTPv2C + GTPv1U don't need GTPv1C. Change-Id: Ic15c9a2e92828cbafb4dda7355ee534107051e2d --- M gbproxy/gen_links.sh M gbproxy/regen_makefile.sh M ggsn_tests/GGSN_Tests.default M ggsn_tests/GGSN_Tests.ttcn M ggsn_tests/gen_links.sh M ggsn_tests/regen_makefile.sh M hnodeb/HNBGW_ConnectionHandler.ttcn M hnodeb/HNB_Tests.ttcn M hnodeb/gen_links.sh M hnodeb/regen_makefile.sh M library/GTP_Emulation.ttcn R library/GTPv1C_CodecPort.ttcn R library/GTPv1C_CodecPort_CtrlFunct.ttcn R library/GTPv1C_CodecPort_CtrlFunctDef.cc R library/GTPv1C_Templates.ttcn A library/GTPv1U_CodecPort.ttcn A library/GTPv1U_CodecPort_CtrlFunct.ttcn A library/GTPv1U_CodecPort_CtrlFunctDef.cc A library/GTPv1U_Templates.ttcn M library/GTPv2_CodecPort.ttcn M library/GTPv2_Emulation.ttcn M mme/MME_Tests.ttcn M mme/gen_links.sh M mme/regen_makefile.sh M pgw/gen_links.sh M pgw/regen_makefile.sh M sgsn/SGSN_Tests.ttcn M sgsn/gen_links.sh M sgsn/regen_makefile.sh 29 files changed, 377 insertions(+), 294 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/26/36126/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36126?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ic15c9a2e92828cbafb4dda7355ee534107051e2d Gerrit-Change-Number: 36126 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: Split GTP_CodecPort/GTP_Templates into C and U variants
by pespin 29 Feb '24

29 Feb '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36126?usp=email ) Change subject: Split GTP_CodecPort/GTP_Templates into C and U variants ...................................................................... Split GTP_CodecPort/GTP_Templates into C and U variants The Types are already split in the dependent modules in GTPC_Types and GTPU_Types. There's no point in keeping them together in the same file since those 2 protocols are mostly independent. Furthermore, testsuites using GTPv2C + GTPv1U don't need GTPv1C. Change-Id: Ic15c9a2e92828cbafb4dda7355ee534107051e2d --- M gbproxy/gen_links.sh M gbproxy/regen_makefile.sh M ggsn_tests/GGSN_Tests.default M ggsn_tests/GGSN_Tests.ttcn M ggsn_tests/gen_links.sh M ggsn_tests/regen_makefile.sh M hnodeb/HNBGW_ConnectionHandler.ttcn M hnodeb/HNB_Tests.ttcn M hnodeb/gen_links.sh M hnodeb/regen_makefile.sh M library/GTP_Emulation.ttcn R library/GTPv1C_CodecPort.ttcn R library/GTPv1C_CodecPort_CtrlFunct.ttcn R library/GTPv1C_CodecPort_CtrlFunctDef.cc R library/GTPv1C_Templates.ttcn A library/GTPv1U_CodecPort.ttcn A library/GTPv1U_CodecPort_CtrlFunct.ttcn A library/GTPv1U_CodecPort_CtrlFunctDef.cc A library/GTPv1U_Templates.ttcn M mme/MME_Tests.ttcn M mme/gen_links.sh M mme/regen_makefile.sh M pgw/gen_links.sh M pgw/regen_makefile.sh M sgsn/SGSN_Tests.ttcn M sgsn/gen_links.sh M sgsn/regen_makefile.sh 27 files changed, 353 insertions(+), 258 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/26/36126/1 diff --git a/gbproxy/gen_links.sh b/gbproxy/gen_links.sh index 17328f7..c7756ec 100755 --- a/gbproxy/gen_links.sh +++ b/gbproxy/gen_links.sh @@ -91,8 +91,8 @@ FILES+="LLC_Templates.ttcn L3_Templates.ttcn L3_Common.ttcn " # IPA_Emulation + dependencies FILES+="IPA_Types.ttcn IPA_Emulation.ttcnpp IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc Native_Functions.ttcn Native_FunctionDefs.cc " -FILES+="GTP_CodecPort.ttcn GTP_CodecPort_CtrlFunct.ttcn GTP_CodecPort_CtrlFunctDef.cc GTP_Emulation.ttcn -GTP_Templates.ttcn IPCP_Types.ttcn " +FILES+="GTPv1C_CodecPort.ttcn GTPv1C_CodecPort_CtrlFunct.ttcn GTPv1C_CodecPort_CtrlFunctDef.cc GTPv1U_CodecPort.ttcn GTPv1U_CodecPort_CtrlFunct.ttcn GTPv1U_CodecPort_CtrlFunctDef.cc GTP_Emulation.ttcn +GTPv1C_Templates.ttcn IPCP_Types.ttcn " gen_links $DIR $FILES ignore_pp_results diff --git a/gbproxy/regen_makefile.sh b/gbproxy/regen_makefile.sh index e4982ae..cd17d5c 100755 --- a/gbproxy/regen_makefile.sh +++ b/gbproxy/regen_makefile.sh @@ -10,7 +10,8 @@ BSSGP_EncDec.cc GTPC_EncDec.cc GTPU_EncDec.cc - GTP_CodecPort_CtrlFunctDef.cc + GTPv1C_CodecPort_CtrlFunctDef.cc + GTPv1U_CodecPort_CtrlFunctDef.cc IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc diff --git a/ggsn_tests/GGSN_Tests.default b/ggsn_tests/GGSN_Tests.default index 33b96cb..9832ba1 100644 --- a/ggsn_tests/GGSN_Tests.default +++ b/ggsn_tests/GGSN_Tests.default @@ -21,6 +21,6 @@ GGSN_Tests.m_ggsn_ip6_dns1 := "2001:4860:4860::8888" GGSN_Tests.m_ggsn_ip6_dns2 := "2001:4860:4860::8844" Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoGGSN"; -GTP_CodecPort.mp_pl_SystemUnderTest := GGSN; +GTPv1C_CodecPort.mp_pl_SystemUnderTest := GGSN; [EXECUTE] diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn index c949dc9..45587f1 100644 --- a/ggsn_tests/GGSN_Tests.ttcn +++ b/ggsn_tests/GGSN_Tests.ttcn @@ -18,11 +18,14 @@ import from Misc_Helpers all; import from IPL4asp_PortType all; import from IPL4asp_Types all; - import from GTP_CodecPort all; - import from GTP_CodecPort_CtrlFunct all; - import from GTP_Templates all; + import from GTPv1C_CodecPort all; + import from GTPv1U_CodecPort all; + import from GTPv1C_CodecPort_CtrlFunct all; + import from GTPv1U_CodecPort_CtrlFunct all; import from GTPC_Types all; import from GTPU_Types all; + import from GTPv1C_Templates all; + import from GTPv1U_Templates all; import from IPCP_Types all; import from PAP_Types all; import from IP_Types all; @@ -279,12 +282,12 @@ var Result res; map(self:GTPC, system:GTPC); - res := GTP_CodecPort_CtrlFunct.f_IPL4_listen(GTPC, m_bind_ip_gtpc, GTP1C_PORT, {udp:={}}); + res := GTPv1C_CodecPort_CtrlFunct.f_IPL4_listen(GTPC, m_bind_ip_gtpc, GTP1C_PORT, {udp:={}}); log("GTP1C ConnectionID: ", res.connId); g_peer_c.connId := res.connId; map(self:GTPU, system:GTPU); - res := GTP_CodecPort_CtrlFunct.f_GTPU_listen(GTPU, m_bind_ip_gtpu, GTP1U_PORT, {udp:={}}); + res := GTPv1U_CodecPort_CtrlFunct.f_GTPU_listen(GTPU, m_bind_ip_gtpu, GTP1U_PORT, {udp:={}}); g_peer_u.connId:= res.connId; g_restart_ctr := f_rnd_octstring(1); diff --git a/ggsn_tests/gen_links.sh b/ggsn_tests/gen_links.sh index 4981e64..ebeb94b 100755 --- a/ggsn_tests/gen_links.sh +++ b/ggsn_tests/gen_links.sh @@ -59,7 +59,8 @@ DIR=../library FILES="Misc_Helpers.ttcn General_Types.ttcn GSM_Types.ttcn Osmocom_Types.ttcn Native_Functions.ttcn Native_FunctionDefs.cc IPCP_Types.ttcn PAP_Types.ttcn " -FILES+="GTP_CodecPort.ttcn GTP_CodecPort_CtrlFunct.ttcn GTP_CodecPort_CtrlFunctDef.cc GTP_Templates.ttcn Osmocom_Gb_Types.ttcn " +FILES+="GTPv1C_CodecPort.ttcn GTPv1C_CodecPort_CtrlFunct.ttcn GTPv1C_CodecPort_CtrlFunctDef.cc GTPv1C_Templates.ttcn Osmocom_Gb_Types.ttcn " +FILES+="GTPv1U_CodecPort.ttcn GTPv1U_CodecPort_CtrlFunct.ttcn GTPv1U_CodecPort_CtrlFunctDef.cc GTPv1U_Templates.ttcn " FILES+="DIAMETER_Types.ttcn DIAMETER_CodecPort.ttcn DIAMETER_CodecPort_CtrlFunct.ttcn DIAMETER_CodecPort_CtrlFunctDef.cc DIAMETER_Emulation.ttcn " FILES+="DIAMETER_Templates.ttcn DIAMETER_ts29_212_Templates.ttcn DIAMETER_ts29_272_Templates.ttcn DIAMETER_ts32_299_Templates.ttcn " FILES+="Osmocom_VTY_Functions.ttcn " diff --git a/ggsn_tests/regen_makefile.sh b/ggsn_tests/regen_makefile.sh index bd1b958..ce8e15a 100755 --- a/ggsn_tests/regen_makefile.sh +++ b/ggsn_tests/regen_makefile.sh @@ -9,7 +9,8 @@ DIAMETER_EncDec.cc GTPC_EncDec.cc GTPU_EncDec.cc - GTP_CodecPort_CtrlFunctDef.cc + GTPv1C_CodecPort_CtrlFunctDef.cc + GTPv1U_CodecPort_CtrlFunctDef.cc ICMP_EncDec.cc ICMPv6_EncDec.cc IPL4asp_PT.cc diff --git a/hnodeb/HNBGW_ConnectionHandler.ttcn b/hnodeb/HNBGW_ConnectionHandler.ttcn index 8e95616..5d5417d 100644 --- a/hnodeb/HNBGW_ConnectionHandler.ttcn +++ b/hnodeb/HNBGW_ConnectionHandler.ttcn @@ -35,8 +35,8 @@ import from HNBLLIF_Templates all; import from GTP_Emulation all; -import from GTP_Templates all; -import from GTP_CodecPort all; +import from GTPv1C_Templates all; +import from GTPv1U_CodecPort all; import from GTPU_Types all; /* this component represents a single Iuh connection at the HNBGW. */ diff --git a/hnodeb/HNB_Tests.ttcn b/hnodeb/HNB_Tests.ttcn index df7a04c..1178695 100644 --- a/hnodeb/HNB_Tests.ttcn +++ b/hnodeb/HNB_Tests.ttcn @@ -53,7 +53,7 @@ import from HNBLLIF_Templates all; import from GTPU_Types all; -import from GTP_Templates all; +import from GTPv1U_Templates all; import from GTP_Emulation all; import from IuUP_Types all; diff --git a/hnodeb/gen_links.sh b/hnodeb/gen_links.sh index 84495e9..4f42c5f 100755 --- a/hnodeb/gen_links.sh +++ b/hnodeb/gen_links.sh @@ -63,7 +63,9 @@ FILES+="Iuh_Types.ttcn Iuh_CodecPort.ttcn Iuh_CodecPort_CtrlFunctDef.cc Iuh_CodecPort_CtrlFunct.ttcn Iuh_Emulation.ttcn DNS_Helpers.ttcn " FILES+="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc RTP_Emulation.ttcn IuUP_Types.ttcn IuUP_EncDec.cc IuUP_Emulation.ttcn " FILES+="StatsD_Types.ttcn StatsD_CodecPort.ttcn StatsD_CodecPort_CtrlFunct.ttcn StatsD_CodecPort_CtrlFunctdef.cc StatsD_Checker.ttcn " -FILES+="GTP_CodecPort.ttcn GTP_CodecPort_CtrlFunct.ttcn GTP_CodecPort_CtrlFunctDef.cc GTP_Emulation.ttcn GTP_Templates.ttcn IPCP_Types.ttcn GSM_Types.ttcn " +FILES+="GTPv1C_CodecPort.ttcn GTPv1C_CodecPort_CtrlFunct.ttcn GTPv1C_CodecPort_CtrlFunctDef.cc GTPv1C_Templates.ttcn Osmocom_Gb_Types.ttcn " +FILES+="GTPv1U_CodecPort.ttcn GTPv1U_CodecPort_CtrlFunct.ttcn GTPv1U_CodecPort_CtrlFunctDef.cc GTPv1U_Templates.ttcn " +FILES+="GTP_Emulation.ttcn IPCP_Types.ttcn GSM_Types.ttcn " gen_links $DIR $FILES ignore_pp_results diff --git a/hnodeb/regen_makefile.sh b/hnodeb/regen_makefile.sh index 10f5c21..cf5fed3 100755 --- a/hnodeb/regen_makefile.sh +++ b/hnodeb/regen_makefile.sh @@ -27,7 +27,8 @@ UD_PT.cc GTPC_EncDec.cc GTPU_EncDec.cc - GTP_CodecPort_CtrlFunctDef.cc + GTPv1C_CodecPort_CtrlFunctDef.cc + GTPv1U_CodecPort_CtrlFunctDef.cc " export CPPFLAGS_TTCN3=" diff --git a/library/GTP_Emulation.ttcn b/library/GTP_Emulation.ttcn index 689fb0d..f5c0eef 100644 --- a/library/GTP_Emulation.ttcn +++ b/library/GTP_Emulation.ttcn @@ -16,8 +16,10 @@ import from Osmocom_Types all; import from GTPC_Types all; import from GTPU_Types all; -import from GTP_CodecPort all; -import from GTP_CodecPort_CtrlFunct all; +import from GTPv1C_CodecPort all; +import from GTPv1U_CodecPort all; +import from GTPv1C_CodecPort_CtrlFunct all; +import from GTPv1U_CodecPort_CtrlFunct all; /*********************************************************************** * Main Emulation Component @@ -172,13 +174,13 @@ var Result res; map(self:GTPC, system:GTPC); - res := GTP_CodecPort_CtrlFunct.f_IPL4_listen(GTPC, cfg.gtpc_bind_ip, + res := GTPv1C_CodecPort_CtrlFunct.f_IPL4_listen(GTPC, cfg.gtpc_bind_ip, cfg.gtpc_bind_port, {udp:={}}); g_gtpc_id := res.connId; if (isvalue(cfg.gtpu_bind_ip) and isvalue(cfg.gtpu_bind_port)) { map(self:GTPU, system:GTPU); - res := GTP_CodecPort_CtrlFunct.f_GTPU_listen(GTPU, cfg.gtpu_bind_ip, + res := GTPv1U_CodecPort_CtrlFunct.f_GTPU_listen(GTPU, cfg.gtpu_bind_ip, cfg.gtpu_bind_port, {udp:={}}); g_gtpu_id := res.connId; } diff --git a/library/GTP_CodecPort.ttcn b/library/GTPv1C_CodecPort.ttcn similarity index 61% rename from library/GTP_CodecPort.ttcn rename to library/GTPv1C_CodecPort.ttcn index b516611..956a674 100644 --- a/library/GTP_CodecPort.ttcn +++ b/library/GTPv1C_CodecPort.ttcn @@ -1,4 +1,4 @@ -/* dual-faced port sitting on top of IPL4_asp UDP to encode/decode GTP +/* dual-faced port sitting on top of IPL4_asp UDP to encode/decode GTPv1C * (C) 2017 Harald Welte <laforge(a)gnumonks.org> * All rights reserved. * @@ -9,11 +9,10 @@ */ -module GTP_CodecPort { +module GTPv1C_CodecPort { import from IPL4asp_PortType all; import from IPL4asp_Types all; import from GTPC_Types all; - import from GTPU_Types all; import from Misc_Helpers all; modulepar { @@ -21,7 +20,7 @@ } /* identifies a remote peer (sender or receiver) */ - type record GtpPeer { + type record Gtp1cPeer { ConnectionId connId, HostName remName, PortNumber remPort @@ -29,16 +28,10 @@ /* Decoded GTP1C (Control Plane), used in send and receive direction */ type record Gtp1cUnitdata { - GtpPeer peer, + Gtp1cPeer peer, PDU_GTPC gtpc } - /* Decoded GTP1U (User Plane), used in send and receive direction */ - type record Gtp1uUnitdata { - GtpPeer peer, - PDU_GTPU gtpu - } - /* Translation port on top of IPL4asp; ASP_Event passed through transparently */ type port GTPC_PT message { out Gtp1cUnitdata; @@ -69,33 +62,4 @@ log2str("Rx GTPv1-C with field length ", out_ud.gtpc.lengthf, " + 8 != exp ", lengthof(in_ud.msg))); } } with { extension "prototype(fast)" }; - - - /* dual-faced port on top of IPL4asp; ASP_Event passed through transparently */ - type port GTPU_PT message { - out Gtp1uUnitdata; - in Gtp1uUnitdata, - ASP_ConnId_ReadyToRelease, - ASP_Event; - } with { extension "user IPL4asp_PT - out(Gtp1uUnitdata -> ASP_SendTo: function(f_enc_Gtp1uUD)) - in(ASP_RecvFrom -> Gtp1uUnitdata: function(f_dec_Gtp1uUD); - ASP_ConnId_ReadyToRelease -> ASP_ConnId_ReadyToRelease: simple; - ASP_Event -> ASP_Event: simple)" } - - function f_enc_Gtp1uUD(in Gtp1uUnitdata in_ud, out ASP_SendTo out_ud) { - out_ud.connId := in_ud.peer.connId; - out_ud.remName := in_ud.peer.remName; - out_ud.remPort := in_ud.peer.remPort; - out_ud.proto := { udp := {} }; - out_ud.msg := enc_PDU_GTPU(in_ud.gtpu); - } with { extension "prototype(fast)" }; - - function f_dec_Gtp1uUD(in ASP_RecvFrom in_ud, out Gtp1uUnitdata out_ud) { - out_ud.peer.connId := in_ud.connId; - out_ud.peer.remName := in_ud.remName; - out_ud.peer.remPort := in_ud.remPort; - out_ud.gtpu := dec_PDU_GTPU(in_ud.msg); - } with { extension "prototype(fast)" }; - } diff --git a/library/GTP_CodecPort_CtrlFunct.ttcn b/library/GTPv1C_CodecPort_CtrlFunct.ttcn similarity index 78% rename from library/GTP_CodecPort_CtrlFunct.ttcn rename to library/GTPv1C_CodecPort_CtrlFunct.ttcn index 4f61af7..e0a5ee7 100644 --- a/library/GTP_CodecPort_CtrlFunct.ttcn +++ b/library/GTPv1C_CodecPort_CtrlFunct.ttcn @@ -1,6 +1,6 @@ -module GTP_CodecPort_CtrlFunct { +module GTPv1C_CodecPort_CtrlFunct { - import from GTP_CodecPort all; + import from GTPv1C_CodecPort all; import from IPL4asp_Types all; external function f_IPL4_listen( @@ -39,12 +39,4 @@ in ConnectionId id, out UserData userData ) return Result; - - external function f_GTPU_listen( - inout GTPU_PT portRef, - in HostName locName, - in PortNumber locPort, - in ProtoTuple proto, - in OptionList options := {} - ) return Result; } diff --git a/library/GTP_CodecPort_CtrlFunctDef.cc b/library/GTPv1C_CodecPort_CtrlFunctDef.cc similarity index 69% rename from library/GTP_CodecPort_CtrlFunctDef.cc rename to library/GTPv1C_CodecPort_CtrlFunctDef.cc index c0b9391..2227fe1 100644 --- a/library/GTP_CodecPort_CtrlFunctDef.cc +++ b/library/GTPv1C_CodecPort_CtrlFunctDef.cc @@ -1,11 +1,11 @@ #include "IPL4asp_PortType.hh" #include "IPL4asp_PT.hh" -#include "GTP_CodecPort.hh" +#include "GTPv1C_CodecPort.hh" -namespace GTP__CodecPort__CtrlFunct { +namespace GTPv1C__CodecPort__CtrlFunct { IPL4asp__Types::Result f__IPL4__listen( - GTP__CodecPort::GTPC__PT& portRef, + GTPv1C__CodecPort::GTPC__PT& portRef, const IPL4asp__Types::HostName& locName, const IPL4asp__Types::PortNumber& locPort, const IPL4asp__Types::ProtoTuple& proto, @@ -13,9 +13,9 @@ { return f__IPL4__PROVIDER__listen(portRef, locName, locPort, proto, options); } - + IPL4asp__Types::Result f__IPL4__connect( - GTP__CodecPort::GTPC__PT& portRef, + GTPv1C__CodecPort::GTPC__PT& portRef, const IPL4asp__Types::HostName& remName, const IPL4asp__Types::PortNumber& remPort, const IPL4asp__Types::HostName& locName, @@ -29,38 +29,27 @@ } IPL4asp__Types::Result f__IPL4__close( - GTP__CodecPort::GTPC__PT& portRef, - const IPL4asp__Types::ConnectionId& connId, + GTPv1C__CodecPort::GTPC__PT& portRef, + const IPL4asp__Types::ConnectionId& connId, const IPL4asp__Types::ProtoTuple& proto) { return f__IPL4__PROVIDER__close(portRef, connId, proto); } IPL4asp__Types::Result f__IPL4__setUserData( - GTP__CodecPort::GTPC__PT& portRef, + GTPv1C__CodecPort::GTPC__PT& portRef, const IPL4asp__Types::ConnectionId& connId, const IPL4asp__Types::UserData& userData) { return f__IPL4__PROVIDER__setUserData(portRef, connId, userData); } - + IPL4asp__Types::Result f__IPL4__getUserData( - GTP__CodecPort::GTPC__PT& portRef, + GTPv1C__CodecPort::GTPC__PT& portRef, const IPL4asp__Types::ConnectionId& connId, IPL4asp__Types::UserData& userData) { return f__IPL4__PROVIDER__getUserData(portRef, connId, userData); } - - IPL4asp__Types::Result f__GTPU__listen( - GTP__CodecPort::GTPU__PT& portRef, - const IPL4asp__Types::HostName& locName, - const IPL4asp__Types::PortNumber& locPort, - const IPL4asp__Types::ProtoTuple& proto, - const IPL4asp__Types::OptionList& options) - { - return f__IPL4__PROVIDER__listen(portRef, locName, locPort, proto, options); - } - } diff --git a/library/GTP_Templates.ttcn b/library/GTPv1C_Templates.ttcn similarity index 92% rename from library/GTP_Templates.ttcn rename to library/GTPv1C_Templates.ttcn index 30346d4..7a2a993 100644 --- a/library/GTP_Templates.ttcn +++ b/library/GTPv1C_Templates.ttcn @@ -1,4 +1,4 @@ -/* GTP Templates in TTCN-3 +/* GTPv1-C Templates in TTCN-3 * (C) 2018 Harald Welte <laforge(a)gnumonks.org> * contributions by sysmocom - s.f.m.c. GmbH * All rights reserved. @@ -9,13 +9,12 @@ * SPDX-License-Identifier: GPL-2.0-or-later */ -module GTP_Templates { +module GTPv1C_Templates { import from General_Types all; import from Osmocom_Types all; import from GTPC_Types all; - import from GTPU_Types all; - import from GTP_CodecPort all; + import from GTPv1C_CodecPort all; import from IPCP_Types all; import from GSM_Types all; // RoutingAreaIdentification, CellIdentity @@ -1765,157 +1764,6 @@ sON_TransferApplicationIdentity := son_app_id } - /* GTP-U */ - - template (present) PDU_GTPU tr_GTP1U_PDU(template (present) OCT1 msg_type, - template (present) OCT4 teid, - template (present) GTPU_IEs ies := ?) := { - pn_bit := ?, - s_bit := ?, - e_bit := ?, - spare := ?, - /* Protocol Type flag (PT) shall be set to '1' in GTP */ - pt := '1'B, - /* Version shall be set to decimal 1 ('001'). */ - version := '001'B, - messageType := msg_type, - lengthf := ?, - teid := teid, - opt_part := *, - gtpu_IEs := ies - } - - function f_GTPU_s_bit(template (omit) uint16_t seq) return BIT1 { - if (istemplatekind(seq, "omit")) { - return '0'B; - } - return '1'B; - } - - function f_GTPU_opt_part(template (omit) uint16_t seq) return template (omit) GTPU_Header_optional_part { - if (istemplatekind(seq, "omit")) { - return omit; - } - var GTPU_Header_optional_part ret := { - sequenceNumber := int2oct(valueof(seq), 2), - npduNumber := '00'O, - nextExtHeader := '00'O, - gTPU_extensionHeader_List := omit - }; - return ret; - } - - /* generalized GTP-U send template */ - template (value) PDU_GTPU ts_GTP1U_PDU(OCT1 msg_type, template (omit) uint16_t seq, OCT4 teid, GTPU_IEs ies) := { - /* N-PDU Number flag (PN): the GTP-U header contains a meaningful N-PDU Number field if the PN - * flag is set to 1. */ - pn_bit := '0'B, /* we assume the encoder overwrites this if an optional part is given */ - /* If the Sequence Number flag (S) is set to '1' the sequence number field is present and - * meaningful otherwise it is set to '0'. For GTP-U messages Echo Request, Echo Response, - * Error Indication and Supported Extension Headers Notification, the S flag shall be set to '1'. - * - * Note that the caller must ensure that these conditions hold. - * The caller can either pass a sequence number (we set s_bit to '1'B) when appropriate, - * or may omit the sequence number (we set s_bit to '0'B). */ - s_bit := f_GTPU_s_bit(seq), - /* Extension header presence */ - e_bit := '0'B, - spare := '0'B, - /* Protocol Type flag (PT) shall be set to '1' in GTP */ - pt := '1'B, - /* Version shall be set to decimal 1 ('001'). */ - version := '001'B, - messageType := msg_type, - lengthf := 0, /* we assume encoder overwrites this */ - teid := teid, - opt_part := f_GTPU_opt_part(seq), - gtpu_IEs := ies - } - - template (present) Gtp1uUnitdata tr_GTPU_MsgType(template (present) GtpPeer peer, - template (present) OCT1 msg_type, - template (present) OCT4 teid) := { - peer := peer, - gtpu := tr_GTP1U_PDU(msg_type, teid) - } - - - /* template matching reception of GTP-U echo-request/response */ - template (present) Gtp1uUnitdata tr_GTPU_PING(template (present) GtpPeer peer) := tr_GTPU_MsgType(peer, echoRequest, '00000000'O); - template (present) Gtp1uUnitdata tr_GTPU_PONG(template (present) GtpPeer peer) := tr_GTPU_MsgType(peer, echoResponse, '00000000'O); - - /* template matching reception of GTP-U GPDU */ - template GTPU_IEs t_GPDU(template (present) octetstring data) := { - g_PDU_IEs := { - data := data - } - } - template (present) Gtp1uUnitdata tr_GTPU_GPDU(template (present) GtpPeer peer, - template (present) OCT4 teid, - template (present) octetstring data := ?) := { - peer := peer, - gtpu := tr_GTP1U_PDU('FF'O, teid, t_GPDU(data)) - } - - template (present) GTPU_IEs ts_UEchoReqPDU := { - echoRequest_IEs := { - private_extension_gtpu := omit - } - } - - /* master template for sending a GTP-C echo request */ - template (value) Gtp1uUnitdata ts_GTPU_PING(GtpPeer peer, uint16_t seq) := { - peer := peer, - gtpu := ts_GTP1U_PDU(echoRequest, seq, '00000000'O, valueof(ts_UEchoReqPDU)) - } - - template GTPU_IEs ts_UEchoRespPDU(OCT1 restart_counter) := { - echoResponse_IEs := { - recovery_gtpu := { - type_gtpu := '00'O, /* we assume encoder fixes? */ - restartCounter := restart_counter - }, - private_extension_gtpu := omit - } - } - - /* master template for sending a GTP-U echo response */ - template (present) Gtp1uUnitdata ts_GTPU_PONG(GtpPeer peer, uint16_t seq, OCT1 rest_ctr) := { - peer := peer, - gtpu := ts_GTP1U_PDU(echoResponse, seq, '00000000'O, valueof(ts_UEchoRespPDU(rest_ctr))) - } - - template (value) GSNAddress_gtpu ts_UGsnAddr(octetstring ip_addr) := { - type_gtpu := '85'O, - lengthf := lengthof(ip_addr), - gSNAddressValue := ip_addr - } - - template (value) TeidDataI_gtpu ts_UteidDataI(OCT4 teid) := { - type_gtpu := '10'O, - teidDataI := teid - } - - template (value) GTPU_IEs ts_UErrorIndication(OCT4 teid, octetstring gsn_addr) := { - errorIndication_IEs := { - teidDataI_gtpu := ts_UteidDataI(teid), - gSNAddress_gtpu := ts_UGsnAddr(gsn_addr), - private_extension_gtpu := omit - } - } - - /* master template for sending a GTP-U Error indication */ - template (value) Gtp1uUnitdata ts_GTPU_ErrorIndication(GtpPeer peer, uint16_t seq, OCT4 teid, octetstring gsn_addr) := { - peer := peer, - gtpu := ts_GTP1U_PDU('1A'O, seq, '00000000'O, valueof(ts_UErrorIndication(teid, gsn_addr))) - } - - /* master template for sending a GTP-U user plane data */ - template (value) Gtp1uUnitdata ts_GTP1U_GPDU(GtpPeer peer, template (omit) uint16_t seq, OCT4 teid, octetstring data) := { - peer := peer, - gtpu := ts_GTP1U_PDU('FF'O, seq, teid, { g_PDU_IEs := { data := data }}) - } - /* 3GPP TS 29.060, section 7.7.57 */ template (value) RIM_RoutingAddress ts_RIM_RoutingAddress(octetstring addr_value) := { type_gtpc := '9F'O, diff --git a/library/GTPv1U_CodecPort.ttcn b/library/GTPv1U_CodecPort.ttcn new file mode 100644 index 0000000..59c5ef3 --- /dev/null +++ b/library/GTPv1U_CodecPort.ttcn @@ -0,0 +1,58 @@ +/* dual-faced port sitting on top of IPL4_asp UDP to encode/decode GTPv1-U + * (C) 2017 Harald Welte <laforge(a)gnumonks.org> + * All rights reserved. + * + * 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 GTPv1U_CodecPort { + import from IPL4asp_PortType all; + import from IPL4asp_Types all; + import from GTPU_Types all; + import from Misc_Helpers all; + + /* identifies a remote peer (sender or receiver) */ + type record Gtp1uPeer { + ConnectionId connId, + HostName remName, + PortNumber remPort + } + + /* Decoded GTP1U (User Plane), used in send and receive direction */ + type record Gtp1uUnitdata { + Gtp1uPeer peer, + PDU_GTPU gtpu + } + + /* dual-faced port on top of IPL4asp; ASP_Event passed through transparently */ + type port GTPU_PT message { + out Gtp1uUnitdata; + in Gtp1uUnitdata, + ASP_ConnId_ReadyToRelease, + ASP_Event; + } with { extension "user IPL4asp_PT + out(Gtp1uUnitdata -> ASP_SendTo: function(f_enc_Gtp1uUD)) + in(ASP_RecvFrom -> Gtp1uUnitdata: function(f_dec_Gtp1uUD); + ASP_ConnId_ReadyToRelease -> ASP_ConnId_ReadyToRelease: simple; + ASP_Event -> ASP_Event: simple)" } + + function f_enc_Gtp1uUD(in Gtp1uUnitdata in_ud, out ASP_SendTo out_ud) { + out_ud.connId := in_ud.peer.connId; + out_ud.remName := in_ud.peer.remName; + out_ud.remPort := in_ud.peer.remPort; + out_ud.proto := { udp := {} }; + out_ud.msg := enc_PDU_GTPU(in_ud.gtpu); + } with { extension "prototype(fast)" }; + + function f_dec_Gtp1uUD(in ASP_RecvFrom in_ud, out Gtp1uUnitdata out_ud) { + out_ud.peer.connId := in_ud.connId; + out_ud.peer.remName := in_ud.remName; + out_ud.peer.remPort := in_ud.remPort; + out_ud.gtpu := dec_PDU_GTPU(in_ud.msg); + } with { extension "prototype(fast)" }; + +} diff --git a/library/GTPv1U_CodecPort_CtrlFunct.ttcn b/library/GTPv1U_CodecPort_CtrlFunct.ttcn new file mode 100644 index 0000000..3a86fc9 --- /dev/null +++ b/library/GTPv1U_CodecPort_CtrlFunct.ttcn @@ -0,0 +1,13 @@ +module GTPv1U_CodecPort_CtrlFunct { + + import from GTPv1U_CodecPort all; + import from IPL4asp_Types all; + + external function f_GTPU_listen( + inout GTPU_PT portRef, + in HostName locName, + in PortNumber locPort, + in ProtoTuple proto, + in OptionList options := {} + ) return Result; +} diff --git a/library/GTPv1U_CodecPort_CtrlFunctDef.cc b/library/GTPv1U_CodecPort_CtrlFunctDef.cc new file mode 100644 index 0000000..2edea80 --- /dev/null +++ b/library/GTPv1U_CodecPort_CtrlFunctDef.cc @@ -0,0 +1,17 @@ +#include "IPL4asp_PortType.hh" +#include "IPL4asp_PT.hh" +#include "GTP_CodecPort.hh" + +namespace GTPv1U__CodecPort__CtrlFunct { + + IPL4asp__Types::Result f__GTPU__listen( + GTPv1U__CodecPort::GTPU__PT& portRef, + const IPL4asp__Types::HostName& locName, + const IPL4asp__Types::PortNumber& locPort, + const IPL4asp__Types::ProtoTuple& proto, + const IPL4asp__Types::OptionList& options) + { + return f__IPL4__PROVIDER__listen(portRef, locName, locPort, proto, options); + } + +} diff --git a/library/GTPv1U_Templates.ttcn b/library/GTPv1U_Templates.ttcn new file mode 100644 index 0000000..f287e20 --- /dev/null +++ b/library/GTPv1U_Templates.ttcn @@ -0,0 +1,181 @@ +/* GTPv1-U Templates in TTCN-3 + * (C) 2018 Harald Welte <laforge(a)gnumonks.org> + * contributions by sysmocom - s.f.m.c. GmbH + * All rights reserved. + * + * 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 GTPv1U_Templates { + + import from General_Types all; + import from Osmocom_Types all; + import from GTPU_Types all; + import from GTPv1U_CodecPort all; + import from IPCP_Types all; + import from GSM_Types all; // RoutingAreaIdentification, CellIdentity + + template (present) PDU_GTPU tr_GTP1U_PDU(template (present) OCT1 msg_type, + template (present) OCT4 teid, + template (present) GTPU_IEs ies := ?) := { + pn_bit := ?, + s_bit := ?, + e_bit := ?, + spare := ?, + /* Protocol Type flag (PT) shall be set to '1' in GTP */ + pt := '1'B, + /* Version shall be set to decimal 1 ('001'). */ + version := '001'B, + messageType := msg_type, + lengthf := ?, + teid := teid, + opt_part := *, + gtpu_IEs := ies + } + + function f_GTPU_s_bit(template (omit) uint16_t seq) return BIT1 { + if (istemplatekind(seq, "omit")) { + return '0'B; + } + return '1'B; + } + + function f_GTPU_opt_part(template (omit) uint16_t seq) return template (omit) GTPU_Header_optional_part { + if (istemplatekind(seq, "omit")) { + return omit; + } + var GTPU_Header_optional_part ret := { + sequenceNumber := int2oct(valueof(seq), 2), + npduNumber := '00'O, + nextExtHeader := '00'O, + gTPU_extensionHeader_List := omit + }; + return ret; + } + + /* generalized GTP-U send template */ + template (value) PDU_GTPU ts_GTP1U_PDU(OCT1 msg_type, template (omit) uint16_t seq, OCT4 teid, GTPU_IEs ies) := { + /* N-PDU Number flag (PN): the GTP-U header contains a meaningful N-PDU Number field if the PN + * flag is set to 1. */ + pn_bit := '0'B, /* we assume the encoder overwrites this if an optional part is given */ + /* If the Sequence Number flag (S) is set to '1' the sequence number field is present and + * meaningful otherwise it is set to '0'. For GTP-U messages Echo Request, Echo Response, + * Error Indication and Supported Extension Headers Notification, the S flag shall be set to '1'. + * + * Note that the caller must ensure that these conditions hold. + * The caller can either pass a sequence number (we set s_bit to '1'B) when appropriate, + * or may omit the sequence number (we set s_bit to '0'B). */ + s_bit := f_GTPU_s_bit(seq), + /* Extension header presence */ + e_bit := '0'B, + spare := '0'B, + /* Protocol Type flag (PT) shall be set to '1' in GTP */ + pt := '1'B, + /* Version shall be set to decimal 1 ('001'). */ + version := '001'B, + messageType := msg_type, + lengthf := 0, /* we assume encoder overwrites this */ + teid := teid, + opt_part := f_GTPU_opt_part(seq), + gtpu_IEs := ies + } + + template (present) Gtp1uUnitdata tr_GTPU_MsgType(template (present) GtpPeer peer, + template (present) OCT1 msg_type, + template (present) OCT4 teid) := { + peer := peer, + gtpu := tr_GTP1U_PDU(msg_type, teid) + } + + + /* template matching reception of GTP-U echo-request/response */ + template (present) Gtp1uUnitdata tr_GTPU_PING(template (present) GtpPeer peer) := tr_GTPU_MsgType(peer, echoRequest, '00000000'O); + template (present) Gtp1uUnitdata tr_GTPU_PONG(template (present) GtpPeer peer) := tr_GTPU_MsgType(peer, echoResponse, '00000000'O); + + /* template matching reception of GTP-U GPDU */ + template GTPU_IEs t_GPDU(template (present) octetstring data) := { + g_PDU_IEs := { + data := data + } + } + template (present) Gtp1uUnitdata tr_GTPU_GPDU(template (present) GtpPeer peer, + template (present) OCT4 teid, + template (present) octetstring data := ?) := { + peer := peer, + gtpu := tr_GTP1U_PDU('FF'O, teid, t_GPDU(data)) + } + + template (present) GTPU_IEs ts_UEchoReqPDU := { + echoRequest_IEs := { + private_extension_gtpu := omit + } + } + + /* master template for sending a GTP-C echo request */ + template (value) Gtp1uUnitdata ts_GTPU_PING(GtpPeer peer, uint16_t seq) := { + peer := peer, + gtpu := ts_GTP1U_PDU(echoRequest, seq, '00000000'O, valueof(ts_UEchoReqPDU)) + } + + template GTPU_IEs ts_UEchoRespPDU(OCT1 restart_counter) := { + echoResponse_IEs := { + recovery_gtpu := { + type_gtpu := '00'O, /* we assume encoder fixes? */ + restartCounter := restart_counter + }, + private_extension_gtpu := omit + } + } + + /* master template for sending a GTP-U echo response */ + template (present) Gtp1uUnitdata ts_GTPU_PONG(GtpPeer peer, uint16_t seq, OCT1 rest_ctr) := { + peer := peer, + gtpu := ts_GTP1U_PDU(echoResponse, seq, '00000000'O, valueof(ts_UEchoRespPDU(rest_ctr))) + } + + template (value) GSNAddress_gtpu ts_UGsnAddr(octetstring ip_addr) := { + type_gtpu := '85'O, + lengthf := lengthof(ip_addr), + gSNAddressValue := ip_addr + } + + template (value) TeidDataI_gtpu ts_UteidDataI(OCT4 teid) := { + type_gtpu := '10'O, + teidDataI := teid + } + + template (value) GTPU_IEs ts_UErrorIndication(OCT4 teid, octetstring gsn_addr) := { + errorIndication_IEs := { + teidDataI_gtpu := ts_UteidDataI(teid), + gSNAddress_gtpu := ts_UGsnAddr(gsn_addr), + private_extension_gtpu := omit + } + } + + /* master template for sending a GTP-U Error indication */ + template (value) Gtp1uUnitdata ts_GTPU_ErrorIndication(GtpPeer peer, uint16_t seq, OCT4 teid, octetstring gsn_addr) := { + peer := peer, + gtpu := ts_GTP1U_PDU('1A'O, seq, '00000000'O, valueof(ts_UErrorIndication(teid, gsn_addr))) + } + + /* master template for sending a GTP-U user plane data */ + template (value) Gtp1uUnitdata ts_GTP1U_GPDU(GtpPeer peer, template (omit) uint16_t seq, OCT4 teid, octetstring data) := { + peer := peer, + gtpu := ts_GTP1U_PDU('FF'O, seq, teid, { g_PDU_IEs := { data := data }}) + } + + /* 3GPP TS 29.060, section 7.7.57 */ + template (value) RIM_RoutingAddress ts_RIM_RoutingAddress(octetstring addr_value) := { + type_gtpc := '9F'O, + lengthf := 0, /* we assume encoder overwrites this */ + rIM_RoutingAddressValue := addr_value + } + template (present) RIM_RoutingAddress tr_RIM_RoutingAddress(template (present) octetstring addr_value := ?) := { + type_gtpc := '9F'O, + lengthf := ?, + rIM_RoutingAddressValue := addr_value + } +} diff --git a/mme/MME_Tests.ttcn b/mme/MME_Tests.ttcn index 1cacbd9..9e43e68 100644 --- a/mme/MME_Tests.ttcn +++ b/mme/MME_Tests.ttcn @@ -35,9 +35,9 @@ import from SGsAP_Emulation all; import from GTP_Emulation all; -import from GTP_Templates all; -import from GTP_CodecPort all; import from GTPC_Types all; +import from GTPv1C_CodecPort all; +import from GTPv1C_Templates all; import from LTE_CryptoFunctions all; @@ -960,7 +960,7 @@ } -private altstep as_gtp_sgsn_context_2g_to_4g(OCT4 new_sgsn_teid := 'ABABABAB'O, GTP_Templates.GTP_RATType rat_type := GTP_RAT_TYPE_EUTRAN) runs on ConnHdlr { +private altstep as_gtp_sgsn_context_2g_to_4g(OCT4 new_sgsn_teid := 'ABABABAB'O, GTPv1C_Templates.GTP_RATType rat_type := GTP_RAT_TYPE_EUTRAN) runs on ConnHdlr { var Gtp1cUnitdata gtpc_pdu; [] GTP.receive(tr_GTPC_SGSNContextReq(g_gn_iface_peer, tr_SGSNContextReqPDU(rat_type := int2oct(enum2int(rat_type), 1)))) -> value gtpc_pdu { diff --git a/mme/gen_links.sh b/mme/gen_links.sh index 32c782f..be08870 100755 --- a/mme/gen_links.sh +++ b/mme/gen_links.sh @@ -77,7 +77,7 @@ FILES+="NAS_Templates.ttcn GTPv2_PrivateExtensions.ttcn GTPv2_Templates.ttcn " FILES+="DIAMETER_Types.ttcn DIAMETER_CodecPort.ttcn DIAMETER_CodecPort_CtrlFunct.ttcn DIAMETER_CodecPort_CtrlFunctDef.cc DIAMETER_Emulation.ttcn " FILES+="DIAMETER_Templates.ttcn DIAMETER_ts29_272_Templates.ttcn " -FILES+="GTP_CodecPort.ttcn GTP_CodecPort_CtrlFunct.ttcn GTP_CodecPort_CtrlFunctDef.cc GTP_Emulation.ttcn GTP_Templates.ttcn Osmocom_Gb_Types.ttcn " +FILES+="GTPv1C_CodecPort.ttcn GTPv1C_CodecPort_CtrlFunct.ttcn GTPv1C_CodecPort_CtrlFunctDef.cc GTPv1U_CodecPort.ttcn GTPv1U_CodecPort_CtrlFunct.ttcn GTPv1U_CodecPort_CtrlFunctDef.cc GTP_Emulation.ttcn GTPv1C_Templates.ttcn Osmocom_Gb_Types.ttcn " FILES+="GTPv2_PrivateExtensions.ttcn GTPv2_Templates.ttcn " FILES+="GTPv2_CodecPort.ttcn GTPv2_CodecPort_CtrlFunctDef.cc GTPv2_CodecPort_CtrlFunct.ttcn GTPv2_Emulation.ttcn " FILES+="BSSGP_Emulation.ttcnpp Osmocom_Gb_Types.ttcn " diff --git a/mme/regen_makefile.sh b/mme/regen_makefile.sh index e153d35..6e86346 100755 --- a/mme/regen_makefile.sh +++ b/mme/regen_makefile.sh @@ -11,7 +11,8 @@ DIAMETER_EncDec.cc GTPC_EncDec.cc GTPU_EncDec.cc - GTP_CodecPort_CtrlFunctDef.cc + GTPv1C_CodecPort_CtrlFunctDef.cc + GTPv1U_CodecPort_CtrlFunctDef.cc GTPv2_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc diff --git a/pgw/gen_links.sh b/pgw/gen_links.sh index 40671f9..19b776b 100755 --- a/pgw/gen_links.sh +++ b/pgw/gen_links.sh @@ -59,7 +59,7 @@ DIR=../library FILES="Misc_Helpers.ttcn General_Types.ttcn GSM_Types.ttcn Osmocom_Types.ttcn Native_Functions.ttcn Native_FunctionDefs.cc IPCP_Types.ttcn PAP_Types.ttcn " -FILES+="GTP_CodecPort.ttcn GTP_CodecPort_CtrlFunct.ttcn GTP_CodecPort_CtrlFunctDef.cc GTP_Templates.ttcn Osmocom_Gb_Types.ttcn " +FILES+="GTPv1C_CodecPort.ttcn GTPv1C_CodecPort_CtrlFunct.ttcn GTPv1C_CodecPort_CtrlFunctDef.cc GTPv1U_CodecPort.ttcn GTPv1U_CodecPort_CtrlFunct.ttcn GTPv1U_CodecPort_CtrlFunctDef.cc GTPv1C_Templates.ttcn Osmocom_Gb_Types.ttcn " FILES+="GTPv2_PrivateExtensions.ttcn GTPv2_Templates.ttcn " FILES+="GTPv2_CodecPort.ttcn GTPv2_CodecPort_CtrlFunctDef.cc GTPv2_CodecPort_CtrlFunct.ttcn GTPv2_Emulation.ttcn " FILES+="DNS_Helpers.ttcn " diff --git a/pgw/regen_makefile.sh b/pgw/regen_makefile.sh index 5edcaef..2f58493 100755 --- a/pgw/regen_makefile.sh +++ b/pgw/regen_makefile.sh @@ -9,7 +9,8 @@ DIAMETER_EncDec.cc GTPC_EncDec.cc GTPU_EncDec.cc - GTP_CodecPort_CtrlFunctDef.cc + GTPv1C_CodecPort_CtrlFunctDef.cc + GTPv1U_CodecPort_CtrlFunctDef.cc GTPv2_CodecPort_CtrlFunctDef.cc ICMP_EncDec.cc ICMPv6_EncDec.cc diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn index 0824d6e..48b8747 100644 --- a/sgsn/SGSN_Tests.ttcn +++ b/sgsn/SGSN_Tests.ttcn @@ -42,11 +42,13 @@ import from RANAP_PDU_Descriptions all; import from RANAP_IEs all; -import from GTP_Emulation all; -import from GTP_Templates all; -import from GTP_CodecPort all; +import from GTPv1C_CodecPort all; +import from GTPv1U_CodecPort all; import from GTPC_Types all; import from GTPU_Types all; +import from GTPv1C_Templates all; +import from GTPv1U_Templates all; +import from GTP_Emulation all; import from LLC_Types all; import from LLC_Templates all; diff --git a/sgsn/gen_links.sh b/sgsn/gen_links.sh index 3aa2d38..8df1a87 100755 --- a/sgsn/gen_links.sh +++ b/sgsn/gen_links.sh @@ -93,7 +93,9 @@ # IPA_Emulation + dependencies FILES+="IPA_Types.ttcn IPA_Emulation.ttcnpp IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc Native_Functions.ttcn Native_FunctionDefs.cc " FILES+="PCO_Types.ttcn GSUP_Types.ttcn GSUP_Templates.ttcn GSUP_Emulation.ttcn " -FILES+="GTP_CodecPort.ttcn GTP_CodecPort_CtrlFunct.ttcn GTP_CodecPort_CtrlFunctDef.cc GTP_Emulation.ttcn GTP_Templates.ttcn IPCP_Types.ttcn RAW_NS.ttcnpp " +FILES+="GTPv1C_CodecPort.ttcn GTPv1C_CodecPort_CtrlFunct.ttcn GTPv1C_CodecPort_CtrlFunctDef.cc GTPv1C_Templates.ttcn Osmocom_Gb_Types.ttcn " +FILES+="GTPv1U_CodecPort.ttcn GTPv1U_CodecPort_CtrlFunct.ttcn GTPv1U_CodecPort_CtrlFunctDef.cc GTPv1U_Templates.ttcn " +FILES+="GTP_Emulation.ttcn IPCP_Types.ttcn RAW_NS.ttcnpp " gen_links $DIR $FILES ignore_pp_results diff --git a/sgsn/regen_makefile.sh b/sgsn/regen_makefile.sh index 4ac7d40..5c9c5ea 100755 --- a/sgsn/regen_makefile.sh +++ b/sgsn/regen_makefile.sh @@ -9,7 +9,8 @@ BSSGP_EncDec.cc GTPC_EncDec.cc GTPU_EncDec.cc - GTP_CodecPort_CtrlFunctDef.cc + GTPv1C_CodecPort_CtrlFunctDef.cc + GTPv1U_CodecPort_CtrlFunctDef.cc IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36126?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ic15c9a2e92828cbafb4dda7355ee534107051e2d Gerrit-Change-Number: 36126 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: *_Emulation: Allow running ePDG against 512 concurrent connections
by pespin 29 Feb '24

29 Feb '24
Attention is currently required from: laforge, lynxis lazus. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36107?usp=email ) Change subject: *_Emulation: Allow running ePDG against 512 concurrent connections ...................................................................... Patch Set 4: (1 comment) Patchset: PS4: This is actually not needed for now, so marking as WIP. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36107?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ic0646b7db22ae970882b9266eaa8c1a6df0780e1 Gerrit-Change-Number: 36107 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Thu, 29 Feb 2024 17:16:16 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmocore[master]: osmo_io: Assign const name when stealing TX msg from iofd ctx
by laforge 29 Feb '24

29 Feb '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/36121?usp=email ) Change subject: osmo_io: Assign const name when stealing TX msg from iofd ctx ...................................................................... osmo_io: Assign const name when stealing TX msg from iofd ctx All TX messages are moved from iofd instance to the user's context. iofd may be destroyed, but the message is still available to the user. To prevent a use-after-free bug, the context name must be changed from iofd->name to a constant that does not belong to iofd. Change-Id: Ib8dae924fa2d94a7f636136ba7279b965a18cf5b --- M src/core/osmo_io.c 1 file changed, 15 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/core/osmo_io.c b/src/core/osmo_io.c index 7ea959b..33466e5 100644 --- a/src/core/osmo_io.c +++ b/src/core/osmo_io.c @@ -152,9 +152,7 @@ uint16_t headroom = iofd->msgb_alloc.headroom; OSMO_ASSERT(iofd->msgb_alloc.size < 0xffff - headroom); - return msgb_alloc_headroom_c(iofd, - iofd->msgb_alloc.size + headroom, headroom, - iofd->name ? : "iofd_msgb"); + return msgb_alloc_headroom_c(iofd, iofd->msgb_alloc.size + headroom, headroom, "osmo_io_msgb"); } /*! return the pending msgb in iofd or NULL if there is none*/ -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36121?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib8dae924fa2d94a7f636136ba7279b965a18cf5b Gerrit-Change-Number: 36121 Gerrit-PatchSet: 2 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in libosmocore[master]: osmo_io: Assign const name when stealing TX msg from iofd ctx
by laforge 29 Feb '24

29 Feb '24
Attention is currently required from: jolly. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/36121?usp=email ) Change subject: osmo_io: Assign const name when stealing TX msg from iofd ctx ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36121?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib8dae924fa2d94a7f636136ba7279b965a18cf5b Gerrit-Change-Number: 36121 Gerrit-PatchSet: 2 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Comment-Date: Thu, 29 Feb 2024 16:20:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmocore[master]: Make osmo-io compile without libsctp support (--disable-libsctp)
by jolly 29 Feb '24

29 Feb '24
jolly has abandoned this change. ( https://gerrit.osmocom.org/c/libosmocore/+/36056?usp=email ) Change subject: Make osmo-io compile without libsctp support (--disable-libsctp) ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36056?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ief8ca40c0e85efe340eaecb866a10f76ac2bfc98 Gerrit-Change-Number: 36056 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: abandon
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • ...
  • 175
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.