Dibbler - a portable DHCPv6  1.0.2RC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OptVendorSpecInfo.h
Go to the documentation of this file.
1 /*
2  * Dibbler - a portable DHCPv6
3  *
4  * authors: Tomasz Mrugalski <thomson@klub.com.pl>
5  *
6  *
7  * released under GNU GPL v2 only licence
8  */
9 
10 #ifndef OPTVENDORSPECINFO_H
11 #define OPTVENDORSPECINFO_H
12 
13 #include "Opt.h"
14 #include "SmartPtr.h"
15 #include "IPv6Addr.h"
16 #include <stdint.h>
17 
18 class TOptVendorSpecInfo : public TOpt
19 {
20  public:
21  TOptVendorSpecInfo(uint16_t type, char * buf, int n, TMsg* parent);
22  TOptVendorSpecInfo(uint16_t code, uint32_t enterprise, uint16_t sub_option_code,
23  const char *data, int dataLen, TMsg* parent);
24  TOptVendorSpecInfo(uint16_t code, uint32_t enterprise, uint16_t sub_option_code,
25  SPtr<TIPv6Addr> addr, TMsg* parent);
26  TOptVendorSpecInfo(uint16_t code, uint32_t enterprise, uint16_t sub_option_code,
27  const std::string& str, TMsg* parent);
28 
29  size_t getSize();
30  char * storeSelf(char* buf);
31  virtual bool isValid() const;
32  virtual std::string getPlain();
33 
36  bool doDuties() { return true; }
37 protected:
38 
44  void createSuboption(uint16_t sub_option_code, const char* data, size_t data_len);
45 
47 };
48 
49 #endif /* OPTVENDORSPECINFO_H */
50