aboutsummaryrefslogtreecommitdiffstats
path: root/tests/osmo-pcap-test/osmo_pcap.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@gnumonks.org>2012-07-19 12:08:40 +0200
committerPablo Neira Ayuso <pablo@gnumonks.org>2012-07-19 12:21:25 +0200
commit004d5aad0e52403b63b4b791373180366b480b67 (patch)
tree6279dee323f60f110ed95bbc24875e0f5144c3aa /tests/osmo-pcap-test/osmo_pcap.h
parent413513a7045fe1fab6b4f0b2bc8e4f34eec36bea (diff)
tests: osmo-pcap: split packet replay from osmux_test code
This patch splits in two files the code that contains the packet replay based on PCAP from the osmux test.
Diffstat (limited to 'tests/osmo-pcap-test/osmo_pcap.h')
-rw-r--r--tests/osmo-pcap-test/osmo_pcap.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/osmo-pcap-test/osmo_pcap.h b/tests/osmo-pcap-test/osmo_pcap.h
new file mode 100644
index 0000000..cff638b
--- /dev/null
+++ b/tests/osmo-pcap-test/osmo_pcap.h
@@ -0,0 +1,24 @@
+#ifndef _OSMO_PCAP_TEST_H_
+#define _OSMO_PCAP_TEST_H_
+
+#include <pcap.h>
+#include <osmocom/core/timer.h>
+
+struct msgb;
+
+void osmo_pcap_init(void);
+
+struct osmo_pcap {
+ pcap_t *h;
+ struct osmo_timer_list timer;
+ struct timeval last;
+};
+
+pcap_t *osmo_pcap_test_open(const char *pcapfile);
+void osmo_pcap_test_close(pcap_t *handle);
+
+int osmo_pcap_test_run(struct osmo_pcap *p, uint8_t pnum, int (*cb)(struct msgb *msgb));
+
+void osmo_pcap_stats_printf(void);
+
+#endif