Dibbler - a portable DHCPv6  1.0.2RC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OptVendorData.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  * released under GNU GPL v2 only licence
7  */
8 
9 #ifndef OPTVENDORDATA_H
10 #define OPTVENDORDATA_H
11 
12 #include "Opt.h"
13 //#include "DHCPConst.h"
14 
15 class TOptVendorData : public TOpt
16 {
17  public:
18  TOptVendorData(int type, int enterprise, char * data, int dataLen, TMsg* parent);
19  TOptVendorData(int type, const char * buf, int n, TMsg* parent);
20  size_t getSize();
21  char * storeSelf( char* buf);
22  virtual bool isValid() const;
23 
25  int getVendor();
26  char * getVendorData(); // returns vendor data (binary)
27  std::string getVendorDataPlain(); // returns vendor data (as a printable string)
28  int getVendorDataLen(); // returns vendor data length
29  bool doDuties() { return true; }
30 
31  protected:
32  int Vendor;
33  char * VendorData;
35 };
36 #endif
37