patch-2.0.26 linux/drivers/isdn/teles/isdnl3.c
Next file: linux/drivers/isdn/teles/l3_1TR6.c
Previous file: linux/drivers/isdn/teles/card.c
Back to the patch index
Back to the overall index
- Lines: 142
- Date:
Wed Nov 13 08:36:20 1996
- Orig file:
v2.0.25/linux/drivers/isdn/teles/isdnl3.c
- Orig date:
Fri Jun 7 16:02:42 1996
diff -u --recursive --new-file v2.0.25/linux/drivers/isdn/teles/isdnl3.c linux/drivers/isdn/teles/isdnl3.c
@@ -1,6 +1,12 @@
-/* $Id: isdnl3.c,v 1.9 1996/06/06 14:22:27 fritz Exp $
+/* $Id: isdnl3.c,v 1.11 1996/09/29 19:41:58 fritz Exp $
*
* $Log: isdnl3.c,v $
+ * Revision 1.11 1996/09/29 19:41:58 fritz
+ * Bugfix: ignore unknown frames.
+ *
+ * Revision 1.10 1996/09/25 18:32:43 keil
+ * response for STATUS_ENQ message added
+ *
* Revision 1.9 1996/06/06 14:22:27 fritz
* Changed level of "non-digital call..." message, since
* with audio support, this is quite normal.
@@ -391,6 +397,42 @@
newl3state(st, 7);
}
+static void
+l3s21(struct PStack *st, byte pr, void *arg)
+{
+ struct BufHeader *dibh=arg;
+ byte *p;
+ int size;
+
+ BufPoolRelease(dibh);
+
+ BufPoolGet(&dibh, st->l1.sbufpool, GFP_ATOMIC, (void *) st, 20);
+ p = DATAPTR(dibh);
+ p += st->l2.ihsize;
+ size = st->l2.ihsize;
+
+ *p++ = 0x8;
+ *p++ = 0x1;
+ *p++ = st->l3.callref;
+ *p++ = MT_STATUS;
+ size += 4;
+
+ *p++ = IE_CAUSE;
+ *p++ = 0x2;
+ *p++ = 0x80;
+ *p++ = 0x9E; /* answer status enquire */
+ size += 4;
+
+ *p++ = 0x14; /* CallState */
+ *p++ = 0x1;
+ *p++ = st->l3.state & 0x3f; /* ISO L3 CallState */
+ size += 3;
+
+ dibh->datasize = size;
+ i_down(st, dibh);
+
+}
+
struct stateentry {
int state;
byte primitive;
@@ -432,34 +474,44 @@
static struct stateentry datastatelist[] =
{
+ {0,MT_STATUS_ENQUIRY,l3s21},
{0,MT_SETUP,l3s12},
+ {1,MT_STATUS_ENQUIRY,l3s21},
{1,MT_CALL_PROCEEDING,l3s6},
{1,MT_SETUP_ACKNOWLEDGE,l3s6},
{1,MT_RELEASE_COMPLETE,l3s4},
{1,MT_RELEASE,l3s19},
{1,MT_DISCONNECT,l3s7},
+ {3,MT_STATUS_ENQUIRY,l3s21},
{3,MT_DISCONNECT,l3s7},
{3,MT_CONNECT,l3s8},
{3,MT_ALERTING,l3s11},
{3,MT_RELEASE,l3s19},
{3,MT_RELEASE_COMPLETE,l3s4},
+ {4,MT_STATUS_ENQUIRY,l3s21},
{4,MT_CONNECT,l3s8},
{4,MT_DISCONNECT,l3s7},
{4,MT_RELEASE,l3s19},
{4,MT_RELEASE_COMPLETE,l3s4},
+ {8,MT_STATUS_ENQUIRY,l3s21},
{6,MT_SETUP,l3s12},
+ {8,MT_STATUS_ENQUIRY,l3s21},
{7,MT_RELEASE,l3s19},
{7,MT_RELEASE_COMPLETE,l3s4_1},
{7,MT_DISCONNECT,l3s7},
+ {8,MT_STATUS_ENQUIRY,l3s21},
{8,MT_RELEASE,l3s19},
{8,MT_CONNECT_ACKNOWLEDGE,l3s17},
{8,MT_DISCONNECT,l3s7},
{8,MT_RELEASE_COMPLETE,l3s4_1},
+ {10,MT_STATUS_ENQUIRY,l3s21},
{10,MT_DISCONNECT,l3s7},
{10,MT_RELEASE,l3s19},
{10,MT_RELEASE_COMPLETE,l3s4_1},
+ {11,MT_STATUS_ENQUIRY,l3s21},
{11,MT_RELEASE,l3s19},
{11,MT_RELEASE_COMPLETE,l3s4},
+ {19,MT_STATUS_ENQUIRY,l3s21},
{19,MT_RELEASE_COMPLETE,l3s4},
};
@@ -502,7 +554,7 @@
datastatelist_1tr6t[i].rout(st, pr, ibh);
break;
#endif
- default: /* E-DSS1 */
+ case PROTO_EURO: /* E-DSS1 */
for (i = 0; i < datasllen; i++)
if ((st->l3.state == datastatelist[i].state) &&
(mt == datastatelist[i].primitive))
@@ -514,6 +566,10 @@
st->l3.state, mt);
} else
datastatelist[i].rout(st, pr, ibh);
+ break;
+ default:
+ BufPoolRelease(ibh);
+ break;
}
} else if (pr == DL_UNIT_DATA) {
ptr = DATAPTR(ibh);
@@ -540,7 +596,7 @@
datastatelist_1tr6t[i].rout(st, pr, ibh);
break;
#endif
- default: /* E-DSS1 */
+ case PROTO_EURO: /* E-DSS1 */
for (i = 0; i < datasllen; i++)
if ((st->l3.state == datastatelist[i].state) &&
(mt == datastatelist[i].primitive))
@@ -552,6 +608,10 @@
st->l3.state, mt);
} else
datastatelist[i].rout(st, pr, ibh);
+ break;
+ default:
+ BufPoolRelease(ibh);
+ break;
}
}
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov