]> git.ozlabs.org Git - ppp.git/blob - pppd/ccp.h
Initial revision
[ppp.git] / pppd / ccp.h
1 /*
2  * ccp.h - Definitions for PPP Compression Control Protocol.
3  *
4  * Copyright (c) 1994 The Australian National University.
5  * All rights reserved.
6  *
7  * Permission to use, copy, modify, and distribute this software and its
8  * documentation is hereby granted, provided that the above copyright
9  * notice appears in all copies.  This software is provided without any
10  * warranty, express or implied. The Australian National University
11  * makes no representations about the suitability of this software for
12  * any purpose.
13  *
14  * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY
15  * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
16  * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
17  * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY
18  * OF SUCH DAMAGE.
19  *
20  * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,
21  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
22  * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
23  * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO
24  * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
25  * OR MODIFICATIONS.
26  *
27  * $Id: ccp.h,v 1.3 1994/10/18 02:07:33 paulus Exp $
28  */
29
30 /*
31  * Compression algorithms = configuration options
32  */
33 #define CI_BSD_COMPRESS 0x21    /* BSD Compress */
34
35 /*
36  * Extra codes for CCP.
37  */
38 #define RESETREQ        14
39 #define RESETACK        15
40
41 typedef struct ccp_options {
42     u_int bsd_compress: 1;      /* do BSD Compress? */
43     u_short bsd_bits;           /* # bits/code for BSD Compress */
44 } ccp_options;
45
46 #define MIN_BSD_BITS    9
47 #define MAX_BSD_BITS    15
48
49 extern fsm ccp_fsm[];
50 extern ccp_options ccp_wantoptions[];
51 extern ccp_options ccp_gotoptions[];
52 extern ccp_options ccp_allowoptions[];
53 extern ccp_options ccp_hisoptions[];
54
55 void ccp_init __P((int unit));
56 void ccp_open __P((int unit));
57 void ccp_close __P((int unit));
58 void ccp_lowerup __P((int unit));
59 void ccp_lowerdown __P((int));
60 void ccp_input __P((int unit, u_char *pkt, int len));
61 void ccp_protrej __P((int unit));
62 int  ccp_printpkt __P((u_char *pkt, int len,
63                           void (*printer) __P((void *, char *, ...)),
64                           void *arg));
65 void ccp_datainput __P((int unit, u_char *pkt, int len));