/* * mlcp.h - Self explanitory * Copyright (C) 1997-2000 SpellCaster Telecommunications Inc. * $Id: ipcp.h,v 1.1 2004/03/11 03:59:31 bcrl Exp $ * Released under the GNU Public License. See LICENSE file for details. */ #ifndef MLCP_H #define MLCP_H #include "debug.h" #include "fsm.h" #include "protocol.h" #include "packet.h" class CInterface; // Packet Codes // Option Types #define MLCP_OPT_MRRU 17 #define MLCP_OPT_SSN 18 #define MLCP_OPT_EPD 19 // Option Lengths #define MLCP_OPT_MRRU_LEN 4 #define MLCP_OPT_MRRU_MIN 576 #define MLCP_OPT_SSN_LEN 2 #define MLCP_HEADER_LENGTH 4 #define MLCP_OPT_ADDR_LEN 6 #define MLCP_OPT_IPCOMPR_LEN 6 class ctrlfd_t; class dfs_object_t; class CMlcpProtocol : public CFsmProtocol { public: CMlcpProtocol(); ~CMlcpProtocol(); public: // External Events void Input(CPppPacket *); CLink *m_parent; u16 their_mrru; u16 our_mrru; u16 acked_mrru; u16 their_ssn; u16 our_ssn; u16 acked_ssn; private: OptionSet_t m_acked; OptionSet_t m_will; protected: virtual void ThisLayerFinished(const char *why); virtual void ThisLayerUp(); virtual void SndConfReq(); virtual void SndConfAck(); virtual void SndConfNak(); virtual void SndTermReq(); virtual void SndTermAck(); virtual void SndCodeReject(CPppPacket *); virtual void RcvCodeReject(CPppPacket *); virtual void RcvConfAck(CPppPacket *); virtual void RcvConfRej(CPppPacket *); virtual void RcvConfNak(CPppPacket *); virtual void RcvConfReq(CPppPacket *); public: void SetWill(OptionSet_t &will) { m_will.Set(will); m_acked.Set(will); } void dump_full_state(ctrlfd_t *cfd); void dfs_restore(dfs_object_t *obj); }; #endif // MLCP_H