summaryrefslogtreecommitdiffstats
path: root/src/shared/libosmocore/include
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-05-27 18:17:05 +0200
committerHarald Welte <laforge@gnumonks.org>2011-05-27 18:17:05 +0200
commit783730eae1cc9eb35f410d1be8f5fb93a1ec6423 (patch)
tree3a1ea93ad0cb9bc498bebb57f6480be72ee4c608 /src/shared/libosmocore/include
parentd76345aefa34c576dd142eb64cb0f765cda22933 (diff)
parent4d3a7b124e08a597d5f01fb2a71f3a4677a360a9 (diff)
Merge commit '4d3a7b124e08a597d5f01fb2a71f3a4677a360a9'
Diffstat (limited to 'src/shared/libosmocore/include')
-rw-r--r--src/shared/libosmocore/include/osmocom/gsm/Makefile.am3
-rw-r--r--src/shared/libosmocore/include/osmocom/gsm/abis_nm.h2
-rw-r--r--src/shared/libosmocore/include/osmocom/gsm/gsm_utils.h26
-rw-r--r--src/shared/libosmocore/include/osmocom/gsm/protocol/gsm_04_08.h3
-rw-r--r--src/shared/libosmocore/include/osmocom/gsm/sysinfo.h40
5 files changed, 73 insertions, 1 deletions
diff --git a/src/shared/libosmocore/include/osmocom/gsm/Makefile.am b/src/shared/libosmocore/include/osmocom/gsm/Makefile.am
index c3670ec7..547933ec 100644
--- a/src/shared/libosmocore/include/osmocom/gsm/Makefile.am
+++ b/src/shared/libosmocore/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/src/shared/libosmocore/include/osmocom/gsm/abis_nm.h b/src/shared/libosmocore/include/osmocom/gsm/abis_nm.h
index 720b603d..dcc8d4bb 100644
--- a/src/shared/libosmocore/include/osmocom/gsm/abis_nm.h
+++ b/src/shared/libosmocore/include/osmocom/gsm/abis_nm.h
@@ -22,4 +22,6 @@ const char *abis_nm_avail_name(uint8_t avail);
const char *abis_nm_test_name(uint8_t test);
void abis_nm_debugp_foh(int ss, struct abis_om_fom_hdr *foh);
+int abis_nm_chcomb4pchan(enum gsm_phys_chan_config pchan);
+enum abis_nm_chan_comb abis_nm_pchan4chcomb(uint8_t chcomb);
#endif /* _OSMO_GSM_ABIS_NM_H */
diff --git a/src/shared/libosmocore/include/osmocom/gsm/gsm_utils.h b/src/shared/libosmocore/include/osmocom/gsm/gsm_utils.h
index 19adb70a..a0ef3c4f 100644
--- a/src/shared/libosmocore/include/osmocom/gsm/gsm_utils.h
+++ b/src/shared/libosmocore/include/osmocom/gsm/gsm_utils.h
@@ -114,4 +114,30 @@ int gprs_tlli_type(uint32_t tlli);
uint32_t gprs_tmsi2tlli(uint32_t p_tmsi, enum gprs_tlli_type type);
+/* Osmocom internal, not part of any gsm spec */
+enum gsm_phys_chan_config {
+ GSM_PCHAN_NONE,
+ GSM_PCHAN_CCCH,
+ GSM_PCHAN_CCCH_SDCCH4,
+ GSM_PCHAN_TCH_F,
+ GSM_PCHAN_TCH_H,
+ GSM_PCHAN_SDCCH8_SACCH8C,
+ GSM_PCHAN_PDCH, /* GPRS PDCH */
+ GSM_PCHAN_TCH_F_PDCH, /* TCH/F if used, PDCH otherwise */
+ GSM_PCHAN_UNKNOWN,
+ _GSM_PCHAN_MAX
+};
+
+/* Osmocom internal, not part of any gsm spec */
+enum gsm_chan_t {
+ GSM_LCHAN_NONE,
+ GSM_LCHAN_SDCCH,
+ GSM_LCHAN_TCH_F,
+ GSM_LCHAN_TCH_H,
+ GSM_LCHAN_UNKNOWN,
+ GSM_LCHAN_CCCH,
+ _GSM_LCHAN_MAX
+};
+
+
#endif
diff --git a/src/shared/libosmocore/include/osmocom/gsm/protocol/gsm_04_08.h b/src/shared/libosmocore/include/osmocom/gsm/protocol/gsm_04_08.h
index 3ad7dfdc..39470e78 100644
--- a/src/shared/libosmocore/include/osmocom/gsm/protocol/gsm_04_08.h
+++ b/src/shared/libosmocore/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/src/shared/libosmocore/include/osmocom/gsm/sysinfo.h b/src/shared/libosmocore/include/osmocom/gsm/sysinfo.h
new file mode 100644
index 00000000..a66f3f19
--- /dev/null
+++ b/src/shared/libosmocore/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 */