Deleted Added
full compact
vjcomp.c (31514) vjcomp.c (32439)
1/*
2 * Input/Output VJ Compressed packets
3 *
4 * Written by Toshiharu OHNO (tony-o@iij.ad.jp)
5 *
6 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
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 Internet Initiative Japan, Inc. The name of the
14 * IIJ 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 * Input/Output VJ Compressed packets
3 *
4 * Written by Toshiharu OHNO (tony-o@iij.ad.jp)
5 *
6 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
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 Internet Initiative Japan, Inc. The name of the
14 * IIJ 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: vjcomp.c,v 1.13 1997/11/22 03:37:54 brian Exp $
20 * $Id: vjcomp.c,v 1.14 1997/12/03 10:23:54 brian Exp $
21 *
22 * TODO:
23 */
24#include <sys/types.h>
25#include <netinet/in.h>
26#include <netinet/in_systm.h>
27#include <netinet/ip.h>
28

--- 121 unchanged lines hidden (view full) ---

150 LogPrintf(LogERROR, "VjCompInput...???\n");
151 return (bp);
152 }
153 bp = VjUncompressTcp(bp, type);
154 return (bp);
155}
156
157const char *
21 *
22 * TODO:
23 */
24#include <sys/types.h>
25#include <netinet/in.h>
26#include <netinet/in_systm.h>
27#include <netinet/ip.h>
28

--- 121 unchanged lines hidden (view full) ---

150 LogPrintf(LogERROR, "VjCompInput...???\n");
151 return (bp);
152 }
153 bp = VjUncompressTcp(bp, type);
154 return (bp);
155}
156
157const char *
158vj2asc(u_long val)
158vj2asc(u_int32_t val)
159{
160 static char asc[50];
161
159{
160 static char asc[50];
161
162 sprintf(asc, "%ld VJ slots %s slot compression",
163 ((val>>8)&15)+1, val & 1 ? "with" : "without");
162 sprintf(asc, "%d VJ slots %s slot compression",
163 (int)((val>>8)&15)+1, val & 1 ? "with" : "without");
164 return asc;
165}
164 return asc;
165}