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

ClntCfgIface.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: ClntCfgIface.h,v 1.8 2004/11/30 00:42:50 thomson Exp $
00010  *
00011  * $Log: ClntCfgIface.h,v $
00012  * Revision 1.8  2004/11/30 00:42:50  thomson
00013  * Client no longer sends RapidCommit, unless told to do so (bug #55)
00014  *
00015  * Revision 1.7  2004/11/29 21:21:56  thomson
00016  * Client parser now supports 'option lifetime' directive (bug #75)
00017  *
00018  * Revision 1.6  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.5  2004/10/25 20:45:52  thomson
00023  * Option support, parsers rewritten. ClntIfaceMgr now handles options.
00024  *
00025  * Revision 1.4  2004/10/02 13:11:24  thomson
00026  * Boolean options in config file now can be specified with YES/NO/TRUE/FALSE.
00027  * Unicast communication now can be enable on client side (disabled by default).
00028  *
00029  * Revision 1.3  2004/05/23 20:13:12  thomson
00030  * *** empty log message ***
00031  *
00032  *                                                                           
00033  */
00034 
00035 #ifndef CLNTCFGIFACE_H
00036 #define CLNTCFGIFACE_H
00037 
00038 #include <iostream>
00039 #include <iomanip>
00040 
00041 #include "Container.h"
00042 #include "StationID.h"
00043 #include "SmartPtr.h"
00044 #include "DHCPConst.h"
00045 #include "IPv6Addr.h"
00046 #include "ClntCfgGroup.h"
00047 #include "ClntParsGlobalOpt.h"
00048 #include "SmartPtr.h"
00049 #include "DUID.h"
00050 #include "IPv6Addr.h"
00051 
00052 using namespace std;
00053 
00054 class TClntCfgIface
00055 {
00056         friend std::ostream& operator<<(std::ostream&,TClntCfgIface&);
00057 public:
00058     TClntCfgIface(string ifaceName);
00059     TClntCfgIface(int ifaceNr);
00060 
00061     TContainer< SmartPtr<TClntCfgGroup> > ClntCfgGroupLst;
00062     void firstGroup();
00063     int countGroup();
00064     SmartPtr<TClntCfgGroup> getGroup();
00065     void addGroup(SmartPtr<TClntCfgGroup> ptr);
00066     string getName(void);
00067     void setOptions(SmartPtr<TClntParsGlobalOpt> opt);
00068     SmartPtr<TClntCfgGroup> getLastGroup();
00069     int getID(void);
00070     void setNoConfig();
00071     void setIfaceID(int ifaceID);
00072     void setIfaceName(string ifaceName);
00073     bool noConfig();
00074 
00075     bool stateless();
00076     bool getUnicast();
00077 
00078     bool getRapidCommit();
00079     void setRapidCommit(bool rapCom);
00080 
00081     // --- option: DNS servers ---
00082     bool isReqDNSServer();
00083     EState getDNSServerState();
00084     void setDNSServerState(EState state);
00085     unsigned long getDNSServerTimeout();
00086     TContainer< SmartPtr<TIPv6Addr> > * getProposedDNSServerLst();
00087 
00088     // --- option: Domain ---
00089     bool isReqDomain();
00090     EState getDomainState();
00091     unsigned long getDomainTimeout();
00092     void setDomainState(EState state);
00093     TContainer< SmartPtr<string> > * getProposedDomainLst();
00094 
00095     // --- option: NTP servers ---
00096     bool isReqNTPServer();
00097     EState getNTPServerState();
00098     unsigned long getNTPServerTimeout();
00099     void setNTPServerState(EState state);
00100     TContainer< SmartPtr<TIPv6Addr> > * getProposedNTPServerLst();
00101 
00102     // --- option: Timezone ---
00103     bool isReqTimezone();
00104     EState getTimezoneState();
00105     unsigned long getTimezoneTimeout();
00106     void setTimezoneState(EState state);
00107     string getProposedTimezone();
00108 
00109     // --- option: SIP servers ---
00110     bool isReqSIPServer();
00111     EState getSIPServerState();
00112     unsigned long getSIPServerTimeout();
00113     void setSIPServerState(EState state);
00114     TContainer< SmartPtr<TIPv6Addr> > * getProposedSIPServerLst();
00115 
00116     // --- option: SIP domains ---
00117     bool isReqSIPDomain();
00118     EState getSIPDomainState();
00119     unsigned long getSIPDomainTimeout();
00120     void setSIPDomainState(EState state);
00121     TContainer< SmartPtr<string> > * getProposedSIPDomainLst();
00122 
00123     // --- option: FQDN ---
00124     bool isReqFQDN();
00125     EState getFQDNState();
00126     unsigned long getFQDNTimeout();
00127     void setFQDNState(EState state);
00128     string getProposedFQDN();
00129 
00130     // --- option: NIS servers ---
00131     bool isReqNISServer();
00132     EState getNISServerState();
00133     unsigned long getNISServerTimeout();
00134     void setNISServerState(EState state);
00135     TContainer< SmartPtr<TIPv6Addr> > * getProposedNISServerLst();
00136 
00137     // --- option: NIS+ servers ---
00138     bool isReqNISPServer();
00139     EState getNISPServerState();
00140     unsigned long getNISPServerTimeout();
00141     void setNISPServerState(EState state);
00142     TContainer< SmartPtr<TIPv6Addr> > * getProposedNISPServerLst();
00143 
00144     // --- option: NIS domains ---
00145     bool isReqNISDomain();
00146     EState getNISDomainState();
00147     unsigned long getNISDomainTimeout();
00148     void setNISDomainState(EState state);
00149     string getProposedNISDomain();
00150 
00151     // --- option: NIS+ domains ---
00152     bool isReqNISPDomain();
00153     EState getNISPDomainState();
00154     unsigned long getNISPDomainTimeout();
00155     void setNISPDomainState(EState state);
00156     string getProposedNISPDomain();
00157 
00158     // --- option: Lifetime ---
00159     bool isReqLifetime();
00160     EState getLifetimeState();
00161     void setLifetimeState(EState state);
00162 
00163 private:
00164     string IfaceName;
00165     int ID;
00166     bool NoConfig;
00167     bool isIA;
00168     bool Unicast;
00169     bool RapidCommit;
00170     
00171     TContainer< SmartPtr<TIPv6Addr> > DNSServerLst;
00172     TContainer< SmartPtr<string> > DomainLst;
00173     TContainer< SmartPtr<TIPv6Addr> > NTPServerLst;
00174     string Timezone;
00175     TContainer< SmartPtr<TIPv6Addr> > SIPServerLst;
00176     TContainer< SmartPtr<string> > SIPDomainLst;
00177     string FQDN;
00178     TContainer< SmartPtr<TIPv6Addr> > NISServerLst;
00179     TContainer< SmartPtr<TIPv6Addr> > NISPServerLst;
00180     string NISDomain;
00181     string NISPDomain;
00182     
00183     EState DNSServerState;
00184     EState DomainState;
00185     EState NTPServerState;
00186     EState TimezoneState;
00187     EState SIPServerState;
00188     EState SIPDomainState;
00189     EState FQDNState;
00190     EState NISServerState;
00191     EState NISPServerState;
00192     EState NISDomainState;
00193     EState NISPDomainState;
00194     EState LifetimeState;
00195 
00196     bool ReqDNSServer;
00197     bool ReqDomain;
00198     bool ReqNTPServer;
00199     bool ReqTimezone;
00200     bool ReqSIPServer;
00201     bool ReqSIPDomain;
00202     bool ReqFQDN;
00203     bool ReqNISServer;
00204     bool ReqNISPServer;
00205     bool ReqNISDomain;
00206     bool ReqNISPDomain;
00207     bool ReqLifetime;
00208 };
00209 
00210 #endif 
00211 

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