ppp_fsm.h

Go to the documentation of this file.
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.6.1  2008/04/06 10:54:05  haraldkipp
00089  * Bug #1902993 fixed. XCPOPT must be declared packed to work on 32-bit
00090  * targets.
00091  *
00092  * Revision 1.2  2004/03/08 11:19:55  haraldkipp
00093  * HDLC functions moved to async HDLC driver.
00094  *
00095  * Revision 1.1.1.1  2003/05/09 14:41:16  haraldkipp
00096  * Initial using 3.2.1
00097  *
00098  * Revision 1.2  2003/05/06 18:46:46  harald
00099  * Cleanup
00100  *
00101  * Revision 1.1  2003/03/31 14:57:20  harald
00102  * *** empty log message ***
00103  *
00104  */
00105 
00111 /*
00112  * Link states.
00113  */
00114 #define PPPS_INITIAL         0  
00115 #define PPPS_STARTING        1  
00116 #define PPPS_CLOSED          2  
00117 #define PPPS_STOPPED         3  
00118 #define PPPS_CLOSING         4  
00119 #define PPPS_STOPPING        5  
00120 #define PPPS_REQSENT         6  
00121 #define PPPS_ACKRCVD         7  
00122 #define PPPS_ACKSENT         8  
00123 #define PPPS_OPENED          9  
00125 #define XCP_CONFREQ          1  
00126 #define XCP_CONFACK          2  
00127 #define XCP_CONFNAK          3  
00128 #define XCP_CONFREJ          4  
00129 #define XCP_TERMREQ          5  
00130 #define XCP_TERMACK          6  
00131 #define XCP_CODEREJ          7  
00132 #define LCP_PROTREJ          8  
00133 #define LCP_ERQ              9  
00134 #define LCP_ERP             10  
00135 #define LCP_DRQ             11  
00137 /*
00138  * PAP client states.
00139  */
00140 #define PAPCS_INITIAL        0  
00141 #define PAPCS_CLOSED         1  
00142 #define PAPCS_PENDING        2  
00143 #define PAPCS_AUTHREQ        3  
00144 #define PAPCS_OPEN           4  
00145 #define PAPCS_BADAUTH        5  
00147 typedef struct __attribute__ ((packed)) {
00148     u_char xcpo_type;
00149     u_char xcpo_len;
00150     union {
00151         u_short us;
00152         u_long ul;
00153         u_char uc[1];
00154     } xcpo_;
00155 } XCPOPT;
00156 
00157 
00158 __BEGIN_DECLS
00159 
00160 extern void LcpOpen(NUTDEVICE * dev);
00161 extern void LcpClose(NUTDEVICE *dev);
00162 extern void LcpLowerUp(NUTDEVICE *dev);
00163 extern void LcpLowerDown(NUTDEVICE *dev);
00164 
00165 extern void PapLowerUp(NUTDEVICE *dev);
00166 extern void PapLowerDown(NUTDEVICE *dev);
00167 
00168 extern void IpcpOpen(NUTDEVICE * dev);
00169 extern void IpcpClose(NUTDEVICE * dev);
00170 extern void IpcpLowerUp(NUTDEVICE *dev);
00171 extern void IpcpLowerDown(NUTDEVICE *dev);
00172 
00173 extern void PppOpen(NUTDEVICE *dev);
00174 extern void PppClose(NUTDEVICE *dev);
00175 
00176 extern int NutPppInitStateMachine(NUTDEVICE * dev);
00177 
00178 __END_DECLS
00179 
00180 #endif
00181 

© 2000-2007 by egnite Software GmbH - visit http://www.ethernut.de/