summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-04-09 15:05:50 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2019-04-09 15:14:18 +0700
commitd08e9866a5c3da6edda574bbe6d277047d10fded (patch)
treefe1bdf9afb5ae511841d92a28d9f20abfc519c08
parent0e8df1c7e48bcae2285c7c138bd50f932049bd24 (diff)
gsm_03_40.h: define max SM-TP-UDL (User-Data-Length) values
As per 3GPP TS 03.40, section 9.2.3.16 "TP-User-Data-Length (TP-UDL)" field may contain up to 140 octets (or 140 * 8 / 7 = 160 septets). Change-Id: I54f88d2908ac47228813fb8c049f4264e5145241
-rw-r--r--include/osmocom/gsm/protocol/gsm_03_40.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/osmocom/gsm/protocol/gsm_03_40.h b/include/osmocom/gsm/protocol/gsm_03_40.h
index a65203f9..33a5c598 100644
--- a/include/osmocom/gsm/protocol/gsm_03_40.h
+++ b/include/osmocom/gsm/protocol/gsm_03_40.h
@@ -3,6 +3,11 @@
#pragma once
+/* SM-TP-UD (User-Data) field may contain up to 140 octets
+ * (or 140 * 8 / 7 = 160 septets). See section 9.2.3.24. */
+#define GSM340_UDL_OCT_MAX 140 /*!< Maximum TP-UD length (in octets) for 7-bit encoding */
+#define GSM340_UDL_SPT_MAX 160 /*!< Maximum TP-UD length (in seplets) for 8-bit and UCS-2 encoding */
+
/**
* 9.1.2.5 Type Of Number
*/