Dibbler - a portable DHCPv6  1.0.2RC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OptIAAddress.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  *
7  * released under GNU GPL v2 only licence
8  *
9  */
10 
11 #ifndef OPTIAADDRESS_H
12 #define OPTIAADDRESS_H
13 
14 #include "SmartPtr.h"
15 #include "Container.h"
16 #include "Opt.h"
17 #include "IPv6Addr.h"
18 
19 class TOptIAAddress : public TOpt
20 {
21  public:
22  TOptIAAddress(const char* addr, size_t len, TMsg* parent);
23  TOptIAAddress(SPtr<TIPv6Addr> addr, unsigned long pref, unsigned long valid, TMsg* parent);
24  size_t getSize();
25 
26  char * storeSelf( char* buf);
27  SPtr<TIPv6Addr> getAddr() const;
28  unsigned long getPref() const;
29  unsigned long getValid() const;
30  void setPref(unsigned long pref);
31  void setValid(unsigned long valid);
32  bool isValid() const;
33 
34  virtual bool doDuties() { return true; } // does nothing on its own
35  private:
37  unsigned long ValidLifetime_;
38  unsigned long PrefLifetime_;
39  bool Valid_;
40 };
41 
42 #endif
43