aboutsummaryrefslogtreecommitdiffstats
path: root/src/storage.h
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-07-28 09:04:11 +0200
committerHarald Welte <laforge@gnumonks.org>2016-07-28 09:04:11 +0200
commit39cfbf435def2ecf18e7292f92ff34ef2da66561 (patch)
treede22e3787645146d23cf1648eefbffb3743567ac /src/storage.h
initial import of incomplete project to record E1 lines
Diffstat (limited to 'src/storage.h')
-rw-r--r--src/storage.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/storage.h b/src/storage.h
new file mode 100644
index 0000000..d128a34
--- /dev/null
+++ b/src/storage.h
@@ -0,0 +1,21 @@
+#pragma once
+#include <stdint.h>
+
+enum osmo_e1cap_capture_mode {
+ OSMO_E1CAP_MODE_RAW,
+ OSMO_E1CAP_MODE_HDLC,
+ OSMO_E1CAP_MODE_TRAU,
+ OSMO_E1CAP_MODE_PGSL,
+};
+
+/* header for each frame we store */
+struct osmo_e1cap_pkthdr {
+ struct timeval ts;
+ uint32_t len;
+ uint8_t line_nr;
+ uint8_t ts_nr;
+ uint8_t capture_mode;
+ uint8_t flags;
+} __attribute__((aligned));
+
+int e1frame_store(struct e1inp_ts *ts, struct msgb *msg, enum osmo_e1cap_capture_mode mode);