e1_input: Support I.460 timeslot type
Unlike the legacy TRAU mode, this only adds I460 mux/demux,
without any TRAU frame synchronization. The user must still be
adding the actual sub-channels using osmo_i460_subchan_add()
depending on his requirements.
Change-Id: I44da6dfec77ef475adb35001a0e4fa11d549aa02
diff --git a/src/input/dahdi.c b/src/input/dahdi.c
index a29a233..e59518a 100644
--- a/src/input/dahdi.c
+++ b/src/input/dahdi.c
@@ -199,7 +199,8 @@
/* We never include the DAHDI B-Channel FD into the
* writeset, since it doesn't support poll() based
* write flow control */
- if (e1i_ts->type == E1INP_TS_TYPE_TRAU) {
+ if (e1i_ts->type == E1INP_TS_TYPE_TRAU ||
+ e1i_ts->type == E1INP_TS_TYPE_I460) {
LOGPITS(e1i_ts, DLINP, LOGL_DEBUG, "Trying to write TRAU ts\n");
return 0;
}
@@ -498,6 +499,7 @@
* writeset, since it doesn't support poll() based
* write flow control */
break;
+ case E1INP_TS_TYPE_I460:
case E1INP_TS_TYPE_RAW:
if (what & OSMO_FD_EXCEPT)
handle_dahdi_exception(e1i_ts);
@@ -685,6 +687,7 @@
return ret;
break;
case E1INP_TS_TYPE_TRAU:
+ case E1INP_TS_TYPE_I460:
case E1INP_TS_TYPE_RAW:
/* close/release LAPD instance, if any */
if (e1i_ts->lapd) {
diff --git a/src/input/e1d.c b/src/input/e1d.c
index e3a3b82..3ae1d89 100644
--- a/src/input/e1d.c
+++ b/src/input/e1d.c
@@ -310,7 +310,8 @@
e1d_want_write(struct e1inp_ts *e1i_ts)
{
/* We never include the DAHDI B-Channel FD into the writeset */
- if (e1i_ts->type == E1INP_TS_TYPE_TRAU) {
+ if (e1i_ts->type == E1INP_TS_TYPE_TRAU ||
+ e1i_ts->type == E1INP_TS_TYPE_I460) {
LOGPITS(e1i_ts, DLINP, LOGL_DEBUG, "Trying to write TRAU ts\n");
return 0;
}
@@ -429,6 +430,7 @@
bfd->when = OSMO_FD_READ;
break;
case E1INP_TS_TYPE_TRAU:
+ case E1INP_TS_TYPE_I460:
case E1INP_TS_TYPE_RAW:
/* close/release LAPD instance, if any */
if (e1i_ts->lapd) {
diff --git a/src/input/misdn.c b/src/input/misdn.c
index 52cd311..0237cb9 100644
--- a/src/input/misdn.c
+++ b/src/input/misdn.c
@@ -213,7 +213,8 @@
/* We never include the mISDN B-Channel FD into the
* writeset, since it doesn't support poll() based
* write flow control */
- if (e1i_ts->type == E1INP_TS_TYPE_TRAU)
+ if (e1i_ts->type == E1INP_TS_TYPE_TRAU ||
+ e1i_ts->type == E1INP_TS_TYPE_I460)
return 0;
e1i_ts->driver.misdn.fd.when |= OSMO_FD_WRITE;
@@ -611,6 +612,7 @@
bfd->when = OSMO_FD_READ;
break;
case E1INP_TS_TYPE_TRAU:
+ case E1INP_TS_TYPE_I460:
case E1INP_TS_TYPE_RAW:
bfd->fd = socket(PF_ISDN, SOCK_DGRAM, ISDN_P_B_RAW);
/* We never include the mISDN B-Channel FD into the