diff options
Diffstat (limited to 'usr.sbin/ppp/vjcomp.c')
-rw-r--r-- | usr.sbin/ppp/vjcomp.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/usr.sbin/ppp/vjcomp.c b/usr.sbin/ppp/vjcomp.c index c0fc76f..74e4371 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.12 1997/11/09 06:22:49 brian Exp $ + * $Id: vjcomp.c,v 1.13 1997/11/22 03:37:54 brian Exp $ * * TODO: */ @@ -55,14 +55,14 @@ void SendPppFrame(struct mbuf * bp) { int type; - int proto; - int cproto = IpcpInfo.his_compproto >> 16; + u_short proto; + u_short cproto = IpcpInfo.his_compproto >> 16; LogPrintf(LogDEBUG, "SendPppFrame: proto = %x\n", IpcpInfo.his_compproto); if (((struct ip *) MBUF_CTOP(bp))->ip_p == IPPROTO_TCP && cproto == PROTO_VJCOMP) { - type = sl_compress_tcp(bp, (struct ip *) MBUF_CTOP(bp), &cslc, IpcpInfo.his_compproto & 0xff); - + type = sl_compress_tcp(bp, (struct ip *)MBUF_CTOP(bp), &cslc, + IpcpInfo.his_compproto & 0xff); LogPrintf(LogDEBUG, "SendPppFrame: type = %x\n", type); switch (type) { case TYPE_IP: @@ -153,3 +153,13 @@ VjCompInput(struct mbuf * bp, int proto) bp = VjUncompressTcp(bp, type); return (bp); } + +const char * +vj2asc(u_long val) +{ + static char asc[50]; + + sprintf(asc, "%ld VJ slots %s slot compression", + ((val>>8)&15)+1, val & 1 ? "with" : "without"); + return asc; +} |