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

ClntCfgMgr.h

Go to the documentation of this file.
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: ClntCfgMgr.h,v 1.7 2004/12/07 20:51:35 thomson Exp $
00010  *
00011  * $Log: ClntCfgMgr.h,v $
00012  * Revision 1.7  2004/12/07 20:51:35  thomson
00013  * Link local safety checks added (bug #39)
00014  *
00015  * Revision 1.6  2004/12/07 00:45:41  thomson
00016  * Clnt managers creation unified and cleaned up.
00017  *
00018  * Revision 1.5  2004/10/27 22:07:55  thomson
00019  * Signed/unsigned issues fixed, Lifetime option implemented, INFORMATION-REQUEST
00020  * message is now sent properly. Valid lifetime granted by server fixed.
00021  *
00022  * Revision 1.4  2004/05/23 20:41:03  thomson
00023  * *** empty log message ***
00024  *
00025  *                                                                           
00026  */
00027 
00028 class TClntCfgMgr;
00029 #ifndef CLNTCFGMGR_H
00030 #define CLNTCFGMGR_H
00031 
00032 #include <string>
00033 #include "SmartPtr.h"
00034 #include "Container.h"
00035 #include "ClntIfaceMgr.h"
00036 #include "ClntCfgIface.h"
00037 #include "ClntCfgGroup.h"
00038 #include "CfgMgr.h"
00039 #include "FlexLexer.h"
00040 #include "ClntParser.h"
00041 
00042 class TClntCfgMgr : public TCfgMgr
00043 {
00044     friend ostream & operator<<(ostream &strum, TClntCfgMgr &x);
00045  public:
00046     TClntCfgMgr(SmartPtr<TClntIfaceMgr> IfaceMgr, 
00047                 const string cfgFile,const string oldCfgFile);
00048     ~TClntCfgMgr();
00049     
00050     // --- Iface related ---
00051     SmartPtr<TClntCfgIA> getIA(long IAID);
00052     SmartPtr<TClntCfgIface> getIface();
00053     SmartPtr<TClntCfgIface> getIface(int id);
00054     void firstIface();
00055     void addIface(SmartPtr<TClntCfgIface> x);
00056     int countIfaces();
00057     void dump();
00058     
00059     string getWorkDir();
00060     bool getReconfigure();
00061     string getLogName();
00062     int getLogLevel();
00063     
00064     //IA related
00065     bool setIAState(int iface, int iaid, enum EState state);
00066     int countAddrForIA(long IAID);
00067     
00068     SmartPtr<TClntCfgGroup> getGroupForIA(long IAID);
00069     SmartPtr<TClntCfgIface> TClntCfgMgr::getIfaceByIAID(int iaid);
00070     bool isDone();
00071 
00072 private:
00073     SmartPtr<TClntIfaceMgr> IfaceMgr;
00074     TContainer< SmartPtr<TClntCfgIface> > ClntCfgIfaceLst;
00075 
00076     bool validateConfig();
00077     bool validateIface(SmartPtr<TClntCfgIface> iface);
00078     bool validateIA(SmartPtr<TClntCfgIface> ptrIface, SmartPtr<TClntCfgIA> ptrIA);
00079     bool validateAddr(SmartPtr<TClntCfgIface> ptrIface, 
00080                       SmartPtr<TClntCfgIA> ptrIA,
00081                       SmartPtr<TClntCfgAddr> ptrAddr);
00082 
00083     bool matchParsedSystemInterfaces(clntParser *parser);
00084 };
00085 
00086 #endif
00087 

Generated on Mon Dec 27 21:55:22 2004 for Dibbler - a portable DHCPv6 by  doxygen 1.3.9.1