00001 /* 00002 * Dibbler - a portable DHCPv6 00003 * 00004 * authors: Tomasz Mrugalski <thomson@klub.com.pl> 00005 * Marek Senderski <msend@o2.pl> 00006 * 00007 * released under GNU GPL v2 or later licence 00008 * 00009 * $Id: ClntMsgSolicit.h,v 1.4 2005/01/08 16:52:03 thomson Exp $ 00010 * 00011 * $Log: ClntMsgSolicit.h,v $ 00012 * Revision 1.4 2005/01/08 16:52:03 thomson 00013 * Relay support implemented. 00014 * 00015 * Revision 1.3 2004/09/07 22:02:33 thomson 00016 * pref/valid/IAID is not unsigned, RAPID-COMMIT now works ok. 00017 * 00018 * Revision 1.2 2004/06/20 17:51:48 thomson 00019 * getName() method implemented, comment cleanup 00020 * 00021 * 00022 */ 00023 00024 class TClntIfaceMgr; 00025 00026 #ifndef CLNTMSGSOLICIT_H 00027 #define CLNTMSGSOLICIT_H 00028 #include "ClntMsg.h" 00029 #include "ClntCfgMgr.h" 00030 #include "ClntCfgIA.h" 00031 00032 class TClntMsgSolicit : public TClntMsg 00033 { 00034 public: 00035 TClntMsgSolicit(SmartPtr<TClntIfaceMgr> IfaceMgr, 00036 SmartPtr<TClntTransMgr> TransMgr, 00037 SmartPtr<TClntCfgMgr> CfgMgr, 00038 SmartPtr<TClntAddrMgr> AddrMgr, 00039 int iface, 00040 SmartPtr<TIPv6Addr> addr, 00041 TContainer< SmartPtr<TClntCfgIA> > IAs, bool rapid=false); 00042 00043 void answer(SmartPtr<TClntMsg> msg); 00044 void replyReceived(SmartPtr<TClntMsg> msg); 00045 00046 void doDuties(); 00047 bool shallRejectAnswer(SmartPtr<TClntMsg> msg); 00048 void sortAnswers(); 00049 string getName(); 00050 bool check(); 00051 ~TClntMsgSolicit(); 00052 00053 private: 00054 TContainer< SmartPtr<TMsg> > AnswersLst; 00055 00056 // method returns max. preference value of received ADVERTISE messages 00057 int getMaxPreference(); 00058 }; 00059 #endif 00060