Dibbler - a portable DHCPv6  1.0.2RC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OptUserClass.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 #ifndef OPTUSERCLASS_H
11 #define OPTUSERCLASS_H
12 
13 #include "Opt.h"
14 #include <stdint.h>
15 #include <vector>
16 
17 class TOptUserClass : public TOpt
18 {
19  public:
20  struct UserClassData {
21  std::vector<char> opaqueData_;
22  };
23 
24  std::vector<UserClassData> userClassData_;
25 
26  bool parseUserData(const char* buf, unsigned short buf_len);
27 
28  TOptUserClass(uint16_t type, const char* buf, unsigned short buf_len, TMsg* parent);
29  TOptUserClass(uint16_t type, TMsg* parent);
30  size_t getSize();
31  virtual bool isValid() const;
32  char* storeSelf( char* buf);
33  bool doDuties() { return false; }
34 protected:
35  char* storeUserData(char* buf);
36 };
37 
38 #endif /* USERCLASS_H */
39