summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/vjcomp.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-06-02 15:59:09 +0000
committerbrian <brian@FreeBSD.org>1999-06-02 15:59:09 +0000
commit424e32a4e7c02e7d5783e442834efc3956b3c9b9 (patch)
tree0b2a42f17bd7f967733eaf5f44d7a14ad8da23fb /usr.sbin/ppp/vjcomp.c
parentf45463e353039436955b563e295ed6eabeab0a6c (diff)
downloadFreeBSD-src-424e32a4e7c02e7d5783e442834efc3956b3c9b9.zip
FreeBSD-src-424e32a4e7c02e7d5783e442834efc3956b3c9b9.tar.gz
o Alter the mbuf type as it's processed by different layers.
o Show more information about missing MP fragments in ``show mp''. o Do away with mbuf_Log(). It was showing mbuf stats twice on receipt of LCP/CCP/IPCP packets.... ???!!? o Pre-allocate a bit extra when creating LQR packets to avoid having to allocate another mbuf in mbuf_Prepend().
Diffstat (limited to 'usr.sbin/ppp/vjcomp.c')
-rw-r--r--usr.sbin/ppp/vjcomp.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/ppp/vjcomp.c b/usr.sbin/ppp/vjcomp.c
index 6de5d56..a9783ce 100644
--- a/usr.sbin/ppp/vjcomp.c
+++ b/usr.sbin/ppp/vjcomp.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: vjcomp.c,v 1.29 1999/05/09 20:02:29 brian Exp $
+ * $Id: vjcomp.c,v 1.30 1999/05/12 09:49:12 brian Exp $
*
* TODO:
*/
@@ -81,11 +81,13 @@ vj_LayerPush(struct bundle *bundle, struct link *l, struct mbuf *bp, int pri,
case TYPE_UNCOMPRESSED_TCP:
*proto = PROTO_VJUNCOMP;
log_Printf(LogDEBUG, "vj_LayerPush: PROTO_IP -> PROTO_VJUNCOMP\n");
+ mbuf_SetType(bp, MB_VJOUT);
break;
case TYPE_COMPRESSED_TCP:
*proto = PROTO_VJCOMP;
log_Printf(LogDEBUG, "vj_LayerPush: PROTO_IP -> PROTO_VJUNCOMP\n");
+ mbuf_SetType(bp, MB_VJOUT);
break;
default:
@@ -119,7 +121,8 @@ VjUncompressTcp(struct ipcp *ipcp, struct mbuf *bp, u_char type)
if (len <= 0) {
mbuf_Free(bp);
bp = NULL;
- }
+ } else
+ mbuf_SetType(bp, MB_VJIN);
return bp;
}
@@ -141,8 +144,9 @@ VjUncompressTcp(struct ipcp *ipcp, struct mbuf *bp, u_char type)
}
len -= olen;
len += rlen;
- nbp = mbuf_Alloc(len, MB_VJCOMP);
+ nbp = mbuf_Alloc(len, MB_VJIN);
memcpy(MBUF_CTOP(nbp), bufp, len);
+ mbuf_SetType(bp, MB_VJIN);
nbp->next = bp;
return nbp;
}
OpenPOWER on IntegriCloud