X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=aix4%2Fppp_comp.c;h=8ce40307ae9ec98ec97220b30aaa0b0cc5dbcc59;hp=58f26ad1ad17058d8655b45c9a4a64f306cd4118;hb=416f33f79891785c39465e6b3f1010ee92fb78aa;hpb=c1a66729914c44d5171da98ef4e2f73332457518 diff --git a/aix4/ppp_comp.c b/aix4/ppp_comp.c index 58f26ad..8ce4030 100644 --- a/aix4/ppp_comp.c +++ b/aix4/ppp_comp.c @@ -24,7 +24,7 @@ * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, * OR MODIFICATIONS. * - * $Id: ppp_comp.c,v 1.1 1994/12/05 00:29:21 paulus Exp $ + * $Id: ppp_comp.c,v 1.3 1995/04/26 04:15:48 paulus Exp $ */ #include @@ -168,10 +168,35 @@ ppp_comp_wput(q, mp) int error, len, proto, state; struct ppp_option_data *odp; struct compressor **comp; + struct ppp_comp_stats *pcp; cp = (struct ppp_comp_state *) q->q_ptr; switch (mp->b_datap->db_type) { + case M_CTL: + switch (*(u_char *) mp->b_rptr) { + case IF_GET_CSTATS: + freemsg(mp); + mp = allocb(sizeof(struct ppp_comp_stats) + sizeof(u_long), + BPRI_HI); + if (mp != NULL) { + *(u_char *) mp->b_wptr = IF_CSTATS; + mp->b_wptr += sizeof(u_long); /* should be enough alignment */ + pcp = (struct ppp_comp_stats *) mp->b_wptr; + mp->b_wptr += sizeof(struct ppp_comp_stats); + bzero(pcp, sizeof(struct ppp_comp_stats)); + if (cp->xstate != NULL) + (*cp->xcomp->comp_stat)(cp->xstate, &pcp->c); + if (cp->rstate != NULL) + (*cp->rcomp->decomp_stat)(cp->rstate, &pcp->d); + qreply(q, mp); + } + break; + default: + putnext(q, mp); + } + break; + case M_DATA: /* first find out what the protocol is */ if (mp->b_wptr - mp->b_rptr >= PPP_HDRLEN @@ -410,7 +435,7 @@ ppp_comp_ccp(q, mp, rcvd) if (cp->rstate != NULL && (*cp->rcomp->decomp_init) (cp->rstate, dp + CCP_HDRLEN, clen - CCP_HDRLEN, - 0/* unit */, cp->mru, cp->debug)) + 0/* unit */, 0, cp->mru, cp->debug)) cp->ccp_state = (cp->ccp_state & ~CCP_ERR) | CCP_DECOMP_RUN; }