/* * pap.h - Self explanitory * * Copyright (C) 1997-2000 SpellCaster Telecommunications Inc. * $Id: pap.h,v 1.1 2004/03/11 03:59:31 bcrl Exp $ * Released under the GNU Public License. See LICENSE file for details. */ #ifndef PAP_H #define PAP_H #include "kernel.h" #include "protocol.h" #include "packet.h" #include "config.h" #define PAP_HEADER_LENGTH 4 #define PAP_CODE_AUTHREQ 1 #define PAP_CODE_AUTHACK 2 #define PAP_CODE_AUTHNAK 3 #define MAX_USER_LEN 256 #define MAX_PASS_LEN 32 #define PAP_RETRIES 4 extern void PapTimeout(void *); extern void PapGotConfig(void *, OptionSet_t *); class CLink; class ctrlfd_t; class dfs_object_t; class l2tp_packet_t; class CPapProtocol : public CTimedProtocol { public: virtual void Down(); virtual void Up(); void SndAuthReq(); void SndAuthNak(); void SndAuthAck(); void RcvAuthNak(CPppPacket *); void RcvAuthAck(CPppPacket *); void RcvAuthReq(CPppPacket *); virtual void Input(CPppPacket *); CPapProtocol(); virtual ~CPapProtocol(); void handle_proxy_authen(l2tp_packet_t *pkt); friend void PapTimeout(void *); friend void PapGotConfig(void *, OptionSet_t *); virtual void TimerExpired(); CTimer m_authTimer; CLink *m_parent; void dump_full_state(ctrlfd_t *cfd); void dfs_restore(dfs_object_t *obj); protected: uint m_restart_count; }; #endif // PAP_H