aboutsummaryrefslogtreecommitdiffstats
path: root/src/recorder.h
blob: 12bc993df6f7ed17688b897ec2dad8eedaf9bc1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once
#include <stdbool.h>

#include <osmocom/core/msgb.h>
#include <osmocom/core/logging.h>
#include <osmocom/vty/command.h>
#include <osmocom/abis/e1_input.h>

/* logging */
enum {
	DMAIN,
};

/* vty */
enum rec_vty_node {
	RECORDER_NODE = _LAST_OSMOVTY_NODE + 1,
};

struct e1_recorder_line {
	struct {
		bool enabled;
		uint8_t line_nr;
	} mirror;
};

struct e1_recorder {
	char *storage_path;
	unsigned int max_file_size_mb;
	struct e1_recorder_line line[256];
};

extern struct e1_recorder g_recorder;

/* e1_recorder.c */
void e1ts_raw_recv(struct e1inp_ts *ts, struct msgb *msg);

/* vty.c */
void recorder_vty_init(void);