* OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
* OR MODIFICATIONS.
*
- * $Id: ppp_ahdlc.c,v 1.8 1998/05/04 06:11:50 paulus Exp $
+ * $Id: ppp_ahdlc.c,v 1.11 1999/09/15 23:49:05 masputra Exp $
*/
/*
state->cur_frame = 0;
}
FREE(q->q_ptr, sizeof(ahdlc_state_t));
+ q->q_ptr = NULL;
+ OTHERQ(q)->q_ptr = NULL;
--ppp_ahdlc_count;
}
return 0;
struct ppp_stats *psp;
state = (ahdlc_state_t *) q->q_ptr;
+ if (state == 0) {
+ DPRINT("state == 0 in ahdlc_wput\n");
+ freemsg(mp);
+ return 0;
+ }
+
switch (mp->b_datap->db_type) {
case M_DATA:
/*
default:
putnext(q, mp);
}
+
return 0;
}
queue_t *q;
mblk_t *mp;
{
- mblk_t *np;
- uchar_t *cp;
ahdlc_state_t *state;
+ state = (ahdlc_state_t *) q->q_ptr;
+ if (state == 0) {
+ DPRINT("state == 0 in ahdlc_rput\n");
+ freemsg(mp);
+ return 0;
+ }
+
switch (mp->b_datap->db_type) {
case M_DATA:
unstuff_chars(q, mp);
break;
case M_HANGUP:
- state = (ahdlc_state_t *) q->q_ptr;
if (state->cur_frame != 0) {
/* XXX would like to send this up for debugging */
freemsg(state->cur_frame);
mblk_t *mp;
{
ahdlc_state_t *state;
- int ilen, olen, c, extra, i, code;
+ int ilen, olen, c, extra, code;
mblk_t *omsg, *op, *np;
uchar_t *sp, *sp0, *dp, *dp0, *spend;
ushort_t fcs;
u_int32_t *xaccm, lcp_xaccm[8];
- static uchar_t lcphdr[PPP_HDRLEN] = { 0xff, 0x03, 0xc0, 0x21 };
- uchar_t ppphdr[PPP_HDRLEN];
state = (ahdlc_state_t *) q->q_ptr;
ilen = msgdsize(mp);
ahdlc_state_t *state;
mblk_t *om;
uchar_t *cp, *cpend, *dp, *dp0;
- int c, len, extra, offset;
+ int c, len, extra;
ushort_t fcs;
state = (ahdlc_state_t *) q->q_ptr;