* OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
* OR MODIFICATIONS.
*
- * $Id: ppp.c,v 1.20 1999/09/08 01:11:15 masputra Exp $
+ * $Id: ppp.c,v 1.21 1999/09/15 23:49:05 masputra Exp $
*/
/*
static int putctl2 __P((queue_t *, int, int, int));
static int putctl4 __P((queue_t *, int, int, int));
static int pass_packet __P((upperstr_t *ppa, mblk_t *mp, int outbound));
+#ifdef FILTER_PACKETS
static int ip_hard_filter __P((upperstr_t *ppa, mblk_t *mp, int outbound));
+#endif /* FILTER_PACKETS */
#define PPP_ID 0xb1a6
static struct module_info ppp_info = {
queue_t *q;
mblk_t *mp;
{
- upperstr_t *us, *usnext, *ppa, *os, *nps;
+ upperstr_t *us, *ppa, *nps;
struct iocblk *iop;
struct linkblk *lb;
#ifdef LACHTCP
int error, n, sap;
mblk_t *mq;
struct ppp_idle *pip;
- int len;
#ifdef PRIOQ
queue_t *tlq;
#endif /* PRIOQ */
int size = mp->b_wptr - mp->b_rptr;
mblk_t *reply, *np;
upperstr_t *ppa, *os;
- int sap, *ip, len;
+ int sap, len;
dl_info_ack_t *info;
dl_bind_ack_t *ackp;
mblk_t *mp;
upperstr_t *us;
{
- queue_t *q;
upperstr_t *ppa;
if ((us->flags & US_BLOCKED) || us->npmode == NPMODE_QUEUE)
freemsg(mp);
return 1;
}
- if ((q = ppa->lowerq) == 0) {
+ if (ppa->lowerq == 0) {
/* try to send it up the control stream */
if (bcanputnext(ppa->q, mp->b_band)) {
/*
mblk_t *mp;
{
upperstr_t *ppa, *us;
- queue_t *uq;
int proto, len;
- mblk_t *np;
struct iocblk *iop;
ppa = (upperstr_t *) q->q_ptr;
* OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
* OR MODIFICATIONS.
*
- * $Id: ppp_ahdlc.c,v 1.10 1999/04/12 06:20:21 paulus Exp $
+ * $Id: ppp_ahdlc.c,v 1.11 1999/09/15 23:49:05 masputra Exp $
*/
/*
queue_t *q;
mblk_t *mp;
{
- mblk_t *np;
- uchar_t *cp;
ahdlc_state_t *state;
state = (ahdlc_state_t *) q->q_ptr;
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;
* OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
* OR MODIFICATIONS.
*
- * $Id: ppp_comp.c,v 1.11 1999/04/12 06:20:22 paulus Exp $
+ * $Id: ppp_comp.c,v 1.12 1999/09/15 23:49:06 masputra Exp $
*/
/*
ppp_comp_wsrv(q)
queue_t *q;
{
- mblk_t *mp, *cmp = NULL, *np;
+ mblk_t *mp, *cmp = NULL;
comp_state_t *cp;
int len, proto, type, hlen, code;
struct ip *ip;
* This version is used under SunOS 4.x, Digital UNIX, AIX 4.x,
* and SVR4 systems including Solaris 2.
*
- * $Id: vjcompress.c,v 1.9 1996/06/26 00:53:17 paulus Exp $
+ * $Id: vjcompress.c,v 1.10 1999/09/15 23:49:06 masputra Exp $
*/
#include <sys/types.h>
* with it. */
goto uncompressed;
- if (deltaS = (u_short)(ntohs(th->th_win) - ntohs(oth->th_win))) {
+ if ((deltaS = (u_short)(ntohs(th->th_win) - ntohs(oth->th_win))) > 0) {
ENCODE(deltaS);
changes |= NEW_W;
}
- if (deltaA = ntohl(th->th_ack) - ntohl(oth->th_ack)) {
+ if ((deltaA = ntohl(th->th_ack) - ntohl(oth->th_ack)) > 0) {
if (deltaA > 0xffff)
goto uncompressed;
ENCODE(deltaA);
changes |= NEW_A;
}
- if (deltaS = ntohl(th->th_seq) - ntohl(oth->th_seq)) {
+ if ((deltaS = ntohl(th->th_seq) - ntohl(oth->th_seq)) > 0) {
if (deltaS > 0xffff)
goto uncompressed;
ENCODE(deltaS);