annotate packages/net/ppp/current/include/ccp.h @ 1586:e0d88dc6a92f

Added PPP network support.
author nickg
date Wed, 14 Apr 2004 15:08:56 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1586
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
1 //==========================================================================
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
2 //
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
3 // include/ccp.h
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
4 //
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
5 //==========================================================================
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
6 //####ECOSGPLCOPYRIGHTBEGIN####
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
7 // -------------------------------------------
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
8 // This file is part of eCos, the Embedded Configurable Operating System.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
9 // Portions created by Nick Garnett are
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
10 // Copyright (C) 2003 eCosCentric Ltd.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
11 //
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
12 // eCos is free software; you can redistribute it and/or modify it under
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
13 // the terms of the GNU General Public License as published by the Free
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
14 // Software Foundation; either version 2 or (at your option) any later version.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
15 //
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
16 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
17 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
18 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
19 // for more details.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
20 //
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
21 // You should have received a copy of the GNU General Public License along
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
22 // with eCos; if not, write to the Free Software Foundation, Inc.,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
23 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
24 //
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
25 // As a special exception, if other files instantiate templates or use macros
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
26 // or inline functions from this file, or you compile this file and link it
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
27 // with other works to produce a work based on this file, this file does not
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
28 // by itself cause the resulting work to be covered by the GNU General Public
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
29 // License. However the source code for this file must still be made available
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
30 // in accordance with section (3) of the GNU General Public License.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
31 //
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
32 // This exception does not invalidate any other reasons why a work based on
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
33 // this file might be covered by the GNU General Public License.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
34 //
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
35 // -------------------------------------------
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
36 //####ECOSGPLCOPYRIGHTEND####
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
37 //####BSDCOPYRIGHTBEGIN####
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
38 //
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
39 // -------------------------------------------
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
40 //
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
41 // Portions of this software may have been derived from OpenBSD,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
42 // FreeBSD or other sources, and are covered by the appropriate
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
43 // copyright disclaimers included herein.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
44 //
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
45 // -------------------------------------------
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
46 //
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
47 //####BSDCOPYRIGHTEND####
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
48 //==========================================================================
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
49
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
50 /*
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
51 * ccp.h - Definitions for PPP Compression Control Protocol.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
52 *
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
53 * Copyright (c) 1994 The Australian National University.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
54 * All rights reserved.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
55 *
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
56 * Permission to use, copy, modify, and distribute this software and its
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
57 * documentation is hereby granted, provided that the above copyright
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
58 * notice appears in all copies. This software is provided without any
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
59 * warranty, express or implied. The Australian National University
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
60 * makes no representations about the suitability of this software for
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
61 * any purpose.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
62 *
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
63 * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
64 * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
65 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
66 * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
67 * OF SUCH DAMAGE.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
68 *
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
69 * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
70 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
71 * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
72 * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
73 * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
74 * OR MODIFICATIONS.
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
75 *
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
76 * $FreeBSD: src/usr.sbin/pppd/ccp.h,v 1.8 1999/08/28 01:19:00 peter Exp $
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
77 */
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
78
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
79 typedef struct ccp_options {
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
80 u_int bsd_compress: 1; /* do BSD Compress? */
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
81 u_int deflate: 1; /* do Deflate? (RFC code) */
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
82 u_int baddeflate: 1; /* do Deflate? (Magnalink!) */
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
83 u_int predictor_1: 1; /* do Predictor-1? */
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
84 u_int predictor_2: 1; /* do Predictor-2? */
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
85 u_int deflate_correct: 1; /* use correct code for deflate? */
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
86 u_int deflate_draft: 1; /* use draft RFC code for deflate? */
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
87 u_short bsd_bits; /* # bits/code for BSD Compress */
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
88 u_short deflate_size; /* lg(window size) for Deflate */
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
89 u_short baddeflate_size; /* lg(window size) for Deflate */
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
90 short method; /* code for chosen compression method */
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
91 } ccp_options;
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
92
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
93 extern fsm ccp_fsm[];
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
94 extern ccp_options ccp_wantoptions[];
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
95 extern ccp_options ccp_gotoptions[];
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
96 extern ccp_options ccp_allowoptions[];
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
97 extern ccp_options ccp_hisoptions[];
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
98
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
99 extern struct protent ccp_protent;