neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/python/pyosmocom/+/39600?usp=email )
Change subject: utils: add unrpad()
......................................................................
utils: add unrpad()
In pysim.esim.saip, some encoding steps use rpad(); here is the
counterpart, that will allow to also decode values back.
Related: SYS#6768
Change-Id: I48c23390926f8c9412624edb4481e7f4cd3f4b46
---
M src/osmocom/utils.py
1 file changed, 14 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/python/pyosmocom refs/changes/00/39600/1
diff --git a/src/osmocom/utils.py b/src/osmocom/utils.py
index 5947453..e7053c1 100644
--- a/src/osmocom/utils.py
+++ b/src/osmocom/utils.py
@@ -121,6 +121,20 @@
return s + c * (l - len(s))
+def unrpad(s: str, c='f') -> str:
+ """unpad string on the right side -- reverse of rpad().
+ Args:
+ s : string to pad
+ c : padding character
+ Returns:
+ String 's' with all rightmost c stripped.
+ """
+ end = len(s)
+ while end > 0 and s[end - 1] == c:
+ end -= 1
+ return s[:end]
+
+
def lpad(s: str, l: int, c='f') -> str:
"""pad string on the left side.
Args:
--
To view, visit https://gerrit.osmocom.org/c/python/pyosmocom/+/39600?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: python/pyosmocom
Gerrit-Branch: master
Gerrit-Change-Id: I48c23390926f8c9412624edb4481e7f4cd3f4b46
Gerrit-Change-Number: 39600
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Attention is currently required from: daniel, laforge, neels, pespin.
lynxis lazus has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-iuh/+/38946?usp=email )
Change subject: iu_client: add ranap_iu_page_cs2/ranap_iu_page_ps2
......................................................................
Patch Set 18:
(1 comment)
File src/iu_client.c:
https://gerrit.osmocom.org/c/osmo-iuh/+/38946/comment/e9fa7fe3_d99405ae?usp… :
PS13, Line 914: int ranap_iu_page_ps2(const char *imsi, const uint32_t *ptmsi, const struct osmo_routing_area_id *rai)
> i'm not entirely sure of the actual reason why we're supposed to put api doc in the .c files. […]
I should start a discussion about it. Having it in the .h files also allows IDE to parse it.
--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/38946?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I1f07e96642737160d387de3e4c3f71d288d356dd
Gerrit-Change-Number: 38946
Gerrit-PatchSet: 18
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 20 Feb 2025 22:47:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: lynxis lazus <lynxis(a)fe80.eu>
Attention is currently required from: lynxis lazus.
Hello Jenkins Builder, laforge, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-iuh/+/38947?usp=email
to look at the new patch set (#18).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
The change is no longer submittable: Verified is unsatisfied now.
Change subject: iu_client: add a new event NEW_AREA
......................................................................
iu_client: add a new event NEW_AREA
When the IU client learns a new LAC/RAC or
the LAC/RAC has moved from one RNC to another RNC,
inform the user via an event.
Allows the SGSN to track RACs which uses Iu.
Change-Id: I8b1b8c58bf72b00e2705ca87a89a91481bac3470
---
M TODO-RELEASE
M include/osmocom/ranap/iu_client.h
M src/iu_client.c
3 files changed, 39 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/47/38947/18
--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/38947?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I8b1b8c58bf72b00e2705ca87a89a91481bac3470
Gerrit-Change-Number: 38947
Gerrit-PatchSet: 18
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Attention is currently required from: daniel, laforge, lynxis lazus, neels, pespin.
Hello Jenkins Builder, daniel, laforge, neels, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-iuh/+/38946?usp=email
to look at the new patch set (#18).
The following approvals got outdated and were removed:
Code-Review+1 by daniel, Code-Review+2 by neels, Verified+1 by Jenkins Builder
The change is no longer submittable: Code-Review and Verified are unsatisfied now.
Change subject: iu_client: add ranap_iu_page_cs2/ranap_iu_page_ps2
......................................................................
iu_client: add ranap_iu_page_cs2/ranap_iu_page_ps2
ranap_iu_page_cs2 and ranap_iu_page_ps2 are using the newer osmocom
osmo_location_area_id or osmo_routing_area_id which also contain
the PLMN.
Change-Id: I1f07e96642737160d387de3e4c3f71d288d356dd
---
M TODO-RELEASE
M include/osmocom/ranap/iu_client.h
M src/iu_client.c
3 files changed, 105 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/46/38946/18
--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/38946?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I1f07e96642737160d387de3e4c3f71d288d356dd
Gerrit-Change-Number: 38946
Gerrit-PatchSet: 18
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Attention is currently required from: laforge, lynxis lazus, pespin.
neels has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-iuh/+/38946?usp=email )
Change subject: iu_client: add ranap_iu_page_cs2/ranap_iu_page_ps2
......................................................................
Patch Set 17:
(1 comment)
File src/iu_client.c:
https://gerrit.osmocom.org/c/osmo-iuh/+/38946/comment/4f5c643b_5bd7615c?usp… :
PS13, Line 883: if (!osmo_lai_cmp(&entry->rai.lac, lai)) {
> nevermind if you don't care, just sharing the thought: […]
ehm looks like gerrit messed up the indenting. i mean just the 'continue;' part, not the weird indenting.
--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/38946?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I1f07e96642737160d387de3e4c3f71d288d356dd
Gerrit-Change-Number: 38946
Gerrit-PatchSet: 17
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Thu, 20 Feb 2025 21:23:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: lynxis lazus <lynxis(a)fe80.eu>
Attention is currently required from: laforge, lynxis lazus, pespin.
neels has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-iuh/+/38946?usp=email )
Change subject: iu_client: add ranap_iu_page_cs2/ranap_iu_page_ps2
......................................................................
Patch Set 17: Code-Review+2
(6 comments)
File src/iu_client.c:
https://gerrit.osmocom.org/c/osmo-iuh/+/38946/comment/52c523b0_b47d8771?usp… :
PS13, Line 842: LOGL_ERROR
> yes, but I think error is a little bit harsh, only when a client isn't reachable. […]
(the idea was to separate orthogonal changes into separate patches)
https://gerrit.osmocom.org/c/osmo-iuh/+/38946/comment/b4322398_bb340316?usp… :
PS13, Line 879: exact
> I think this is possible for hnbs and not forbidden.
Done
https://gerrit.osmocom.org/c/osmo-iuh/+/38946/comment/ba3cbf23_0f893bfb?usp… :
PS13, Line 883: if (!osmo_lai_cmp(&entry->rai.lac, lai)) {
> What do you mean? […]
nevermind if you don't care, just sharing the thought:
this could use the "early exit" or "return early" coding style, that reduces indented blocks.
here it would be
llist_for_each_entry(rnc, &rnc_list, entry) {
llist_for_each_entry(entry, &rnc->lac_rac_list, entry) {
if (osmo_lai_cmp(&entry->rai.lac, lai))
continue;
rc = iu_tx_paging_cmd(&rnc->sccp_addr, imsi, tmsi, false, 0);
if (rc > 0) {
LOGPIU(LOGL_ERROR, "IuCS: Failed to tx Paging RNC %s for LAC %s for IMSI %s / TMSI %08x",
osmo_rnc_id_name(&rnc->rnc_id),
osmo_lai_name(lai), imsi, tmsi ? *tmsi : GSM_RESERVED_TMSI);
}
paged++;
break;
}
}
https://gerrit.osmocom.org/c/osmo-iuh/+/38946/comment/91b196e8_d727dd66?usp… :
PS13, Line 893: }
> No, we need to tx a page request to a RNC at most once. […]
Done
https://gerrit.osmocom.org/c/osmo-iuh/+/38946/comment/d7eacace_ce84ab9f?usp… :
PS13, Line 914: int ranap_iu_page_ps2(const char *imsi, const uint32_t *ptmsi, const struct osmo_routing_area_id *rai)
> will add it to the header.
i'm not entirely sure of the actual reason why we're supposed to put api doc in the .c files.
i think it might have to do with licensing -- like the .h files are just the index while the .c file is protected by the license, including the docs?
In practice, i always thought the docs should go in the .h, but i also found that i really enjoy a .h file to be short: in a few seconds i can glance across the entire API of functions. The long docs are just one ctags jump away.
I think conformance with osmocom style would suggest to put the docs in the .c file.
but i won't block on it.
https://gerrit.osmocom.org/c/osmo-iuh/+/38946/comment/516ecd12_f6cb6e01?usp… :
PS13, Line 938: }
> break is fine. See above.
Done
--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/38946?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I1f07e96642737160d387de3e4c3f71d288d356dd
Gerrit-Change-Number: 38946
Gerrit-PatchSet: 17
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Thu, 20 Feb 2025 21:21:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: lynxis lazus <lynxis(a)fe80.eu>