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

Keyboard Shortcuts

Thread View

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

gerrit-log

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

  • 1 participants
  • 97208 discussions
Change in simtrace2[master]: lua dissector: adjust usage instructions
by Hoernchen 02 Feb '22

02 Feb '22
Hoernchen has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/27053 ) Change subject: lua dissector: adjust usage instructions ...................................................................... lua dissector: adjust usage instructions ...as originally described in the first commit that added the file. Change-Id: I67918f0f62b1619786324ae84276a46d7c64eee5 --- M contrib/simtrace.lua 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/53/27053/1 diff --git a/contrib/simtrace.lua b/contrib/simtrace.lua index fa477d5..fadc01a 100644 --- a/contrib/simtrace.lua +++ b/contrib/simtrace.lua @@ -2,7 +2,10 @@ -- (C) 2021 by sysmocom - s.f.m.c. GmbH, Author: Eric Wild -- SPDX-License-Identifier: GPL-2.0+ -- --- Usage: Put this into your ~/.wireshark/init.lua [or include it from there] +-- Usage: Move this file to your "personal lua plugins" folder that +-- can be found in the Wireshark Help->About Wireshark->Folders tab +-- Windows: %APPDATA%\Wireshark\plugins. +-- Unix-like systems: ~/.local/lib/wireshark/plugins. usb_simtrace_protocol = Proto("USB_simtrace", "USB simtrace protocol") -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/27053 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I67918f0f62b1619786324ae84276a46d7c64eee5 Gerrit-Change-Number: 27053 Gerrit-PatchSet: 1 Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in docker-playground[master]: treewide: use almalinux instead of centos8
by laforge 02 Feb '22

02 Feb '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/27049 ) Change subject: treewide: use almalinux instead of centos8 ...................................................................... treewide: use almalinux instead of centos8 CentOS Linux 8 is EOL, attempting to install packages in it results in an error. CentOS Linux is a rebuild of RHEL (stable versions). The CentOS projects recommends to use CentOS Stream instead, which is a build of the "public development branch for RHEL". After the early EOL was announced on 2020-12-08, alternative projects AlmaLinux and Rocky Linux have been established as binary compatible forks of RHEL 8 (stable versions). Both Alma and Rocky seem to be solid projects, see related Wikipedia articles and their sources. Pick Alma and adjust the whole tree to use the almalinux:8 docker image instead of centos:centos8. Fix for: Error: Failed to download metadata for repo 'appstream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried Related: SYS#5818 Related: https://www.centos.org/cl-vs-cs/ Related: https://www.centos.org/centos-linux-eol/ Related: https://bugs.centos.org/view.php?id=18394 Related: https://en.wikipedia.org/wiki/AlmaLinux Related: https://en.wikipedia.org/wiki/Rocky_Linux Change-Id: I30e1a773b901b1d2187214445116c7f2aecc4e36 --- M centos8-build/Dockerfile M centos8-build/Makefile M centos8-obs-latest/Dockerfile M centos8-obs-latest/Makefile M centos8-repo-install-test/Dockerfile M jenkins-common.sh M systemd/Dockerfile 7 files changed, 9 insertions(+), 9 deletions(-) Approvals: laforge: Looks good to me, approved; Verified pespin: Looks good to me, but someone else must approve diff --git a/centos8-build/Dockerfile b/centos8-build/Dockerfile index e36e3f0..26ef819 100644 --- a/centos8-build/Dockerfile +++ b/centos8-build/Dockerfile @@ -1,5 +1,5 @@ ARG REGISTRY=docker.io -ARG UPSTREAM_DISTRO=centos:centos8 +ARG UPSTREAM_DISTRO=almalinux:8 FROM ${REGISTRY}/${UPSTREAM_DISTRO} # Arguments used after FROM must be specified again ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" diff --git a/centos8-build/Makefile b/centos8-build/Makefile index cba5cee..a18eb5c 100644 --- a/centos8-build/Makefile +++ b/centos8-build/Makefile @@ -1,3 +1,3 @@ -UPSTREAM_DISTRO:=centos:centos8 +UPSTREAM_DISTRO:=almalinux:8 DISTRO:=centos8 include ../make/Makefile diff --git a/centos8-obs-latest/Dockerfile b/centos8-obs-latest/Dockerfile index 4e180de..69eeb79 100644 --- a/centos8-obs-latest/Dockerfile +++ b/centos8-obs-latest/Dockerfile @@ -1,5 +1,5 @@ ARG REGISTRY=docker.io -ARG UPSTREAM_DISTRO=centos:centos8 +ARG UPSTREAM_DISTRO=almalinux:8 FROM ${REGISTRY}/${UPSTREAM_DISTRO} # Arguments used after FROM must be specified again ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org" diff --git a/centos8-obs-latest/Makefile b/centos8-obs-latest/Makefile index cba5cee..a18eb5c 100644 --- a/centos8-obs-latest/Makefile +++ b/centos8-obs-latest/Makefile @@ -1,3 +1,3 @@ -UPSTREAM_DISTRO:=centos:centos8 +UPSTREAM_DISTRO:=almalinux:8 DISTRO:=centos8 include ../make/Makefile diff --git a/centos8-repo-install-test/Dockerfile b/centos8-repo-install-test/Dockerfile index 27d7a59..2f1c345 100644 --- a/centos8-repo-install-test/Dockerfile +++ b/centos8-repo-install-test/Dockerfile @@ -1,6 +1,6 @@ ARG USER ARG REGISTRY=docker.io -ARG UPSTREAM_DISTRO=centos:centos8 +ARG UPSTREAM_DISTRO=almalinux:8 FROM ${REGISTRY}/${UPSTREAM_DISTRO} # dnf-utils: for repoquery diff --git a/jenkins-common.sh b/jenkins-common.sh index 1e9435a..7130fe2 100644 --- a/jenkins-common.sh +++ b/jenkins-common.sh @@ -39,9 +39,9 @@ docker_upstream_distro_from_image_name() { case "$1" in osmo-*-centos7) echo "centos:centos7"; ;; - osmo-*-centos8) echo "centos:centos8"; ;; + osmo-*-centos8) echo "almalinux:8"; ;; centos7-*) echo "centos:centos7" ;; - centos8-*) echo "centos:centos8" ;; + centos8-*) echo "almalinux:8" ;; debian9-*) echo "debian:stretch" ;; debian10-*) echo "debian:buster" ;; debian11-*) echo "debian:bullseye" ;; @@ -120,7 +120,7 @@ # name (e.g. osmo-mgw-master-centos8), it gets removed from the subdir # where the Dockerfile is taken from (e.g. osmo-mgw-master/Dockerfile) # and UPSTREAM_DISTRO and DISTRO are passed accordingly (e.g. -# UPSTREAM_DISTRO=centos:centos8 DISTRO=centos8). This allows one +# UPSTREAM_DISTRO=almalinux:8 DISTRO=centos8). This allows one # Dockerfile for multiple distributions, without duplicating configs for # each distribution. Dependencies listed in docker_depends() are built # automatically too. diff --git a/systemd/Dockerfile b/systemd/Dockerfile index 8f1763d..63d4c40 100644 --- a/systemd/Dockerfile +++ b/systemd/Dockerfile @@ -1,5 +1,5 @@ ARG REGISTRY=docker.io -ARG UPSTREAM_DISTRO=centos:centos8 +ARG UPSTREAM_DISTRO=almalinux:8 FROM ${REGISTRY}/${UPSTREAM_DISTRO} # Arguments used after FROM must be specified again ARG DISTRO -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/27049 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I30e1a773b901b1d2187214445116c7f2aecc4e36 Gerrit-Change-Number: 27049 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in docker-playground[master]: treewide: use almalinux instead of centos8
by laforge 02 Feb '22

02 Feb '22
Attention is currently required from: osmith. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/27049 ) Change subject: treewide: use almalinux instead of centos8 ...................................................................... Patch Set 1: Verified+1 Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/27049 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I30e1a773b901b1d2187214445116c7f2aecc4e36 Gerrit-Change-Number: 27049 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Wed, 02 Feb 2022 10:02:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ttcn3-hacks[master]: ggsn: Submit User Location Information in CreatePDPContextReq
by pespin 02 Feb '22

02 Feb '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27052 ) Change subject: ggsn: Submit User Location Information in CreatePDPContextReq ...................................................................... ggsn: Submit User Location Information in CreatePDPContextReq According to TS 29.060, sec 7.3.1 Create PDP Context Request: """ The SGSN shall include the User Location Information IE in the PDP Context Activation procedure. The SGSN shall include the CGI or SAI in the "Geographic Location" field of the User Location Information IE depending on whether the MS is in a cell or a service area respectively. """ Change-Id: Iaea95e5779d4f878023ce3f160ac69f092452056 --- M ggsn_tests/GGSN_Tests.ttcn M library/GTP_Templates.ttcn 2 files changed, 34 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/52/27052/1 diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn index 28e34e9..634534f 100644 --- a/ggsn_tests/GGSN_Tests.ttcn +++ b/ggsn_tests/GGSN_Tests.ttcn @@ -84,7 +84,8 @@ OCT4 teid_remote, /* TEI (Control) remote side */ OCT4 teic_remote, - OCT1 ratType optional + OCT1 ratType optional, + UserLocationInformation uli optional } type component GT_CT { @@ -246,7 +247,15 @@ eua := eua, teid := f_rnd_tei(), teic := f_rnd_tei(), - ratType := ratType + ratType := ratType, + uli := { + type_gtpc := '98'O, + lengthf := 0 /* filled in by encoder */, + geographicLocationType := '00'O /* CGI */, + geographicLocation := { + geographicLocationCGI := ts_GeographicLocationCGI('262'H, '42F'H, '0001'O, '0002'O) + } + } } /* send GTP-C for a given context and increment sequence number */ @@ -318,7 +327,7 @@ log("sending CreatePDP"); f_send_gtpc(ts_GTPC_CreatePDP(g_peer_c, g_c_seq_nr, ctx.imsi, g_restart_ctr, ctx.teid, ctx.teic, ctx.nsapi, ctx.eua, ctx.apn, - g_sgsn_ip_c, g_sgsn_ip_u, ctx.msisdn, ctx.pco_req, ctx.ratType)); + g_sgsn_ip_c, g_sgsn_ip_u, ctx.msisdn, ctx.pco_req, ctx.ratType, ctx.uli)); T_default.start; d := activate(pingpong()); alt { diff --git a/library/GTP_Templates.ttcn b/library/GTP_Templates.ttcn index 94f327e..8f6098a 100644 --- a/library/GTP_Templates.ttcn +++ b/library/GTP_Templates.ttcn @@ -301,11 +301,28 @@ return rt; } + template (value) GeographicLocationCGI + ts_GeographicLocationCGI(template (value) hexstring mcc, + template (value) hexstring mnc, + template (value) OCT2 lac, + template (value) OCT2 cI_value) := + { + mccDigit1 := mcc[0], + mccDigit2 := mcc[1], + mccDigit3 := mcc[2], + mncDigit3 := mnc[2], /* 'F'H for 2 digit MNC */ + mncDigit1 := mnc[0], + mncDigit2 := mnc[1], + lac := lac, + cI_value := cI_value + } + template GTPC_PDUs ts_CreatePdpPDU(hexstring imsi, OCT1 restart_ctr, OCT4 teid_data, OCT4 teid_ctrl, BIT4 nsapi, EndUserAddress eua, octetstring apn, octetstring sgsn_ip_sign, octetstring sgsn_ip_data, octetstring msisdn, template ProtConfigOptions pco := omit, - template (omit) OCT1 ratType := omit) := { + template (omit) OCT1 ratType := omit, + template (omit) UserLocationInformation uli := omit) := { createPDPContextRequest := { imsi := ts_Imsi(imsi), rai := omit, @@ -345,7 +362,7 @@ commonFlags := omit, aPN_Restriction := omit, ratType := f_ts_RATType(ratType), - userLocationInformation := omit, + userLocationInformation := uli, mS_TimeZone := omit, imeisv := omit, camelChargingInformationContainer := omit, @@ -367,12 +384,13 @@ octetstring apn, octetstring sgsn_ip_sign, octetstring sgsn_ip_data, octetstring msisdn, template ProtConfigOptions pco := omit, - template (omit) OCT1 ratType := omit) := { + template (omit) OCT1 ratType := omit, + template (omit) UserLocationInformation uli := omit) := { peer := peer, gtpc := ts_GTP1C_PDU(createPDPContextRequest, '00000000'O, valueof(ts_CreatePdpPDU(imsi, restart_ctr, teid_data, teid_ctrl, nsapi, eua, apn, sgsn_ip_sign, - sgsn_ip_data, msisdn, pco, ratType)), seq) + sgsn_ip_data, msisdn, pco, ratType, uli)), seq) } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27052 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: Iaea95e5779d4f878023ce3f160ac69f092452056 Gerrit-Change-Number: 27052 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-ttcn3-hacks[master]: ggsn: Submit RATType in CreatePDPContextReq
by pespin 02 Feb '22

02 Feb '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27051 ) Change subject: ggsn: Submit RATType in CreatePDPContextReq ...................................................................... ggsn: Submit RATType in CreatePDPContextReq According to TS 29.060, sec 7.3.1 Create PDP Context Request: "The SGSN shall include the RAT Type IE during Primary PDP Context Activation procedure." Change-Id: Ibc57798e50ccd08ef6126f75f7c8134e56d2778a --- M ggsn_tests/GGSN_Tests.ttcn M library/GTP_Templates.ttcn 2 files changed, 26 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/51/27051/1 diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn index a0c7b16..28e34e9 100644 --- a/ggsn_tests/GGSN_Tests.ttcn +++ b/ggsn_tests/GGSN_Tests.ttcn @@ -83,7 +83,8 @@ /* TEI (Data) remote side */ OCT4 teid_remote, /* TEI (Control) remote side */ - OCT4 teic_remote + OCT4 teic_remote, + OCT1 ratType optional } type component GT_CT { @@ -236,7 +237,7 @@ /* define an (internal) representation of a PDP context */ template PdpContext t_DefinePDP(hexstring imsi, octetstring msisdn, octetstring apn, - EndUserAddress eua) := { + EndUserAddress eua, OCT1 ratType := '02'O /* GERAN */) := { imsi := imsi, msisdn := msisdn, nsapi := f_rnd_nsapi(), @@ -244,7 +245,8 @@ pco_req := omit, eua := eua, teid := f_rnd_tei(), - teic := f_rnd_tei() + teic := f_rnd_tei(), + ratType := ratType } /* send GTP-C for a given context and increment sequence number */ @@ -316,7 +318,7 @@ log("sending CreatePDP"); f_send_gtpc(ts_GTPC_CreatePDP(g_peer_c, g_c_seq_nr, ctx.imsi, g_restart_ctr, ctx.teid, ctx.teic, ctx.nsapi, ctx.eua, ctx.apn, - g_sgsn_ip_c, g_sgsn_ip_u, ctx.msisdn, ctx.pco_req)); + g_sgsn_ip_c, g_sgsn_ip_u, ctx.msisdn, ctx.pco_req, ctx.ratType)); T_default.start; d := activate(pingpong()); alt { diff --git a/library/GTP_Templates.ttcn b/library/GTP_Templates.ttcn index 9c8d1b6..94f327e 100644 --- a/library/GTP_Templates.ttcn +++ b/library/GTP_Templates.ttcn @@ -287,10 +287,25 @@ padding := 'F'H } + function f_ts_RATType(template (omit) OCT1 ratType := omit) return template (omit) RATType { + var template (omit) RATType rt; + if (istemplatekind(ratType, "omit")) { + rt := omit; + } else { + rt := { + type_gtpc := '97'O, + lengthf := 1, + ratTypeValue := ratType + }; + } + return rt; + } + template GTPC_PDUs ts_CreatePdpPDU(hexstring imsi, OCT1 restart_ctr, OCT4 teid_data, OCT4 teid_ctrl, BIT4 nsapi, EndUserAddress eua, octetstring apn, octetstring sgsn_ip_sign, octetstring sgsn_ip_data, - octetstring msisdn, template ProtConfigOptions pco := omit) := { + octetstring msisdn, template ProtConfigOptions pco := omit, + template (omit) OCT1 ratType := omit) := { createPDPContextRequest := { imsi := ts_Imsi(imsi), rai := omit, @@ -329,7 +344,7 @@ omcId := omit, commonFlags := omit, aPN_Restriction := omit, - ratType := omit, + ratType := f_ts_RATType(ratType), userLocationInformation := omit, mS_TimeZone := omit, imeisv := omit, @@ -351,12 +366,13 @@ OCT4 teid_ctrl, BIT4 nsapi, EndUserAddress eua, octetstring apn, octetstring sgsn_ip_sign, octetstring sgsn_ip_data, octetstring msisdn, - template ProtConfigOptions pco := omit) := { + template ProtConfigOptions pco := omit, + template (omit) OCT1 ratType := omit) := { peer := peer, gtpc := ts_GTP1C_PDU(createPDPContextRequest, '00000000'O, valueof(ts_CreatePdpPDU(imsi, restart_ctr, teid_data, teid_ctrl, nsapi, eua, apn, sgsn_ip_sign, - sgsn_ip_data, msisdn, pco)), seq) + sgsn_ip_data, msisdn, pco, ratType)), seq) } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27051 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: Ibc57798e50ccd08ef6126f75f7c8134e56d2778a Gerrit-Change-Number: 27051 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in libosmocore[master]: core/utils.h: make use of OSMO_LIKELY in OSMO_ASSERT
by fixeria 02 Feb '22

02 Feb '22
Attention is currently required from: osmith, laforge, pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/27047 ) Change subject: core/utils.h: make use of OSMO_LIKELY in OSMO_ASSERT ...................................................................... Patch Set 2: (1 comment) Patchset: PS2: So the linter suggests the following: include/osmocom/core/utils.h:113: ERROR:MULTISTATEMENT_MACRO_USE_DO_WHILE: Macros starting with if should be enclosed by a do - while loop to avoid possible if/else logic defects I tried doing this, and got lots of compilation errors like: logging.c:1430:9: error: expected ‘;’ before ‘tall_log_ctx’ The problem is that some OSMO_ASSERT statements in the code (not only in libosmocore) have no semicolon in the end. I suggest to ignore this warning, as I see no easy solution to this. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27047 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I29b32a2477ec92762f8f0ce5e5c5a30810f6abbe Gerrit-Change-Number: 27047 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 02 Feb 2022 08:37:40 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in docker-playground[master]: treewide: use almalinux instead of centos8
by pespin 02 Feb '22

02 Feb '22
Attention is currently required from: osmith, laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/27049 ) Change subject: treewide: use almalinux instead of centos8 ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/27049 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I30e1a773b901b1d2187214445116c7f2aecc4e36 Gerrit-Change-Number: 27049 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Wed, 02 Feb 2022 08:25:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in docker-playground[master]: osmo-uecups-master: install iputils-ping for ttcn3-pgw-test
by pespin 02 Feb '22

02 Feb '22
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/27045 ) Change subject: osmo-uecups-master: install iputils-ping for ttcn3-pgw-test ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/27045 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I73a78949d2e433d7cc4233395e45665056f083c8 Gerrit-Change-Number: 27045 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Wed, 02 Feb 2022 08:19:44 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in docker-playground[master]: ttcn3-pgw-test: make osmo-uecups-daemon more verbose
by pespin 02 Feb '22

02 Feb '22
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/27044 ) Change subject: ttcn3-pgw-test: make osmo-uecups-daemon more verbose ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/27044 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Id491b4f9db63c82f3dc58f3fc523b4f84fea01e0 Gerrit-Change-Number: 27044 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Wed, 02 Feb 2022 08:18:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libosmocore[master]: add osmo_sockaddr_from/to_octets()
by neels 02 Feb '22

02 Feb '22
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/27050 ) Change subject: add osmo_sockaddr_from/to_octets() ...................................................................... add osmo_sockaddr_from/to_octets() Shorthand for the INET/INET6 switch() to get/put the addr part, useful for encoding and decoding message buffers. Related: OS#5599 Change-Id: Ie9e33bfac525c59c30714663d2bfcc62ec9eeb81 --- M include/osmocom/core/socket.h M src/socket.c 2 files changed, 62 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/50/27050/1 diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h index 6d11e6f..fffc25c 100644 --- a/include/osmocom/core/socket.h +++ b/include/osmocom/core/socket.h @@ -127,6 +127,9 @@ int osmo_sockaddr_cmp(const struct osmo_sockaddr *a, const struct osmo_sockaddr *b); +int osmo_sockaddr_to_octets(uint8_t *dst, size_t dst_maxlen, const struct osmo_sockaddr *os); +int osmo_sockaddr_from_octets(struct osmo_sockaddr *os, const void *src, size_t src_len); + const char *osmo_sockaddr_to_str(const struct osmo_sockaddr *sockaddr); char *osmo_sockaddr_to_str_buf(char *buf, size_t buf_len, const struct osmo_sockaddr *sockaddr); diff --git a/src/socket.c b/src/socket.c index 882ff02..1c75443 100644 --- a/src/socket.c +++ b/src/socket.c @@ -1733,6 +1733,65 @@ return rc; } +/*! Copy the addr part, the IP address octets in network byte order, to a buffer. + * Useful for encoding network protocols. + * \param[out] dst Write octets to this buffer. + * \param[in] dst_maxlen Space available in buffer. + * \param[in] os Sockaddr to copy IP of. + * \return nr of octets written on success, negative on error. + */ +int osmo_sockaddr_to_octets(uint8_t *dst, size_t dst_maxlen, const struct osmo_sockaddr *os) +{ + const void *addr; + size_t l; + switch (os->u.sin.sin_family) { + case AF_INET: + addr = &os->u.sin.sin_addr; + l = sizeof(os->u.sin.sin_addr); + break; + case AF_INET6: + addr = &os->u.sin6.sin6_addr; + l = sizeof(os->u.sin6.sin6_addr); + break; + default: + return -ENOTSUP; + } + if (dst_maxlen < l) + return -ENOSPC; + memcpy(dst, addr, l); + return l; +} + +/*! Copy the addr part, the IP address octets in network byte order, from a buffer. + * Useful for decoding network protocols. + * \param[out] os Write IP address to this sockaddr. + * \param[in] src Source buffer to read IP address octets from. + * \param[in] src_len Number of octets to copy. + * \return number of octets read on success, negative on error. + */ +int osmo_sockaddr_from_octets(struct osmo_sockaddr *os, const void *src, size_t src_len) +{ + void *addr; + size_t l; + *os = (struct osmo_sockaddr){0}; + switch (src_len) { + case sizeof(os->u.sin.sin_addr): + os->u.sin.sin_family = AF_INET; + addr = &os->u.sin.sin_addr; + l = sizeof(os->u.sin.sin_addr); + break; + case sizeof(os->u.sin6.sin6_addr): + os->u.sin6.sin6_family = AF_INET6; + addr = &os->u.sin6.sin6_addr; + l = sizeof(os->u.sin6.sin6_addr); + break; + default: + return -ENOTSUP; + } + memcpy(addr, src, l); + return l; +} + /*! Compare two osmo_sockaddr. * \param[in] a * \param[in] b -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27050 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie9e33bfac525c59c30714663d2bfcc62ec9eeb81 Gerrit-Change-Number: 27050 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 9636
  • 9637
  • 9638
  • 9639
  • 9640
  • 9641
  • 9642
  • ...
  • 9721
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.