diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2010-11-28 15:31:20 +0100 |
---|---|---|
committer | Sylvain Munaut <tnt@246tNt.com> | 2010-11-28 15:31:20 +0100 |
commit | cef26cd2f529b574a880e39f0dec6d7996119cd3 (patch) | |
tree | 6998a9510231f12cb203ccdc07a138281bcdfcab /src/shared/libosmocore | |
parent | c2166dffaeb9949fcc1ec82dc263a35abf12601c (diff) | |
parent | ab1246e0b5ffa0ac8d7b8e8fbe7c51bc22c8e751 (diff) |
Merge commit 'ab1246e0b5ffa0ac8d7b8e8fbe7c51bc22c8e751'
Diffstat (limited to 'src/shared/libosmocore')
6 files changed, 63 insertions, 5 deletions
diff --git a/src/shared/libosmocore/include/osmocore/gsmtap.h b/src/shared/libosmocore/include/osmocore/gsmtap.h index dcd64bdf..3f384a4f 100644 --- a/src/shared/libosmocore/include/osmocore/gsmtap.h +++ b/src/shared/libosmocore/include/osmocore/gsmtap.h @@ -19,6 +19,7 @@ #define GSMTAP_TYPE_UM 0x01 #define GSMTAP_TYPE_ABIS 0x02 #define GSMTAP_TYPE_UM_BURST 0x03 /* raw burst bits */ +#define GSMTAP_TYPE_SIM 0x04 #define GSMTAP_BURST_UNKNOWN 0x00 #define GSMTAP_BURST_FCCH 0x01 diff --git a/src/shared/libosmocore/include/osmocore/protocol/Makefile.am b/src/shared/libosmocore/include/osmocore/protocol/Makefile.am index 5df9fe74..03a4849d 100644 --- a/src/shared/libosmocore/include/osmocore/protocol/Makefile.am +++ b/src/shared/libosmocore/include/osmocore/protocol/Makefile.am @@ -1,4 +1,6 @@ -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_proto_HEADERS = gsm_03_41.h \ + gsm_04_08.h gsm_04_11.h gsm_04_12.h gsm_04_80.h \ + gsm_08_08.h gsm_08_58.h \ + gsm_12_21.h osmocore_protodir = $(includedir)/osmocore/protocol diff --git a/src/shared/libosmocore/include/osmocore/protocol/gsm_03_41.h b/src/shared/libosmocore/include/osmocore/protocol/gsm_03_41.h new file mode 100644 index 00000000..250d6675 --- /dev/null +++ b/src/shared/libosmocore/include/osmocore/protocol/gsm_03_41.h @@ -0,0 +1,34 @@ +#ifndef PROTO_GSM_03_41_H +#define PROTO_GSM_03_41_H + +#include <stdint.h> + +/* GSM TS 03.41 definitions */ + +/* Chapter 9.3.2 */ +struct gsm341_ms_message { + struct { + uint8_t code_hi:6; + uint8_t gs:2; + uint8_t update:2; + uint8_t code_lo:6; + } serial; + uint16_t msg_id; + struct { + uint8_t language:4; + uint8_t group:4; + } dcs; + struct { + uint8_t total:4; + uint8_t current:4; + } page; + uint8_t data[0]; +} __attribute__((packed)); + +/* Section 9.3.2.1 - Geographical Scope */ +#define GSM341_GS_CELL_WIDE_IMMED 0 +#define GSM341_GS_PLMN_WIDE 1 +#define GSM341_GS_LA_WIDE 2 +#define GSM341_GS_CELL_WIDE 3 + +#endif /* PROTO_GSM_03_41_H */ diff --git a/src/shared/libosmocore/include/osmocore/protocol/gsm_04_12.h b/src/shared/libosmocore/include/osmocore/protocol/gsm_04_12.h index bd9e0884..9b1538a5 100644 --- a/src/shared/libosmocore/include/osmocore/protocol/gsm_04_12.h +++ b/src/shared/libosmocore/include/osmocore/protocol/gsm_04_12.h @@ -10,7 +10,7 @@ #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 +#define GSM412_SEQ_NULL_MSG 0xf struct gsm412_block_type { uint8_t seq_nr : 4, @@ -19,7 +19,7 @@ struct gsm412_block_type { spare : 1; } __attribute__((packed)); -struct gsm413_sched_msg { +struct gsm412_sched_msg { uint8_t beg_slot_nr : 6, type : 2; uint8_t end_slot_nr : 6, diff --git a/src/shared/libosmocore/include/osmocore/protocol/gsm_08_58.h b/src/shared/libosmocore/include/osmocore/protocol/gsm_08_58.h index 5fe332e0..74a4083b 100644 --- a/src/shared/libosmocore/include/osmocore/protocol/gsm_08_58.h +++ b/src/shared/libosmocore/include/osmocore/protocol/gsm_08_58.h @@ -441,6 +441,27 @@ struct rsl_ie_chan_ident { #define RSL_CHANNEED_TCH_F 0x02 #define RSL_CHANNEED_TCH_ForH 0x03 +/* Chapter 9.3.45 */ +struct rsl_ie_cb_cmd_type { + uint8_t last_block:2; + uint8_t spare:1; + uint8_t def_bcast:1; + uint8_t command:4; +} __attribute__ ((packed)); +/* ->command */ +#define RSL_CB_CMD_TYPE_NORMAL 0x00 +#define RSL_CB_CMD_TYPE_SCHEDULE 0x08 +#define RSL_CB_CMD_TYPE_DEFAULT 0x0e +#define RSL_CB_CMD_TYPE_NULL 0x0f +/* ->def_bcast */ +#define RSL_CB_CMD_DEFBCAST_NORMAL 0 +#define RSL_CB_CMD_DEFBCAST_NULL 1 +/* ->last_block */ +#define RSL_CB_CMD_LASTBLOCK_4 0 +#define RSL_CB_CMD_LASTBLOCK_1 1 +#define RSL_CB_CMD_LASTBLOCK_2 2 +#define RSL_CB_CMD_LASTBLOCK_3 3 + /* Chapter 3.3.2.3 Brocast control channel */ /* CCCH-CONF, NC is not combined */ #define RSL_BCCH_CCCH_CONF_1_NC 0x00 diff --git a/src/shared/libosmocore/src/utils.c b/src/shared/libosmocore/src/utils.c index 21558857..405039f6 100644 --- a/src/shared/libosmocore/src/utils.c +++ b/src/shared/libosmocore/src/utils.c @@ -43,7 +43,7 @@ char bcd2char(uint8_t bcd) return 'A' + (bcd - 0xa); } -/* only works for numbers in ascci */ +/* only works for numbers in ascii */ uint8_t char2bcd(char c) { return c - 0x30; |