Dibbler - a portable DHCPv6  1.0.2RC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SrvParsIfaceOpt.h
Go to the documentation of this file.
1 /*
2  * Dibbler - a portable DHCPv6
3  *
4  * authors: Tomasz Mrugalski <thomson@klub.com.pl>
5  * Marek Senderski <msend@o2.pl>
6  * changes: Krzysztof Wnuk <keczi@poczta.onet.pl>
7  * released under GNU GPL v2 only licence
8  *
9  */
10 
11 #ifndef TSRCPARSIFACEOPT_H_
12 #define TSRCPARSIFACEOPT_H_
13 
14 #include "OptVendorSpecInfo.h"
15 #include "SrvOptInterfaceID.h"
16 #include "SrvParsClassOpt.h"
17 #include "FQDN.h"
18 
20 {
21 public:
22  TSrvParsIfaceOpt(void);
23  ~TSrvParsIfaceOpt(void);
24 
25  void setClntMaxLease(long maxLeases);
26  long getClntMaxLease();
27  void setIfaceMaxLease(long maxLease);
28  long getIfaceMaxLease();
29 
30  void setPreference(char pref);
31  char getPreference();
32 
33  void setRapidCommit(bool rapidComm);
34  bool getRapidCommit();
35 
36  void setUnicast(SPtr<TIPv6Addr> addr);
38 
39  void setRelayName(std::string name);
40  void setRelayID(int ifindex);
42  std::string getRelayName();
43  int getRelayID();
45  bool isRelay();
46 
47  // leasequery support
48  void setLeaseQuerySupport(bool support);
49  bool getLeaseQuerySupport();
50 
51  //-- options related methods --
52  // option: DNS Servers servers is now handled with extra options mechanism
53  // option: Domain servers is now handled with extra options mechanism
54  // option: NTP servers servers is now handled with extra options mechanism
55  // option: Timezone servers is now handled with extra options mechanism
56  // option: SIP servers is now handled with extra options mechanism
57  // option: SIP domains is now handled with extra options mechanism
58  // option: NIS servers is now handled with extra options mechanism
59  // option: NIS+ servers is now handled with extra options mechanism
60  // option: NIS domain is now handled with extra options mechanism
61  // option: NISP domain is now handled with extra options mechanism
62  // option: LIFETIME servers is now handled with extra options mechanism
63 
64  // option: FQDN
65  TContainer< SPtr<TFQDN> > *getFQDNLst();
67  void setRevDNSZoneRootLength(int revDNSZoneRootLength);
68  void setUnknownFQDN(EUnknownFQDNMode mode, const std::string& domain);
70  std::string getFQDNDomain();
71 
72  void setFQDNLst(TContainer< SPtr<TFQDN> > *fqdn);
73  bool supportFQDN();
74 
75  int getFQDNMode();
76  void setFQDNMode(int FQDNMode);
77 
78 #if 0
79  // option: VENDOR-SPEC INFO
80  void setVendorSpec(TContainer< SPtr<TOptVendorSpecInfo> > vendor);
81  bool supportVendorSpec();
82  TContainer< SPtr<TOptVendorSpecInfo> > getVendorSpec();
83 #endif
84 
85  // extra options
86  void addExtraOption(SPtr<TOpt> extra, bool always);
87  const TOptList& getExtraOptions();
89  const TOptList& getForcedOptions();
90 
91 private:
92 
93  void addOption(TOptList& list, SPtr<TOpt> opt);
94 
101  bool LeaseQuery_; // support for leasequery
102 
103  // relay
104  bool Relay_;
105  std::string RelayName_;
106  int RelayID_;
108 
109  // options
110  TContainer< SPtr<TOptVendorSpecInfo> > VendorSpec_;
111 
112  // FQDN
114  TContainer< SPtr<TFQDN> > FQDNLst_;
116  EUnknownFQDNMode UnknownFQDN_; // accept, reject, append domain, generate procedurally
117  std::string FQDNDomain_;
119 
124 };
125 
126 #endif
127