Merge commit 'ab1246e0b5ffa0ac8d7b8e8fbe7c51bc22c8e751'
[osmocom-bb.git] / src / shared / libosmocore / include / osmocore / protocol / gsm_04_12.h
1 #ifndef PROTO_GSM_04_12_H
2 #define PROTO_GSM_04_12_H
3
4 #include <stdint.h>
5
6 /* GSM TS 04.12 definitions for Short Message Service Cell Broadcast */
7
8 #define GSM412_SEQ_FST_BLOCK            0x0
9 #define GSM412_SEQ_SND_BLOCK            0x1
10 #define GSM412_SEQ_TRD_BLOCK            0x2
11 #define GSM412_SEQ_FTH_BLOCK            0x3
12 #define GSM412_SEQ_FST_SCHED_BLOCK      0x8
13 #define GSM412_SEQ_NULL_MSG             0xf
14
15 struct gsm412_block_type {
16         uint8_t seq_nr : 4,
17                 lb : 1,
18                 lpd : 2,
19                 spare : 1;
20 } __attribute__((packed));
21
22 struct gsm412_sched_msg {
23         uint8_t beg_slot_nr : 6,
24                 type : 2;
25         uint8_t end_slot_nr : 6,
26                 spare1 : 1, spare2: 1;
27         uint8_t cbsms_msg_map[6];
28         uint8_t data[0];
29 } __attribute__((packed));
30
31 #endif