Dibbler - a portable DHCPv6  1.0.2RC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ClntOptIA_NA.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 #ifndef CLNTOPTIA_NA_H
10 #define CLNTOPTIA_NA_H
11 
12 #include "ClntCfgIA.h"
13 #include "OptIA_NA.h"
14 #include "OptIAAddress.h"
15 #include "IPv6Addr.h"
16 
17 class TOptIA_NA;
18 
19 class TClntOptIA_NA : public TOptIA_NA
20 {
21  public:
23  TClntOptIA_NA(SPtr<TClntCfgIA> ClntCfgIA, TMsg* parent);
24  TClntOptIA_NA(SPtr<TAddrIA> AddrIA, TMsg* parent);
25  TClntOptIA_NA(SPtr<TAddrIA> clntAddrIA, bool zeroTimes, TMsg* parent);
26  TClntOptIA_NA(SPtr<TClntCfgIA> ClntCfgIA, SPtr<TAddrIA> ClntaddrIA, TMsg* parent);
27  TClntOptIA_NA(char * buf, int bufsize, TMsg* parent);
28  ~TClntOptIA_NA();
29 
30  bool doDuties();
31  int getStatusCode();
32  void setContext(SPtr<TDUID> srvDuid, SPtr<TIPv6Addr> srvAddr, int iface);
33  void setIface(int iface);
34 
37  void firstAddr();
38  int countAddr();
39  bool isValid() const;
40 
41  private:
42  void releaseAddr(long IAID, SPtr<TIPv6Addr> addr );
43  int countValidAddrs(SPtr<TAddrIA> ptrAddrIA);
44 
47  int Iface_;
48 };
49 
50 
51 #endif /* IA_NA_H_HEADER_INCLUDED_C112064B */
52