xref: /openbsd/usr.sbin/pppd/ccp.h (revision 952c3118)
1 /*	$OpenBSD: ccp.h,v 1.6 2002/09/13 00:12:10 deraadt Exp $	*/
2 
3 /*
4  * ccp.h - Definitions for PPP Compression Control Protocol.
5  *
6  * Copyright (c) 1989-2002 Paul Mackerras. All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright
13  *    notice, this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright
16  *    notice, this list of conditions and the following disclaimer in
17  *    the documentation and/or other materials provided with the
18  *    distribution.
19  *
20  * 3. The name(s) of the authors of this software must not be used to
21  *    endorse or promote products derived from this software without
22  *    prior written permission.
23  *
24  * 4. Redistributions of any form whatsoever must retain the following
25  *    acknowledgment:
26  *    "This product includes software developed by Paul Mackerras
27  *     <paulus@samba.org>".
28  *
29  * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO
30  * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
31  * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
32  * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
33  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
34  * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
35  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
36  */
37 
38 typedef struct ccp_options {
39     u_int bsd_compress: 1;	/* do BSD Compress? */
40     u_int deflate: 1;		/* do Deflate? */
41     u_int predictor_1: 1;	/* do Predictor-1? */
42     u_int predictor_2: 1;	/* do Predictor-2? */
43     u_int deflate_correct: 1;	/* use correct code for deflate? */
44     u_int deflate_draft: 1;	/* use draft RFC code for deflate? */
45     u_short bsd_bits;		/* # bits/code for BSD Compress */
46     u_short deflate_size;	/* lg(window size) for Deflate */
47     short method;		/* code for chosen compression method */
48 } ccp_options;
49 
50 extern fsm ccp_fsm[];
51 extern ccp_options ccp_wantoptions[];
52 extern ccp_options ccp_gotoptions[];
53 extern ccp_options ccp_allowoptions[];
54 extern ccp_options ccp_hisoptions[];
55 
56 extern struct protent ccp_protent;
57