Dibbler - a portable DHCPv6  1.0.2RC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AddrClient.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: Michal Kowalczuk <michal@kowalczuk.eu>
7  *
8  * released under GNU GPL v2 licence
9  *
10  */
11 
12 class TAddrClient;
13 #ifndef ADDRCLIENT_H
14 #define ADDRCLIENT_H
15 
16 #include <vector>
17 #include "SmartPtr.h"
18 #include "Container.h"
19 #include "AddrIA.h"
20 #include "DUID.h"
21 #include "Portable.h"
22 
24 {
25  friend std::ostream & operator<<(std::ostream & strum, TAddrClient &x);
26 
27 public:
30 
31  //--- IA list ---
32  void firstIA();
34  SPtr<TAddrIA> getIA(unsigned long IAID);
35  void addIA(SPtr<TAddrIA> ia);
36  bool delIA(unsigned long IAID);
37  int countIA();
38 
39  //--- PD list ---
40  void firstPD();
42  SPtr<TAddrIA> getPD(unsigned long IAID);
43  void addPD(SPtr<TAddrIA> ia);
44  bool delPD(unsigned long IAID);
45  int countPD();
46 
47  //--- TA list ---
48  void firstTA();
50  SPtr<TAddrIA> getTA(unsigned long iaid);
51  void addTA(SPtr<TAddrIA> ia);
52  bool delTA(unsigned long iaid);
53  int countTA();
54 
55  // time related
56  unsigned long getT1Timeout();
57  unsigned long getT2Timeout();
58  unsigned long getPrefTimeout();
59  unsigned long getValidTimeout();
60 
61  //authentication
62  uint32_t getSPI();
63  void setSPI(uint32_t val);
64  uint64_t getReplayDetectionRcvd();
65  void setReplayDetectionRcvd(uint64_t val);
66 
67  void generateReconfKey();
68 
69  unsigned long getLastTimestamp();
70 
76  std::vector<uint8_t> ReconfKey_;
77 
78 private:
79  TContainer< SPtr<TAddrIA> > IAsLst;
80  TContainer< SPtr<TAddrIA> > TALst;
81  TContainer< SPtr<TAddrIA> > PDLst;
83 
86 };
87 
88 
89 
90 #endif
91