From 1646d9b827fe31416fda8cf0340317cf6b5f6fb3 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 1 May 2019 22:58:09 +0100 Subject: 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 --- include/osmocom/sccp/sccp_types.h | 54 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) (limited to 'include') 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 */ -- cgit v1.2.3