xref: /netbsd-src/external/bsd/ppp/dist/pppd/ccp.h (revision f12839c5f795a8def46f685de6698463dbd213a9)
1 /*	$NetBSD: ccp.h,v 1.6 2025/01/08 19:59:38 christos Exp $	*/
2 
3 /*
4  * ccp.h - Definitions for PPP Compression Control Protocol.
5  *
6  * Copyright (c) 1994-2024 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  * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO
21  * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
22  * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
23  * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
24  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
25  * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
26  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
27  */
28 #ifndef PPP_CCP_H
29 #define PPP_CCP_H
30 
31 #include "pppdconf.h"
32 
33 #ifdef  __cplusplus
34 extern "C" {
35 #endif
36 
37 typedef struct ccp_options {
38     bool bsd_compress;		/* do BSD Compress? */
39     bool deflate;		/* do Deflate? */
40     bool predictor_1;		/* do Predictor-1? */
41     bool predictor_2;		/* do Predictor-2? */
42     bool deflate_correct;	/* use correct code for deflate? */
43     bool deflate_draft;		/* use draft RFC code for deflate? */
44     unsigned char mppe;		/* MPPE bitfield */
45     unsigned short bsd_bits;		/* # bits/code for BSD Compress */
46     unsigned 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 
58 #ifdef __cplusplus
59 }
60 #endif
61 
62 #endif // PPP_CCP_H
63