aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2014-12-30 13:18:26 +0100
committerHarald Welte <laforge@gnumonks.org>2014-12-30 13:18:26 +0100
commit61ced83a700aa4426390c2c12326f00d72ec193e (patch)
tree55018cbd56001e7519932237d0d60b2e09c86ac8 /include
parentf626123f83675af8ea1ffd5d578dc40f71270bef (diff)
SMS-CB: Add #defines for maximum block/msg size and payload chars
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/gsm/protocol/gsm_03_41.h5
-rw-r--r--include/osmocom/gsm/protocol/gsm_04_12.h3
2 files changed, 8 insertions, 0 deletions
diff --git a/include/osmocom/gsm/protocol/gsm_03_41.h b/include/osmocom/gsm/protocol/gsm_03_41.h
index 816017c..3fec997 100644
--- a/include/osmocom/gsm/protocol/gsm_03_41.h
+++ b/include/osmocom/gsm/protocol/gsm_03_41.h
@@ -2,8 +2,13 @@
#include <stdint.h>
+#include <osmocom/gsm/protocol/gsm_04_12.h>
+
/* 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 aa40648..30d6e4f 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