diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-07-21 05:02:33 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-07-21 05:02:33 +0800 |
commit | 0d60aa2ad78948a75d7a35f5849450346c861643 (patch) | |
tree | 5ba70658d2c5cb7cf029ea71978af983381e5ea2 /include/osmocore | |
parent | f8a342c350c3045a78be2fde1dad44c0d91fa7bf (diff) |
gsm_04_12.h: Add beginning of structs for SMS CB
I am trying to understand the RSL and GSM 04.12
spec to implement CBS for OpenBSC...
Diffstat (limited to 'include/osmocore')
-rw-r--r-- | include/osmocore/protocol/Makefile.am | 3 | ||||
-rw-r--r-- | include/osmocore/protocol/gsm_04_12.h | 31 |
2 files changed, 33 insertions, 1 deletions
diff --git a/include/osmocore/protocol/Makefile.am b/include/osmocore/protocol/Makefile.am index 557950ec..5df9fe74 100644 --- a/include/osmocore/protocol/Makefile.am +++ b/include/osmocore/protocol/Makefile.am @@ -1,3 +1,4 @@ -osmocore_proto_HEADERS = gsm_04_08.h gsm_04_11.h gsm_04_80.h gsm_08_58.h gsm_12_21.h gsm_08_08.h +osmocore_proto_HEADERS = gsm_04_08.h gsm_04_11.h gsm_04_80.h gsm_08_58.h \ + gsm_12_21.h gsm_08_08.h gsm_04_12.h osmocore_protodir = $(includedir)/osmocore/protocol diff --git a/include/osmocore/protocol/gsm_04_12.h b/include/osmocore/protocol/gsm_04_12.h new file mode 100644 index 00000000..bd9e0884 --- /dev/null +++ b/include/osmocore/protocol/gsm_04_12.h @@ -0,0 +1,31 @@ +#ifndef PROTO_GSM_04_12_H +#define PROTO_GSM_04_12_H + +#include <stdint.h> + +/* GSM TS 04.12 definitions for Short Message Service Cell Broadcast */ + +#define GSM412_SEQ_FST_BLOCK 0x0 +#define GSM412_SEQ_SND_BLOCK 0x1 +#define GSM412_SEQ_TRD_BLOCK 0x2 +#define GSM412_SEQ_FTH_BLOCK 0x3 +#define GSM412_SEQ_FST_SCHED_BLOCK 0x8 +#define GSM413_SEQ_NULL_MSG 0xf + +struct gsm412_block_type { + uint8_t seq_nr : 4, + lb : 1, + lpd : 2, + spare : 1; +} __attribute__((packed)); + +struct gsm413_sched_msg { + uint8_t beg_slot_nr : 6, + type : 2; + uint8_t end_slot_nr : 6, + spare1 : 1, spare2: 1; + uint8_t cbsms_msg_map[6]; + uint8_t data[0]; +} __attribute__((packed)); + +#endif |