blob: d128a3459ae9259a90d2a90bdcc058b7901ee98a [file] [log] [blame]
Harald Welte39cfbf42016-07-28 09:04:11 +02001#pragma once
2#include <stdint.h>
3
4enum osmo_e1cap_capture_mode {
5 OSMO_E1CAP_MODE_RAW,
6 OSMO_E1CAP_MODE_HDLC,
7 OSMO_E1CAP_MODE_TRAU,
8 OSMO_E1CAP_MODE_PGSL,
9};
10
11/* header for each frame we store */
12struct osmo_e1cap_pkthdr {
13 struct timeval ts;
14 uint32_t len;
15 uint8_t line_nr;
16 uint8_t ts_nr;
17 uint8_t capture_mode;
18 uint8_t flags;
19} __attribute__((aligned));
20
21int e1frame_store(struct e1inp_ts *ts, struct msgb *msg, enum osmo_e1cap_capture_mode mode);