Only compress tcp packets. Calculate size of

logbuff rather than guessing at 2000.

PR:		2046
Submitted by:	torii@tcd.hitachi.co.jp
This commit is contained in:
Brian Somers 1997-05-07 23:30:50 +00:00
parent e68d210e8f
commit 2f8fcf44da
2 changed files with 5 additions and 4 deletions

View file

@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: log.c,v 1.8 1997/03/13 14:53:53 brian Exp $
* $Id: log.c,v 1.9 1997/05/04 02:39:03 ache Exp $
*
*/
#include "defs.h"
@ -41,7 +41,7 @@
#ifdef USELOGFILE
static FILE *logfile;
#endif
static char logbuff[2000];
static char logbuff[MAX_MRU*3+(MAX_MRU/16+1)*22+80];
char *logptr;
static struct mbuf *logtop;
static struct mbuf *lognext;

View file

@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id$
* $Id: vjcomp.c,v 1.6 1997/02/22 16:11:05 peter Exp $
*
* TODO:
*/
@ -50,7 +50,8 @@ struct mbuf *bp;
#ifdef DEBUG
logprintf("SendPppFrame: proto = %x\n", IpcpInfo.his_compproto);
#endif
if (cproto== PROTO_VJCOMP) {
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);
#ifdef DEBUG