diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-02-16 13:11:45 +0100 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-03-03 16:19:11 +0100 |
commit | 553d2a8ceb5f78f9ab52f6dc4f6f91469d1e4f80 (patch) | |
tree | 8a1dea0c9abb6e28024e4cad4373f8676fcd8fbe /openbsc/tests/libiudummy | |
parent | 23f22b1183533e49ff39600fca7d6d8579e678a3 (diff) |
add tests/libiudummy
Diffstat (limited to 'openbsc/tests/libiudummy')
-rw-r--r-- | openbsc/tests/libiudummy/Makefile.am | 7 | ||||
-rw-r--r-- | openbsc/tests/libiudummy/README | 2 | ||||
-rw-r--r-- | openbsc/tests/libiudummy/iudummy.c | 13 |
3 files changed, 22 insertions, 0 deletions
diff --git a/openbsc/tests/libiudummy/Makefile.am b/openbsc/tests/libiudummy/Makefile.am new file mode 100644 index 000000000..fc4793063 --- /dev/null +++ b/openbsc/tests/libiudummy/Makefile.am @@ -0,0 +1,7 @@ +AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir) +AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) + +noinst_LIBRARIES = libiudummy.a + +libiudummy_a_SOURCES = iudummy.c + diff --git a/openbsc/tests/libiudummy/README b/openbsc/tests/libiudummy/README new file mode 100644 index 000000000..b90bf8c8b --- /dev/null +++ b/openbsc/tests/libiudummy/README @@ -0,0 +1,2 @@ +libiudummy, for convenience, implements iu_tx() as a mere dummy data logger, +for linking scopes that want to avoid linking against libasn1c, osmo-iuh etc. diff --git a/openbsc/tests/libiudummy/iudummy.c b/openbsc/tests/libiudummy/iudummy.c new file mode 100644 index 000000000..54d2c0fd8 --- /dev/null +++ b/openbsc/tests/libiudummy/iudummy.c @@ -0,0 +1,13 @@ +#include <stdint.h> + +#include <osmocom/core/logging.h> +#include <osmocom/vty/logging.h> +#include <osmocom/core/msgb.h> + +int iu_tx(struct msgb *msg, uint8_t sapi) +{ + LOGP(DLGLOBAL, LOGL_INFO, "iu_tx() dummy called, NOT transmitting %d bytes: %s\n", + msg->len, osmo_hexdump(msg->data, msg->len)); + return 0; +} + |