Deleted Added
full compact
slcompress.c (3443) slcompress.c (8876)
1/*-
2 * Copyright (c) 1989, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)slcompress.c 8.2 (Berkeley) 4/16/94
1/*-
2 * Copyright (c) 1989, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)slcompress.c 8.2 (Berkeley) 4/16/94
34 * $Id: slcompress.c,v 1.3 1994/08/18 22:35:22 wollman Exp $
34 * $Id: slcompress.c,v 1.4 1994/10/08 22:38:27 phk Exp $
35 */
36
37/*
38 * Routines to compress and uncompess tcp packets (for transmission
39 * over low speed serial lines.
40 *
41 * Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989:
42 * - Initial distribution.

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

267 changes |= NEW_U;
268 } else if (th->th_urp != oth->th_urp)
269 /* argh! URG not set but urp changed -- a sensible
270 * implementation should never do this but RFC793
271 * doesn't prohibit the change so we have to deal
272 * with it. */
273 goto uncompressed;
274
35 */
36
37/*
38 * Routines to compress and uncompess tcp packets (for transmission
39 * over low speed serial lines.
40 *
41 * Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989:
42 * - Initial distribution.

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

267 changes |= NEW_U;
268 } else if (th->th_urp != oth->th_urp)
269 /* argh! URG not set but urp changed -- a sensible
270 * implementation should never do this but RFC793
271 * doesn't prohibit the change so we have to deal
272 * with it. */
273 goto uncompressed;
274
275 deltaS = (u_short)(ntohs(th->th_win) - ntohs(oth->th_win));
275 deltaS = (u_short)(ntohs(th->th_win) - ntohs(oth->th_win));
276 if (deltaS) {
277 ENCODE(deltaS);
278 changes |= NEW_W;
279 }
280
281 deltaA = ntohl(th->th_ack) - ntohl(oth->th_ack);
282 if (deltaA) {
283 if (deltaA > 0xffff)

--- 255 unchanged lines hidden ---
276 if (deltaS) {
277 ENCODE(deltaS);
278 changes |= NEW_W;
279 }
280
281 deltaA = ntohl(th->th_ack) - ntohl(oth->th_ack);
282 if (deltaA) {
283 if (deltaA > 0xffff)

--- 255 unchanged lines hidden ---