summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-05-24 15:01:53 +0200
committerHarald Welte <laforge@gnumonks.org>2011-05-24 15:01:53 +0200
commitb5503136fa234690d5493b19a8aee3a4ef74190d (patch)
tree7b960c1befcdb44bc8169ff499d5be276a0e9e8f /include
parent3036612d59a5c8d97b2086a5e7817613f45948ef (diff)
Import sytem information related definitions + code from openbsc
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/gsm/Makefile.am3
-rw-r--r--include/osmocom/gsm/protocol/gsm_04_08.h3
-rw-r--r--include/osmocom/gsm/sysinfo.h40
3 files changed, 45 insertions, 1 deletions
diff --git a/include/osmocom/gsm/Makefile.am b/include/osmocom/gsm/Makefile.am
index c3670ec7..547933ec 100644
--- a/include/osmocom/gsm/Makefile.am
+++ b/include/osmocom/gsm/Makefile.am
@@ -1,5 +1,6 @@
osmogsm_HEADERS = a5.h comp128.h gsm0808.h gsm48_ie.h mncc.h rxlev_stat.h \
- gsm0480.h gsm48.h gsm_utils.h rsl.h tlv.h abis_nm.h
+ gsm0480.h gsm48.h gsm_utils.h rsl.h tlv.h abis_nm.h \
+ sysinfo.h
SUBDIRS = protocol
diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h
index 3ad7dfdc..39470e78 100644
--- a/include/osmocom/gsm/protocol/gsm_04_08.h
+++ b/include/osmocom/gsm/protocol/gsm_04_08.h
@@ -1257,6 +1257,9 @@ struct gsm48_ra_id {
uint8_t rac; /* Routing Area Code */
} __attribute__ ((packed));
+#define GSM48_CELL_CHAN_DESC_SIZE 16
+#define GSM_MACBLOCK_LEN 23
+#define GSM_MACBLOCK_PADDING 0x2b
#endif /* PROTO_GSM_04_08_H */
diff --git a/include/osmocom/gsm/sysinfo.h b/include/osmocom/gsm/sysinfo.h
new file mode 100644
index 00000000..a66f3f19
--- /dev/null
+++ b/include/osmocom/gsm/sysinfo.h
@@ -0,0 +1,40 @@
+#ifndef _OSMO_GSM_SYSINFO_H
+#define _OSMO_GSM_SYSINFO_H
+
+#include <osmocom/gsm/protocol/gsm_04_08.h>
+
+enum osmo_sysinfo_type {
+ SYSINFO_TYPE_NONE,
+ SYSINFO_TYPE_1,
+ SYSINFO_TYPE_2,
+ SYSINFO_TYPE_3,
+ SYSINFO_TYPE_4,
+ SYSINFO_TYPE_5,
+ SYSINFO_TYPE_6,
+ SYSINFO_TYPE_7,
+ SYSINFO_TYPE_8,
+ SYSINFO_TYPE_9,
+ SYSINFO_TYPE_10,
+ SYSINFO_TYPE_13,
+ SYSINFO_TYPE_16,
+ SYSINFO_TYPE_17,
+ SYSINFO_TYPE_18,
+ SYSINFO_TYPE_19,
+ SYSINFO_TYPE_20,
+ SYSINFO_TYPE_2bis,
+ SYSINFO_TYPE_2ter,
+ SYSINFO_TYPE_2quater,
+ SYSINFO_TYPE_5bis,
+ SYSINFO_TYPE_5ter,
+ /* FIXME all the various bis and ter */
+ _MAX_SYSINFO_TYPE
+};
+
+typedef uint8_t sysinfo_buf_t[GSM_MACBLOCK_LEN];
+
+extern const struct value_string osmo_sitype_strs[_MAX_SYSINFO_TYPE];
+
+uint8_t gsm_sitype2rsl(enum osmo_sysinfo_type si_type);
+enum osmo_sysinfo_type osmo_rsl2sitype(uint8_t rsl_si);
+
+#endif /* _OSMO_GSM_SYSINFO_H */