annotate packages/net/ppp/current/include/cbcp.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/cbcp.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 #ifndef CBCP_H
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
51 #define CBCP_H
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
52
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
53 typedef struct cbcp_state {
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
54 int us_unit; /* Interface unit number */
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
55 u_char us_id; /* Current id */
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
56 u_char us_allowed;
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
57 int us_type;
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
58 char *us_number; /* Telefone Number */
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
59 } cbcp_state;
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
60
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
61 extern cbcp_state cbcp[];
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
62
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
63 extern struct protent cbcp_protent;
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
64
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
65 #define CBCP_MINLEN 4
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
66
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
67 #define CBCP_REQ 1
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
68 #define CBCP_RESP 2
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
69 #define CBCP_ACK 3
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
70
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
71 #define CB_CONF_NO 1
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
72 #define CB_CONF_USER 2
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
73 #define CB_CONF_ADMIN 3
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
74 #define CB_CONF_LIST 4
e0d88dc6a92f Added PPP network support.
nickg
parents:
diff changeset
75 #endif