summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2019-05-01 22:58:09 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2019-05-01 23:52:31 +0100
commit1646d9b827fe31416fda8cf0340317cf6b5f6fb3 (patch)
treeef24eff6bf4909c15b2df88697df0af9ede5fbb6 /include
parent21ff9ae4264de159784a59ce4421365007bde08d (diff)
xudt: Implement address and data extraction
The cellmgr-ng unfortunately looks at the data being sent and can't handle the presence of XUDT at all. Add the structure definition and refactor extraction code to work on offsets. Add a unit test. Change-Id: I45a7447cc1be432fff34849e0e35abc0410cf153
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/sccp/sccp_types.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/include/osmocom/sccp/sccp_types.h b/include/osmocom/sccp/sccp_types.h
index ab7f74f..18b54f4 100644
--- a/include/osmocom/sccp/sccp_types.h
+++ b/include/osmocom/sccp/sccp_types.h
@@ -422,6 +422,60 @@ struct sccp_data_unitdata_service {
uint8_t data[0];
} __attribute__((packed));
+/* Extended unitdata (XUDT) */
+struct sccp_data_ext_unitdata {
+ /* mandatory */
+ uint8_t type;
+ uint8_t proto_class;
+ uint8_t hop_counter;
+
+ /* variable */
+ uint8_t variable_called;
+ uint8_t variable_calling;
+ uint8_t variable_data;
+
+#if VARIABLE
+ called party address
+ calling party address
+ data
+#endif
+
+#if OPTIONAL
+ segmentation
+ importance
+#endif
+
+ uint8_t data[0];
+
+} __attribute__((packed));
+
+
+/* Extended unitdata service (XUDTS) */
+struct sccp_data_ext_unitdata_service {
+ /* mandantory */
+ uint8_t type;
+ uint8_t return_cause;
+ uint8_t hop_counter;
+
+
+ /* variable */
+ uint8_t variable_called;
+ uint8_t variable_calling;
+ uint8_t variable_data;
+
+#if VARIABLE
+ called party address
+ calling party address
+ data
+#endif
+
+#if OPTIONAL
+ segmentation
+ importancd
+#endif
+
+ uint8_t data[0];
+} __attribute__((packed));
struct sccp_data_it {
/* mandatory */