Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

ClntMsg.h

Go to the documentation of this file.
00001 #ifndef CLNTMSG_H
00002 #define CLNTMSG_H
00003 
00004 #include "Msg.h"
00005 #include "ClntIfaceMgr.h"
00006 #include "ClntTransMgr.h"
00007 #include "ClntCfgMgr.h"
00008 #include "ClntAddrMgr.h"
00009 #include "SmartPtr.h"
00010 #include "Opt.h"
00011 
00012 class TClntMsg : public TMsg
00013 {
00014 public:
00015     TClntMsg(SmartPtr<TClntIfaceMgr> IfaceMgr, 
00016              SmartPtr<TClntTransMgr> TransMgr, 
00017              SmartPtr<TClntCfgMgr> CfgMgr,
00018              SmartPtr<TClntAddrMgr> AddrMgr,
00019              int iface, SmartPtr<TIPv6Addr> addr, char* buf, int bufSize);
00020     
00021     TClntMsg(SmartPtr<TClntIfaceMgr> IfaceMgr, 
00022              SmartPtr<TClntTransMgr> TransMgr, 
00023              SmartPtr<TClntCfgMgr> CfgMgr,
00024              SmartPtr<TClntAddrMgr> AddrMgr,
00025              int iface, SmartPtr<TIPv6Addr> addr, int msgType);
00026     unsigned long getTimeout();
00027     void send();
00028 
00029     //answer for a specific message
00030     virtual void answer(SmartPtr<TClntMsg> Rep) = 0;
00031     virtual void doDuties() = 0;
00032     virtual bool check() = 0;
00033 
00034     void appendRequestedOptions();
00035     
00036     SmartPtr<TClntTransMgr>  getClntTransMgr();
00037     SmartPtr<TClntAddrMgr>   getClntAddrMgr();
00038     SmartPtr<TClntCfgMgr>    getClntCfgMgr();
00039     SmartPtr<TClntIfaceMgr>  getClntIfaceMgr();
00040 
00041     virtual string getName() = 0;
00042 
00043  protected:
00044     long IRT;           // Initial Retransmission Time
00045     long MRT;           // Maximum Retransmission Time
00046     long MRC;           // Maximum Retransmission Count
00047     long MRD;           // Maximum Retransmission Duration
00048     int RC;             // Retransmission counter (counts to 0)
00049     int RT;             // Retransmission timeout (in seconds)
00050     int FirstTimeStamp; // timestamp of the first transmission
00051     int LastTimeStamp;  // timestamp of the last transmission
00052     SmartPtr<TClntTransMgr>  ClntTransMgr;
00053     SmartPtr<TClntAddrMgr>   ClntAddrMgr;
00054     SmartPtr<TClntCfgMgr>    ClntCfgMgr;
00055     SmartPtr<TClntIfaceMgr>  ClntIfaceMgr;
00056  private:
00057     void setAttribs(SmartPtr<TClntIfaceMgr> IfaceMgr, 
00058                     SmartPtr<TClntTransMgr> TransMgr, 
00059                     SmartPtr<TClntCfgMgr>   CfgMgr,
00060                     SmartPtr<TClntAddrMgr>  AddrMgr);
00061     void invalidAllowOptInMsg(int msg, int opt);
00062     void invalidAllowOptInOpt(int msg, int parentOpt, int childOpt);
00063 };
00064 
00065 #endif
00066 

Generated on Wed Mar 16 00:10:25 2005 for Dibbler - a portable DHCPv6 by  doxygen 1.3.9.1