Deleted Added
full compact
slcompress.h (50477) slcompress.h (58982)
1/*
2 * Definitions for tcp compression routines.
3 *
4 * Copyright (c) 1989, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 *
35 * Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989:
36 * - Initial distribution.
1/*
2 * Definitions for tcp compression routines.
3 *
4 * Copyright (c) 1989, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 *
35 * Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989:
36 * - Initial distribution.
37 * $FreeBSD: head/sys/net/slcompress.h 50477 1999-08-28 01:08:13Z peter $
37 * $FreeBSD: head/sys/net/slcompress.h 58982 2000-04-03 19:54:33Z gj $
38 */
39
40#ifndef _NET_SLCOMPRESS_H_
41#define _NET_SLCOMPRESS_H_
42
43#define MAX_STATES 16 /* must be > 2 and < 256 */
38 */
39
40#ifndef _NET_SLCOMPRESS_H_
41#define _NET_SLCOMPRESS_H_
42
43#define MAX_STATES 16 /* must be > 2 and < 256 */
44#define MAX_HDR MLEN /* XXX 4bsd-ism: should really be 128 */
44#define MAX_HDR 128
45
46/*
47 * Compressed packet format:
48 *
49 * The first octet contains the packet type (top 3 bits), TCP
50 * 'push' bit, and flags that indicate which of the 4 TCP sequence
51 * numbers have changed (bottom 5 bits). The next octet is a
52 * conversation number that associates a saved IP/TCP header with

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

114 * we saw from the conversation together with a small identifier
115 * the transmit & receive ends of the line use to locate saved header.
116 */
117struct cstate {
118 struct cstate *cs_next; /* next most recently used cstate (xmit only) */
119 u_int16_t cs_hlen; /* size of hdr (receive only) */
120 u_char cs_id; /* connection # associated with this state */
121 u_char cs_filler;
45
46/*
47 * Compressed packet format:
48 *
49 * The first octet contains the packet type (top 3 bits), TCP
50 * 'push' bit, and flags that indicate which of the 4 TCP sequence
51 * numbers have changed (bottom 5 bits). The next octet is a
52 * conversation number that associates a saved IP/TCP header with

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

114 * we saw from the conversation together with a small identifier
115 * the transmit & receive ends of the line use to locate saved header.
116 */
117struct cstate {
118 struct cstate *cs_next; /* next most recently used cstate (xmit only) */
119 u_int16_t cs_hlen; /* size of hdr (receive only) */
120 u_char cs_id; /* connection # associated with this state */
121 u_char cs_filler;
122 union {
123 char csu_hdr[MAX_HDR];
124 struct ip csu_ip; /* ip/tcp hdr from most recent packet */
125 } slcs_u;
122 struct ip cs_ip; /* ip/tcp hdr from most recent packet */
126};
123};
127#define cs_ip slcs_u.csu_ip
128#define cs_hdr slcs_u.csu_hdr
129
130/*
131 * all the state data for one serial line (we need one of these
132 * per line).
133 */
134struct slcompress {
135 struct cstate *last_cs; /* most recently used tstate */
136 u_char last_recv; /* last rcvd conn. id */

--- 26 unchanged lines hidden ---
124
125/*
126 * all the state data for one serial line (we need one of these
127 * per line).
128 */
129struct slcompress {
130 struct cstate *last_cs; /* most recently used tstate */
131 u_char last_recv; /* last rcvd conn. id */

--- 26 unchanged lines hidden ---