From d08e9866a5c3da6edda574bbe6d277047d10fded Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Tue, 9 Apr 2019 15:05:50 +0700 Subject: 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 --- include/osmocom/gsm/protocol/gsm_03_40.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/osmocom/gsm/protocol') 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 */ -- cgit v1.2.3