Implement new 'raw' input type for E1 timeslots
In the past, the A-bis E1 input system only unederstood LAPD signalling
time-slots and trau-slots with 16kBps sub-slots. This adds the notion
of a 'raw' transparent 64kBps slot, without any furthe de-multiplexing
nor any HLDC inside.
Change-Id: I0c25c2688eddd0c55c15b280a8c6e8a49629516b
diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h
index 8ef33d5..7568f19 100644
--- a/include/osmocom/abis/e1_input.h
+++ b/include/osmocom/abis/e1_input.h
@@ -64,6 +64,7 @@
E1INP_TS_TYPE_NONE,
E1INP_TS_TYPE_SIGN,
E1INP_TS_TYPE_TRAU,
+ E1INP_TS_TYPE_RAW,
};
const char *e1inp_tstype_name(enum e1inp_ts_type tp);
const struct value_string e1inp_ts_type_names[5];
@@ -94,6 +95,12 @@
/* subchannel muxer for frames to E1 */
struct subch_mux mux;
} trau;
+ struct {
+ /* call-back for every received frame */
+ void (*recv_cb)(struct e1inp_ts *ts, struct msgb *msg);
+ /* queue of pending to-be-transmitted msgbs */
+ struct llist_head tx_queue;
+ } raw;
};
union {
struct {
@@ -203,9 +210,6 @@
/* fine a previously registered driver */
struct e1inp_driver *e1inp_driver_find(const char *name);
-/* register a line with the E1 core */
-int e1inp_line_register(struct e1inp_line *line);
-
/* get a line by its ID */
struct e1inp_line *e1inp_line_find(uint8_t e1_nr);
@@ -243,6 +247,11 @@
int (*trau_rcv_cb)(struct subch_demux *dmx, int ch,
uint8_t *data, int len, void *_priv));
+/* configure and initialize one timeslot dedicated to RAW frames */
+int e1inp_ts_config_raw(struct e1inp_ts *ts, struct e1inp_line *line,
+ void (*raw_recv_cb)(struct e1inp_ts *ts,
+ struct msgb *msg));
+
/* Receive a packet from the E1 driver */
int e1inp_rx_ts(struct e1inp_ts *ts, struct msgb *msg,
uint8_t tei, uint8_t sapi);