Dibbler - a portable DHCPv6  1.0.2RC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OptGeneric.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 licence
7  *
8  * $Id: OptGeneric.h,v 1.3 2008-11-11 22:41:48 thomson Exp $
9  *
10  */
11 
12 #ifndef OPTGENERIC_H
13 #define OPTGENERIC_H
14 
15 #include "DHCPConst.h"
16 #include "Opt.h"
17 #include "DUID.h"
18 #include "SmartPtr.h"
19 
20 class TOptGeneric : public TOpt
21 {
22  public:
23  bool operator == (const TOptGeneric &other);
24 
25  TOptGeneric(int optType, const char * data, unsigned short dataLen, TMsg* parent);
26  TOptGeneric(int optType, TMsg* parent);
27  ~TOptGeneric();
28  size_t getSize();
29  void setData(char * data, int dataLen);
30  std::string getPlain();
31  bool doDuties() { return true; }
32 
33  char * storeSelf(char* buf);
34  virtual bool isValid() const;
35  protected:
36  char * Data;
37  int DataLen;
38 };
39 
40 #endif
41