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 void appendRequestedOptions();
00030
00031 SmartPtr<TClntTransMgr> getClntTransMgr();
00032 SmartPtr<TClntAddrMgr> getClntAddrMgr();
00033 SmartPtr<TClntCfgMgr> getClntCfgMgr();
00034 SmartPtr<TClntIfaceMgr> getClntIfaceMgr();
00035
00036 virtual string getName() = 0;
00037
00038 long IRT;
00039 long MRT;
00040 long MRC;
00041 long MRD;
00042 int RC;
00043 int RT;
00044 int FirstTimeStamp;
00045 int LastTimeStamp;
00046
00047 protected:
00048 SmartPtr<TClntTransMgr> ClntTransMgr;
00049 SmartPtr<TClntAddrMgr> ClntAddrMgr;
00050 SmartPtr<TClntCfgMgr> ClntCfgMgr;
00051 SmartPtr<TClntIfaceMgr> ClntIfaceMgr;
00052 private:
00053 void setAttribs(SmartPtr<TClntIfaceMgr> IfaceMgr,
00054 SmartPtr<TClntTransMgr> TransMgr,
00055 SmartPtr<TClntCfgMgr> CfgMgr,
00056 SmartPtr<TClntAddrMgr> AddrMgr);
00057 void invalidAllowOptInMsg(int msg, int opt);
00058 void invalidAllowOptInOpt(int msg, int parentOpt, int childOpt);
00059 };
00060
00061 #endif
00062