slcompress.c (3b0f8d2ed641ceeded11c0d3f253b0cacbf00880) | slcompress.c (b6217683dc0269a53b799399522dbdfb5a4919cc) |
---|---|
1/* 2 * Routines to compress and uncompess tcp packets (for transmission 3 * over low speed serial lines. 4 * 5 * Copyright (c) 1989 Regents of the University of California. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms are permitted 9 * provided that the above copyright notice and this paragraph are 10 * duplicated in all such forms and that any documentation, 11 * advertising materials, and other materials related to such 12 * distribution and use acknowledge that the software was developed 13 * by the University of California, Berkeley. The name of the 14 * University may not be used to endorse or promote products derived 15 * from this software without specific prior written permission. 16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 18 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 19 * | 1/* 2 * Routines to compress and uncompess tcp packets (for transmission 3 * over low speed serial lines. 4 * 5 * Copyright (c) 1989 Regents of the University of California. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms are permitted 9 * provided that the above copyright notice and this paragraph are 10 * duplicated in all such forms and that any documentation, 11 * advertising materials, and other materials related to such 12 * distribution and use acknowledge that the software was developed 13 * by the University of California, Berkeley. The name of the 14 * University may not be used to endorse or promote products derived 15 * from this software without specific prior written permission. 16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 18 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 19 * |
20 * $Id: slcompress.c,v 1.15.2.3 1998/03/16 22:54:25 brian Exp $ | 20 * $Id: slcompress.c,v 1.15.2.4 1998/04/03 19:21:52 brian Exp $ |
21 * 22 * Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989: 23 * - Initial distribution. 24 */ 25 26#include <sys/param.h> 27#include <netinet/in_systm.h> 28#include <netinet/in.h> --- 540 unchanged lines hidden (view full) --- 569 comp->flags |= SLF_TOSS; 570 slstat->sls_errorin++; 571 return (0); 572} 573 574int 575ReportCompress(struct cmdargs const *arg) 576{ | 21 * 22 * Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989: 23 * - Initial distribution. 24 */ 25 26#include <sys/param.h> 27#include <netinet/in_systm.h> 28#include <netinet/in.h> --- 540 unchanged lines hidden (view full) --- 569 comp->flags |= SLF_TOSS; 570 slstat->sls_errorin++; 571 return (0); 572} 573 574int 575ReportCompress(struct cmdargs const *arg) 576{ |
577 prompt_Printf(&prompt, "VJ compression statistics:\n"); 578 prompt_Printf(&prompt, " Out: %d (compress) / %d (total)", | 577 prompt_Printf(arg->prompt, "VJ compression statistics:\n"); 578 prompt_Printf(arg->prompt, " Out: %d (compress) / %d (total)", |
579 arg->bundle->ncp.ipcp.vj.slstat.sls_compressed, 580 arg->bundle->ncp.ipcp.vj.slstat.sls_packets); | 579 arg->bundle->ncp.ipcp.vj.slstat.sls_compressed, 580 arg->bundle->ncp.ipcp.vj.slstat.sls_packets); |
581 prompt_Printf(&prompt, " %d (miss) / %d (search)\n", | 581 prompt_Printf(arg->prompt, " %d (miss) / %d (search)\n", |
582 arg->bundle->ncp.ipcp.vj.slstat.sls_misses, 583 arg->bundle->ncp.ipcp.vj.slstat.sls_searches); | 582 arg->bundle->ncp.ipcp.vj.slstat.sls_misses, 583 arg->bundle->ncp.ipcp.vj.slstat.sls_searches); |
584 prompt_Printf(&prompt, " In: %d (compress), %d (uncompress)", | 584 prompt_Printf(arg->prompt, " In: %d (compress), %d (uncompress)", |
585 arg->bundle->ncp.ipcp.vj.slstat.sls_compressedin, 586 arg->bundle->ncp.ipcp.vj.slstat.sls_uncompressedin); | 585 arg->bundle->ncp.ipcp.vj.slstat.sls_compressedin, 586 arg->bundle->ncp.ipcp.vj.slstat.sls_uncompressedin); |
587 prompt_Printf(&prompt, " %d (error), %d (tossed)\n", | 587 prompt_Printf(arg->prompt, " %d (error), %d (tossed)\n", |
588 arg->bundle->ncp.ipcp.vj.slstat.sls_errorin, 589 arg->bundle->ncp.ipcp.vj.slstat.sls_tossed); 590 return 0; 591} | 588 arg->bundle->ncp.ipcp.vj.slstat.sls_errorin, 589 arg->bundle->ncp.ipcp.vj.slstat.sls_tossed); 590 return 0; 591} |