From 61ced83a700aa4426390c2c12326f00d72ec193e Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 30 Dec 2014 13:18:26 +0100 Subject: SMS-CB: Add #defines for maximum block/msg size and payload chars --- include/osmocom/gsm/protocol/gsm_03_41.h | 5 +++++ include/osmocom/gsm/protocol/gsm_04_12.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/include/osmocom/gsm/protocol/gsm_03_41.h b/include/osmocom/gsm/protocol/gsm_03_41.h index 816017c2..3fec9976 100644 --- a/include/osmocom/gsm/protocol/gsm_03_41.h +++ b/include/osmocom/gsm/protocol/gsm_03_41.h @@ -2,8 +2,13 @@ #include +#include + /* GSM TS 03.41 definitions also TS 23.041*/ +#define GSM341_MAX_PAYLOAD (GSM412_MSG_LEN-sizeof(struct gsm341_ms_message)) +#define GSM341_MAX_CHARS (GSM341_MAX_PAYLOAD*8/7) + /* Chapter 9.3.2 */ struct gsm341_ms_message { struct { diff --git a/include/osmocom/gsm/protocol/gsm_04_12.h b/include/osmocom/gsm/protocol/gsm_04_12.h index aa40648c..30d6e4fa 100644 --- a/include/osmocom/gsm/protocol/gsm_04_12.h +++ b/include/osmocom/gsm/protocol/gsm_04_12.h @@ -4,6 +4,9 @@ /* GSM TS 04.12 definitions for Short Message Service Cell Broadcast */ +#define GSM412_MSG_LEN 88 /* TS 04.12 Section 3.1 */ +#define GSM412_BLOCK_LEN 22 /* TS 04.12 Section 3.1 */ + #define GSM412_SEQ_FST_BLOCK 0x0 #define GSM412_SEQ_SND_BLOCK 0x1 #define GSM412_SEQ_TRD_BLOCK 0x2 -- cgit v1.2.3