pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39689?usp=email )
Change subject: sccp: Apply SLS on locally-originated transmitted Connection-Oriented messages
......................................................................
sccp: Apply SLS on locally-originated transmitted Connection-Oriented messages
Change-Id: I1956acf631867b12b647d14c10057ded20d7fa2f
---
M src/sccp_scoc.c
1 file changed, 34 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/89/39689/1
diff --git a/src/sccp_scoc.c b/src/sccp_scoc.c
index c11dddf..8222bde 100644
--- a/src/sccp_scoc.c
+++ b/src/sccp_scoc.c
@@ -102,6 +102,11 @@
uint32_t sccp_class;
uint32_t release_cause; /* WAIT_CONN_CONF */
+ /* SLS to be used to transmit all Connection-oriented messages
+ * (ITU-T Q.714 1.1.2.3 Protocol class 2).
+ * SLS is 4 bits, as described in ITU Q.704 Figure 3 */
+ uint8_t tx_co_mtp_sls;
+
struct msgb *opt_data_cache;
/* incoming (true) or outgoing (false) */
@@ -450,6 +455,26 @@
#define INIT_TIMER(x, fn, priv) do { (x)->cb = fn; (x)->data = priv; } while (0)
+/* Generate an SLS to be used for Connection-oriented messages on this SCCP connection.
+ * SLS is 4 bits, as described in ITU Q.704 Figure 3.
+ * ITU-T Q.714 1.1.2.3 Protocol class 2:
+ * "Messages belonging to a given signalling connection shall contain the same
+ * value of the SLS field to ensure sequencing as described in 1.1.2.2"
+ */
+static uint8_t sccp_conn_gen_tx_co_mtp_sls(const struct sccp_connection *conn)
+{
+ /* Implementation: Derive the SLS from conn->conn_id. */
+ const uint32_t id = conn->conn_id;
+ uint8_t sls;
+
+ /* First shrink it to 1 byte: */
+ sls = ((id >> (3*8)) ^ (id >> (2*8)) ^ (id >> (1*8)) ^ (id)) & 0xff;
+ /* Now shrink it 8 -> 4 bits: */
+ sls = ((sls >> 4) ^ sls) & 0x0f;
+
+ return sls;
+}
+
/* allocate + init a SCCP Connection with given ID */
static struct sccp_connection *conn_create_id(struct osmo_sccp_user *user, uint32_t conn_id)
{
@@ -472,6 +497,8 @@
INIT_TIMER(&conn->t_int, int_tmr_cb, conn);
INIT_TIMER(&conn->t_rep_rel, rep_rel_tmr_cb, conn);
+ conn->tx_co_mtp_sls = sccp_conn_gen_tx_co_mtp_sls(conn);
+
/* this might change at runtime, as it is not a constant :/ */
sccp_scoc_fsm.log_subsys = DLSCCP;
@@ -715,6 +742,13 @@
if (!xua)
return NULL;
+ /* amend this with point code information; Many CO msgs
+ * includes neither called nor calling party address! */
+ xua->mtp.dpc = conn->remote_pc;
+
+ /* Apply SLS calculated for the connection (ITU-T Q.714 1.1.2.3). */
+ xua->mtp.sls = conn->tx_co_mtp_sls;
+
switch (msg_type) {
case SUA_CO_CORE: /* Connect Request == SCCP CR */
xua->hdr = XUA_HDR(SUA_MSGC_CO, SUA_CO_CORE);
@@ -835,9 +869,6 @@
if (!xua)
return -ENOMEM;
- /* amend this with point code information; Many CO msgs
- * includes neither called nor calling party address! */
- xua->mtp.dpc = conn->remote_pc;
sccp_scrc_rx_scoc_conn_msg(conn->inst, xua);
xua_msg_free(xua);
return 0;
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39689?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I1956acf631867b12b647d14c10057ded20d7fa2f
Gerrit-Change-Number: 39689
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Attention is currently required from: dexter.
fixeria has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/39670?usp=email )
Change subject: filesystem: do not decode short TransRecEF records
......................................................................
Patch Set 3: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/39670?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: Ib1dc4d7ce306f1f0b080bb4b6abc36e72431d3fa
Gerrit-Change-Number: 39670
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 04 Mar 2025 18:28:05 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: laforge.
falconia has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/39669?usp=email )
Change subject: trau_frame encode8_hr: simplify setting of C5 for odd parity
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> it will bite us in the butt if we ever want to change anything about this function, and the strange assumption no longer holds true.
I am afraid I don't follow. Suppose we decide that no sane user application is going to set only C4 (`fr->c_bits[3]`) while leaving the other 4 C-bits in that group uninitialized/garbage, and we change the function to always use all of `fr->c_bits[]`, like we already do for OSMO_TRAU8_DATA. (In fact, I have a patch that does just that - would you like me to submit it as a merge candidate?) In that case, the local function for computing odd parity *still* goes away just like with the present patch - so I don't see where the "bite in the butt" would happen.
But I have no particular attachment to the present patch. I produced it because it seemed like a sensible code simplification/clean-up, but it does not change any functionality or behavior, so if you (and/or other senior maintainers) don't like it, then fine, no big deal.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/39669?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I30c7dfdaaadd0fd4cb084cf02c66c0f19a40ae42
Gerrit-Change-Number: 39669
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Tue, 04 Mar 2025 17:53:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/39686?usp=email )
Change subject: Drop function declaration for non longer existing function
......................................................................
Drop function declaration for non longer existing function
Drop use of deprecated vty is_config_node() cb
This callback was drepecated and is not ever called since
libosmocore.git 70ce871532ab21955e0955d7e230eae65438f047 (release 1.3.0).
See also libosmocore.git d31de237582f6fe3315d61bb9a488d4cda92654e.
Change-Id: I999ac55fca21cf942876bc19c19f0eda2754501b
Fixes: 1ec29c7324e69a6f294704fb8eeb093a33085aba
---
M src/pcu_vty.h
1 file changed, 0 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/86/39686/1
diff --git a/src/pcu_vty.h b/src/pcu_vty.h
index 45d3227..8178e11 100644
--- a/src/pcu_vty.h
+++ b/src/pcu_vty.h
@@ -9,9 +9,6 @@
PCU_NODE = _LAST_OSMOVTY_NODE + 1,
};
-int pcu_vty_go_parent(struct vty *vty);
-int pcu_vty_is_config_node(struct vty *vty, int node);
-
int pcu_vty_init();
extern struct vty_app_info pcu_vty_info;
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/39686?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I999ac55fca21cf942876bc19c19f0eda2754501b
Gerrit-Change-Number: 39686
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>