This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Holger Freyther gerrit-no-reply at lists.osmocom.orgHolger Freyther has submitted this change and it was merged. ( https://gerrit.osmocom.org/13839 )
Change subject: udts/xudts: Attempt to implement unitdata service parsing
......................................................................
udts/xudts: Attempt to implement unitdata service parsing
Use the new offset based parsing to extract GT and data from the
UDTS/XUDTS message as well. Test vectors are missing right now.
Change-Id: Id0a3a291d8bad3f8c9621e6c97d4ea0b8bbe6035
---
M src/sccp.c
1 file changed, 30 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
Harald Welte: Looks good to me, approved
diff --git a/src/sccp.c b/src/sccp.c
index c14e850..cbc63b1 100644
--- a/src/sccp.c
+++ b/src/sccp.c
@@ -469,6 +469,18 @@
return _sccp_parse_unitdata(msgb, result, &offsets);
}
+int _sccp_parse_udts(struct msgb *msgb, struct sccp_parse_result *result)
+{
+ static const struct udt_offsets offsets = {
+ .header_size = sizeof(struct sccp_data_unitdata_service),
+ .called_offset = offsetof(struct sccp_data_unitdata_service, variable_called),
+ .calling_offset = offsetof(struct sccp_data_unitdata_service, variable_calling),
+ .data_offset = offsetof(struct sccp_data_unitdata_service, variable_data),
+ };
+
+ return _sccp_parse_unitdata(msgb, result, &offsets);
+}
+
static int _sccp_parse_xudt(struct msgb *msgb, struct sccp_parse_result *result)
{
static const struct udt_offsets offsets = {
@@ -481,6 +493,18 @@
return _sccp_parse_unitdata(msgb, result, &offsets);
}
+static int _sccp_parse_xudts(struct msgb *msgb, struct sccp_parse_result *result)
+{
+ static const struct udt_offsets offsets = {
+ .header_size = sizeof(struct sccp_data_ext_unitdata_service),
+ .called_offset = offsetof(struct sccp_data_ext_unitdata_service, variable_called),
+ .calling_offset = offsetof(struct sccp_data_ext_unitdata_service, variable_calling),
+ .data_offset = offsetof(struct sccp_data_ext_unitdata_service, variable_data),
+ };
+
+ return _sccp_parse_unitdata(msgb, result, &offsets);
+}
+
static int _sccp_parse_it(struct msgb *msgb, struct sccp_parse_result *result)
{
static const uint32_t header_size = sizeof(struct sccp_data_it);
@@ -1490,9 +1514,15 @@
case SCCP_MSG_TYPE_UDT:
return _sccp_parse_udt(msg, result);
break;
+ case SCCP_MSG_TYPE_UDTS:
+ return _sccp_parse_udts(msg, result);
+ break;
case SCCP_MSG_TYPE_XUDT:
return _sccp_parse_xudt(msg, result);
break;
+ case SCCP_MSG_TYPE_XUDTS:
+ return _sccp_parse_xudts(msg, result);
+ break;
case SCCP_MSG_TYPE_IT:
return _sccp_parse_it(msg, result);
break;
--
To view, visit https://gerrit.osmocom.org/13839
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Id0a3a291d8bad3f8c9621e6c97d4ea0b8bbe6035
Gerrit-Change-Number: 13839
Gerrit-PatchSet: 1
Gerrit-Owner: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190507/b41170ea/attachment.htm>