summaryrefslogtreecommitdiffstats
path: root/include/osmocore
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-06-29 20:51:13 +0200
committerHarald Welte <laforge@gnumonks.org>2010-06-29 21:57:25 +0200
commite779c364ac7eb1f6bcf42e507972bc3322e6f908 (patch)
treed91a9169d722eeefed82d4cc48e39fed073e3bd6 /include/osmocore
parent1067e8cc9a5d4f28f986f7473093cbac874d4208 (diff)
Add gsmtap utility functions to libosmocore
This is imported from OsmocomBB/Layer23
Diffstat (limited to 'include/osmocore')
-rw-r--r--include/osmocore/Makefile.am2
-rw-r--r--include/osmocore/gsmtap_util.h16
2 files changed, 17 insertions, 1 deletions
diff --git a/include/osmocore/Makefile.am b/include/osmocore/Makefile.am
index fde01027..647b5c00 100644
--- a/include/osmocore/Makefile.am
+++ b/include/osmocore/Makefile.am
@@ -1,7 +1,7 @@
osmocore_HEADERS = signal.h linuxlist.h timer.h select.h msgb.h \
tlv.h bitvec.h comp128.h statistics.h gsm_utils.h utils.h \
gsmtap.h write_queue.h rsl.h gsm48.h rxlev_stat.h mncc.h \
- gsm48_ie.h logging.h gsm0808.h rate_ctr.h
+ gsm48_ie.h logging.h gsm0808.h rate_ctr.h gsmtap_util.h
if ENABLE_TALLOC
osmocore_HEADERS += talloc.h
diff --git a/include/osmocore/gsmtap_util.h b/include/osmocore/gsmtap_util.h
new file mode 100644
index 00000000..30fc1267
--- /dev/null
+++ b/include/osmocore/gsmtap_util.h
@@ -0,0 +1,16 @@
+#ifndef _GSMTAP_UTIL_H
+#define _GSMTAP_UTIL_H
+
+#include <stdint.h>
+
+/* convert RSL channel number to GSMTAP channel type */
+uint8_t chantype_rsl2gsmtap(uint8_t rsl_chantype, uint8_t rsl_link_id);
+
+/* receive a message from L1/L2 and put it in GSMTAP */
+int gsmtap_sendmsg(uint16_t arfcn, uint8_t ts, uint8_t chan_type, uint8_t ss,
+ uint32_t fn, int8_t signal_dbm, uint8_t snr,
+ const uint8_t *data, unsigned int len);
+
+int gsmtap_init(uint32_t dst_ip);
+
+#endif /* _GSMTAP_UTIL_H */