Attention is currently required from: fixeria, laforge.
Hello Jenkins Builder, fixeria, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/39199?usp=email
to look at the new patch set (#9).
The following approvals got outdated and were removed:
Code-Review+1 by fixeria, Verified+1 by Jenkins Builder
Change subject: global_platform: add new command "install_cap"
......................................................................
global_platform: add new command "install_cap"
Installing JAVA-card applets from a CAP file is a multi step process, which is
difficult when done manually. Fortunately it is easy to automate the process,
so let's add a dedicated command for that.
Change-Id: I6cbd37f0fad5579b20e83c27349bd5acc129e6d0
Related: OS#6679
---
A docs/cap-tutorial.rst
M docs/shell.rst
M pySim/global_platform/__init__.py
A pySim/global_platform/install_param.py
M tests/unittests/test_globalplatform.py
5 files changed, 244 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/99/39199/9
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/39199?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I6cbd37f0fad5579b20e83c27349bd5acc129e6d0
Gerrit-Change-Number: 39199
Gerrit-PatchSet: 9
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: fixeria, laforge.
dexter has uploaded a new patch set (#9) to the change originally created by laforge. ( https://gerrit.osmocom.org/c/pysim/+/37454?usp=email )
The following approvals got outdated and were removed:
Code-Review+1 by fixeria, Verified+1 by Jenkins Builder
Change subject: global_platform: LOAD and INSTALL [for load] support
......................................................................
global_platform: LOAD and INSTALL [for load] support
In this patch we add the commands "install_for_load" and "load".
Depends: pyosmocom.git I86df064fa41db85923eeb0d83cc399504fdd4488
Change-Id: I924aaeecbb3a72bdb65eefbff6135e4e9570579e
Related: OS#6679
---
M docs/shell.rst
M pySim/global_platform/__init__.py
M requirements.txt
M setup.py
4 files changed, 80 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/54/37454/9
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37454?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I924aaeecbb3a72bdb65eefbff6135e4e9570579e
Gerrit-Change-Number: 37454
Gerrit-PatchSet: 9
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: dexter <pmaier(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: fixeria, laforge.
dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/39199?usp=email )
Change subject: global_platform: add new command "install_cap"
......................................................................
Patch Set 9:
(2 comments)
File docs/cap-tutorial.rst:
https://gerrit.osmocom.org/c/pysim/+/39199/comment/cec72e45_141dbe9f?usp=em… :
PS7, Line 5: support
> The phrasing is still weird here. You write "cards [do] support ... support" (support twice). […]
Done
File pySim/global_platform/__init__.py:
https://gerrit.osmocom.org/c/pysim/+/39199/comment/ca20f1af_4da57c07?usp=em… :
PS8, Line 865: add_mutually_exclusive_group()
> Do we require at least one argument to be supplied? Or not? (Asking to be sure)
Yes, install parameters must be always supplied.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/39199?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I6cbd37f0fad5579b20e83c27349bd5acc129e6d0
Gerrit-Change-Number: 39199
Gerrit-PatchSet: 9
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 22 Jan 2025 15:47:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39395?usp=email )
Change subject: ipa: Split msgb generation into its own helper function
......................................................................
ipa: Split msgb generation into its own helper function
This allows having a clearer picture when comparing against other
protocol stacks like M3UA and SUA, since both have a sua_to_msg() and
m3ua_to_msg() functions (which in turn call xua_to_msg()).
This way ipa_tx_xua_as() also becomes much more similar to
m3ua_tx_xua_as() and sua_tx_xua_as().
While at it, also add extra logging to m3ua/sua_tx_xua_as() to also
provide AS context logging information when encoding fail.
Change-Id: Ic0a405ab4d1811efea137167dcb08c9308a4d7e7
---
M src/ipa.c
M src/m3ua.c
M src/sua.c
3 files changed, 29 insertions(+), 15 deletions(-)
Approvals:
pespin: Looks good to me, approved
osmith: Looks good to me, but someone else must approve
fixeria: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/src/ipa.c b/src/ipa.c
index d62d710..6ca5b50 100644
--- a/src/ipa.c
+++ b/src/ipa.c
@@ -52,12 +52,7 @@
#include "ss7_internal.h"
#include "xua_asp_fsm.h"
-
-/*! \brief Send a given xUA message via a given IPA "Application Server"
- * \param[in] as Application Server through which to send \a xua
- * \param[in] xua xUA message to be sent
- * \return 0 on success; negative on error */
-int ipa_tx_xua_as(struct osmo_ss7_as *as, struct xua_msg *xua)
+static struct msgb *ipa_to_msg(struct xua_msg *xua)
{
struct xua_msg_part *data_ie;
struct m3ua_data_hdr *data_hdr;
@@ -66,18 +61,16 @@
const uint8_t *src;
uint8_t *dst;
- OSMO_ASSERT(as->cfg.proto == OSMO_SS7_ASP_PROT_IPA);
-
/* we're actually only interested in the data part */
data_ie = xua_msg_find_tag(xua, M3UA_IEI_PROT_DATA);
if (!data_ie || data_ie->len < sizeof(struct m3ua_data_hdr))
- return -1;
+ return NULL;
data_hdr = (struct m3ua_data_hdr *) data_ie->dat;
if (data_hdr->si != MTP_SI_SCCP) {
- LOGPAS(as, DLSS7, LOGL_ERROR, "Cannot transmit non-SCCP SI (%u) to IPA peer\n",
- data_hdr->si);
- return -1;
+ LOGP(DLSS7, LOGL_ERROR, "Cannot transmit non-SCCP SI (%u) to IPA peer\n",
+ data_hdr->si);
+ return NULL;
}
/* and even the data part still has the header prepended */
@@ -87,7 +80,7 @@
/* sufficient headroom for osmo_ipa_msg_push_header() */
msg = ipa_msg_alloc(16);
if (!msg)
- return -1;
+ return NULL;
dst = msgb_put(msg, src_len);
memcpy(dst, src, src_len);
@@ -95,6 +88,23 @@
/* TODO: if we ever need something beyond SCCP, we can use the
* M3UA SIO to determine the protocol */
osmo_ipa_msg_push_header(msg, IPAC_PROTO_SCCP);
+ return msg;
+}
+
+/*! \brief Send a given xUA message via a given IPA "Application Server"
+ * \param[in] as Application Server through which to send \a xua
+ * \param[in] xua xUA message to be sent
+ * \return 0 on success; negative on error */
+int ipa_tx_xua_as(struct osmo_ss7_as *as, struct xua_msg *xua)
+{
+ struct msgb *msg;
+ OSMO_ASSERT(as->cfg.proto == OSMO_SS7_ASP_PROT_IPA);
+
+ msg = ipa_to_msg(xua);
+ if (!msg) {
+ LOGPAS(as, DLSS7, LOGL_ERROR, "Error encoding IPA Msg\n");
+ return -1;
+ }
return xua_as_transmit_msg(as, msg);
}
diff --git a/src/m3ua.c b/src/m3ua.c
index be1f167..5f94674 100644
--- a/src/m3ua.c
+++ b/src/m3ua.c
@@ -522,8 +522,10 @@
xua_msg_add_u32(xua, M3UA_IEI_ROUTE_CTX, as->cfg.routing_key.context);
msg = m3ua_to_msg(xua);
- if (!msg)
+ if (!msg) {
+ LOGPAS(as, DLM3UA, LOGL_ERROR, "Error encoding M3UA Msg\n");
return -1;
+ }
/* send the msg to the AS for transmission. The AS FSM might
* (depending on its state) enqueue it before transmission */
diff --git a/src/sua.c b/src/sua.c
index c7bde24..e81c471 100644
--- a/src/sua.c
+++ b/src/sua.c
@@ -317,8 +317,10 @@
xua_msg_add_u32(xua, SUA_IEI_ROUTE_CTX, as->cfg.routing_key.context);
msg = sua_to_msg(xua);
- if (!msg)
+ if (!msg) {
+ LOGPAS(as, DLSUA, LOGL_ERROR, "Error encoding SUA Msg\n");
return -1;
+ }
/* send the msg to the AS for transmission. The AS FSM might
* (depending on its state) enqueue it before transmission */
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39395?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: Ic0a405ab4d1811efea137167dcb08c9308a4d7e7
Gerrit-Change-Number: 39395
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: fixeria.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39395?usp=email )
Change subject: ipa: Split msgb generation into its own helper function
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39395?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: Ic0a405ab4d1811efea137167dcb08c9308a4d7e7
Gerrit-Change-Number: 39395
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 22 Jan 2025 15:01:49 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: fixeria, pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39395?usp=email )
Change subject: ipa: Split msgb generation into its own helper function
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
File src/ipa.c:
https://gerrit.osmocom.org/c/libosmo-sigtran/+/39395/comment/c7017733_68e7c… :
PS1, Line 102: OSMO_ASSERT(as->cfg.proto == OSMO_SS7_ASP_PROT_IPA);
> The order was sapped in sua_tx_xua_asp(), not in sua_tx_xua_as() hence why I got confused :D
Done
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39395?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: Ic0a405ab4d1811efea137167dcb08c9308a4d7e7
Gerrit-Change-Number: 39395
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 22 Jan 2025 14:56:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: osmith, pespin.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39395?usp=email )
Change subject: ipa: Split msgb generation into its own helper function
......................................................................
Patch Set 2:
(1 comment)
File src/ipa.c:
https://gerrit.osmocom.org/c/libosmo-sigtran/+/39395/comment/088c0ded_3c9f3… :
PS1, Line 102: OSMO_ASSERT(as->cfg.proto == OSMO_SS7_ASP_PROT_IPA);
> Ok I actually got confused and they were fine, I updated it as suggested plus added some extra loggi […]
The order was sapped in sua_tx_xua_asp(), not in sua_tx_xua_as() hence why I got confused :D
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39395?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: Ic0a405ab4d1811efea137167dcb08c9308a4d7e7
Gerrit-Change-Number: 39395
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 22 Jan 2025 13:14:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>