00001 #ifndef _NETINET_PPP_FSM_H_ 00002 #define _NETINET_PPP_FSM_H_ 00003 00004 /* 00005 * Copyright (C) 2001-2004 by egnite Software GmbH. All rights reserved. 00006 * 00007 * Redistribution and use in source and binary forms, with or without 00008 * modification, are permitted provided that the following conditions 00009 * are met: 00010 * 00011 * 1. Redistributions of source code must retain the above copyright 00012 * notice, this list of conditions and the following disclaimer. 00013 * 2. Redistributions in binary form must reproduce the above copyright 00014 * notice, this list of conditions and the following disclaimer in the 00015 * documentation and/or other materials provided with the distribution. 00016 * 3. Neither the name of the copyright holders nor the names of 00017 * contributors may be used to endorse or promote products derived 00018 * from this software without specific prior written permission. 00019 * 00020 * THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS 00021 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00022 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 00023 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE 00024 * SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 00025 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 00026 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 00027 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 00028 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00029 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 00030 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00031 * SUCH DAMAGE. 00032 * 00033 * For additional information see http://www.ethernut.de/ 00034 * 00035 * - 00036 * Portions are 00037 * Copyright (C) 2002 by Call Direct Cellular Solutions Pty. Ltd. All rights reserved. 00038 * 00039 * Redistribution and use in source and binary forms, with or without 00040 * modification, are permitted provided that the following conditions 00041 * are met: 00042 * 00043 * 1. Redistributions of source code must retain the above copyright 00044 * notice, this list of conditions and the following disclaimer. 00045 * 2. Redistributions in binary form must reproduce the above copyright 00046 * notice, this list of conditions and the following disclaimer in the 00047 * documentation and/or other materials provided with the distribution. 00048 * 3. All advertising materials mentioning features or use of this 00049 * software must display the following acknowledgement: 00050 * 00051 * This product includes software developed by Call Direct Cellular Solutions Pty. Ltd 00052 * and its contributors. 00053 * 00054 * THIS SOFTWARE IS PROVIDED BY CALL DIRECT CELLULAR SOLUTIONS AND CONTRIBUTORS 00055 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00056 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 00057 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CALL DIRECT 00058 * CELLULAR SOLUTIONS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 00059 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 00060 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 00061 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 00062 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00063 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 00064 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00065 * SUCH DAMAGE. 00066 * 00067 * For additional information see http://www.calldirect.com.au/ 00068 * - 00069 * Portions are 00070 * Copyright (c) 1989 by Carnegie Mellon University. 00071 * All rights reserved. 00072 * 00073 * Redistribution and use in source and binary forms are permitted 00074 * provided that the above copyright notice and this paragraph are 00075 * duplicated in all such forms and that any documentation, 00076 * advertising materials, and other materials related to such 00077 * distribution and use acknowledge that the software was developed 00078 * by Carnegie Mellon University. The name of the 00079 * University may not be used to endorse or promote products derived 00080 * from this software without specific prior written permission. 00081 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 00082 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 00083 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00084 */ 00085 00086 /* 00087 * $Log: ppp_fsm.h,v $ 00088 * Revision 1.2 2004/03/08 11:19:55 haraldkipp 00089 * HDLC functions moved to async HDLC driver. 00090 * 00091 * Revision 1.1.1.1 2003/05/09 14:41:16 haraldkipp 00092 * Initial using 3.2.1 00093 * 00094 * Revision 1.2 2003/05/06 18:46:46 harald 00095 * Cleanup 00096 * 00097 * Revision 1.1 2003/03/31 14:57:20 harald 00098 * *** empty log message *** 00099 * 00100 */ 00101 00107 /* 00108 * Link states. 00109 */ 00110 #define PPPS_INITIAL 0 00111 #define PPPS_STARTING 1 00112 #define PPPS_CLOSED 2 00113 #define PPPS_STOPPED 3 00114 #define PPPS_CLOSING 4 00115 #define PPPS_STOPPING 5 00116 #define PPPS_REQSENT 6 00117 #define PPPS_ACKRCVD 7 00118 #define PPPS_ACKSENT 8 00119 #define PPPS_OPENED 9 00121 #define XCP_CONFREQ 1 00122 #define XCP_CONFACK 2 00123 #define XCP_CONFNAK 3 00124 #define XCP_CONFREJ 4 00125 #define XCP_TERMREQ 5 00126 #define XCP_TERMACK 6 00127 #define XCP_CODEREJ 7 00128 #define LCP_PROTREJ 8 00129 #define LCP_ERQ 9 00130 #define LCP_ERP 10 00131 #define LCP_DRQ 11 00133 /* 00134 * PAP client states. 00135 */ 00136 #define PAPCS_INITIAL 0 00137 #define PAPCS_CLOSED 1 00138 #define PAPCS_PENDING 2 00139 #define PAPCS_AUTHREQ 3 00140 #define PAPCS_OPEN 4 00141 #define PAPCS_BADAUTH 5 00143 typedef struct { 00144 u_char xcpo_type; 00145 u_char xcpo_len; 00146 union { 00147 u_short us; 00148 u_long ul; 00149 u_char uc[1]; 00150 } xcpo_; 00151 } XCPOPT; 00152 00153 00154 __BEGIN_DECLS 00155 00156 extern void LcpOpen(NUTDEVICE * dev); 00157 extern void LcpClose(NUTDEVICE *dev); 00158 extern void LcpLowerUp(NUTDEVICE *dev); 00159 extern void LcpLowerDown(NUTDEVICE *dev); 00160 00161 extern void PapLowerUp(NUTDEVICE *dev); 00162 extern void PapLowerDown(NUTDEVICE *dev); 00163 00164 extern void IpcpOpen(NUTDEVICE * dev); 00165 extern void IpcpClose(NUTDEVICE * dev); 00166 extern void IpcpLowerUp(NUTDEVICE *dev); 00167 extern void IpcpLowerDown(NUTDEVICE *dev); 00168 00169 extern void PppOpen(NUTDEVICE *dev); 00170 extern void PppClose(NUTDEVICE *dev); 00171 00172 extern int NutPppInitStateMachine(NUTDEVICE * dev); 00173 00174 __END_DECLS 00175 00176 #endif 00177