aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlexander Chemeris <Alexander.Chemeris@gmail.com>2020-05-13 00:44:04 +0300
committerlaforge <laforge@osmocom.org>2020-05-17 07:32:32 +0000
commit22630e68279525fd9684c8016f7443a8aba1f2a5 (patch)
tree649151c3e1e0af09c6514d2509fea03c1dc1c7e5 /include
parentbfeeb1c86ce473ff3811513f02a307c969531c5f (diff)
gsm0808: Implement helper functions for CONFUSION BSSMAP message decoding.
Also add a test for an actual CONFUSION message parsing. Change-Id: If8afd2d096fb66c6c2f255a08fc1129de3d09cec
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/gsm/gsm0808.h3
-rw-r--r--include/osmocom/gsm/protocol/gsm_08_08.h13
2 files changed, 16 insertions, 0 deletions
diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h
index 5a33f605..34cec3ca 100644
--- a/include/osmocom/gsm/gsm0808.h
+++ b/include/osmocom/gsm/gsm0808.h
@@ -319,6 +319,9 @@ const char *gsm0808_cause_class_name(enum gsm0808_cause_class class);
* \returns Cause value */
enum gsm0808_cause gsm0808_get_cause(const struct tlv_parsed *tp);
+const char *gsm0808_diagnostics_octet_location_str(uint8_t pointer);
+const char *gsm0808_diagnostics_bit_location_str(uint8_t bit_pointer);
+
extern const struct value_string gsm0808_lcls_config_names[];
extern const struct value_string gsm0808_lcls_control_names[];
extern const struct value_string gsm0808_lcls_status_names[];
diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h b/include/osmocom/gsm/protocol/gsm_08_08.h
index d8a77733..1390f0e8 100644
--- a/include/osmocom/gsm/protocol/gsm_08_08.h
+++ b/include/osmocom/gsm/protocol/gsm_08_08.h
@@ -663,3 +663,16 @@ enum gsm0808_lcls_status {
GSM0808_LCLS_STS_LOCALLY_SWITCHED = 0x04,
GSM0808_LCLS_STS_NA = 0xFF
};
+
+/* 3GPP TS 48.008 3.2.2.32 Diagnostics */
+struct gsm0808_diagnostics {
+ uint8_t error_pointer_octet;
+#if OSMO_IS_LITTLE_ENDIAN
+ uint8_t error_pointer_bit_spare:4,
+ error_pointer_bit:4;
+#elif OSMO_IS_BIG_ENDIAN
+/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
+ uint8_t error_pointer_bit:4, error_pointer_bit_spare:4;
+#endif
+ uint8_t msg[0]; /*! received message which provoked the error */
+} __attribute__((packed));