neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/32677 )
Change subject: add osmo_sccp_set_max_optional_data()
......................................................................
add osmo_sccp_set_max_optional_data()
So far, the optional data limit can only be modified via cs7 VTY,
because struct osmo_sccp_instance is private. Provide public API to set
this limit from C.
Change-Id: If3d22a0f65a7ed0be043027652402b32c356e322
---
M include/osmocom/sigtran/osmo_ss7.h
M src/sccp_user.c
M src/sccp_vty.c
3 files changed, 35 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/77/32677/1
diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h
index cd1779c..e025709 100644
--- a/include/osmocom/sigtran/osmo_ss7.h
+++ b/include/osmocom/sigtran/osmo_ss7.h
@@ -565,6 +565,8 @@
int local_port, int remote_port,
const char *remote_ip);
+void osmo_sccp_set_max_optional_data(struct osmo_sccp_instance *inst, int val);
+
enum osmo_ss7_as_traffic_mode osmo_ss7_tmode_from_xua(uint32_t in);
int osmo_ss7_tmode_to_xua(enum osmo_ss7_as_traffic_mode tmod);
diff --git a/src/sccp_user.c b/src/sccp_user.c
index 34c663d..a04a1c3 100644
--- a/src/sccp_user.c
+++ b/src/sccp_user.c
@@ -827,6 +827,24 @@
return NULL;
}
+/*! Adjust the upper bound for the optional data length (the payload) for CR, CC, CREF and RLSD messages.
+ * For any Optional Data part larger than this value in octets, send CR, CC, CREF and RLSD messages without any payload,
+ * and send the data payload in a separate Data Form 1 message. ITU-T Q.713 sections 4.2 thru 4.5 define a limit of 130
+ * bytes for the 'Data' parameter. This limit can be adjusted here. May be useful for interop with nonstandard SCCP
+ * peers.
+ * \param[in] sccp SCCP instance to reconfigure.
+ * \param[in] val Number of bytes to set as upper bound for the optional data length, or pass a negative value to set
+ * the standard value of SCCP_MAX_OPTIONAL_DATA == 130, which conforms to ITU-T Q.713.
+ */
+void osmo_sccp_set_max_optional_data(struct osmo_sccp_instance *inst, int val)
+{
+ if (!inst)
+ return;
+ if (val < 0)
+ val = SCCP_MAX_OPTIONAL_DATA;
+ inst->max_optional_data = val;
+}
+
/*! \brief get the SS7 instance that is related to the given SCCP instance
* \param[in] sccp SCCP instance
* \returns SS7 instance; NULL if sccp was NULL */
diff --git a/src/sccp_vty.c b/src/sccp_vty.c
index 90fb914..dda3ff0 100644
--- a/src/sccp_vty.c
+++ b/src/sccp_vty.c
@@ -183,7 +183,7 @@
int val;
if (!strcmp(argv[0], "standard"))
- val = SCCP_MAX_OPTIONAL_DATA;
+ val = -1;
else
val = atoi(argv[0]);
@@ -193,7 +193,7 @@
return CMD_WARNING;
}
- ss7->sccp->max_optional_data = val;
+ osmo_sccp_set_max_optional_data(ss7->sccp, val);
return CMD_SUCCESS;
}
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/32677
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: If3d22a0f65a7ed0be043027652402b32c356e322
Gerrit-Change-Number: 32677
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: lynxis lazus.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/32512 )
Change subject: Add support for multiple APN profiles for subscriber data
......................................................................
Patch Set 5:
(1 comment)
File src/hlr_vty.c:
https://gerrit.osmocom.org/c/osmo-hlr/+/32512/comment/d3b2cbaf_e9c4c19e
PS5, Line 133: Define a PDP profile set.\n"
: "Unique identifier for this PDP profile set.\n")
I think the description strings don't fit the default profile enabled flag, but they were copied from other commands?
--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/32512
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I540132ee5dcfd09f4816e02e702927e1074ca50f
Gerrit-Change-Number: 32512
Gerrit-PatchSet: 5
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Wed, 10 May 2023 00:03:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Hoernchen.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/27625 )
Change subject: new bsc-nat: msc tests
......................................................................
Patch Set 2:
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/docker-playground/+/27625/comment/0486884c_db9…
PS2, Line 7: new bsc-n
commit log is brief/non-existant. No reference to any OS# or SYS# that provides further context.
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/27625
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ifdb9956a8bdde8aa3f9f62bfcfc035baab01c934
Gerrit-Change-Number: 27625
Gerrit-PatchSet: 2
Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: msuraev <msuraev(a)sysmocom.de>
Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 09 May 2023 23:57:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment