Dibbler - a portable DHCPv6  1.0.2RC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OptOptionRequest.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 
11 #ifndef OPTOPTIONREQUEST_H
12 #define OPTOPTIONREQUEST_H
13 
14 #include "DHCPConst.h"
15 #include "SmartPtr.h"
16 #include "Opt.h"
17 class TClntConfMgr;
18 
19 class TOptOptionRequest : public TOpt
20 {
21  public:
22  TOptOptionRequest(uint16_t code, TMsg* parent);
23  TOptOptionRequest(uint16_t code, const char * buf, size_t size, TMsg* parent);
24 
25  void addOption(unsigned short optNr);
26  void delOption(unsigned short optNr);
27  bool isOption(unsigned short optNr);
28  int count();
29  void clearOptions();
30 
31  virtual size_t getSize();
32  virtual char * storeSelf( char* buf);
33  int getReqOpt(int optNr);
34  virtual std::string getPlain();
35  virtual bool doDuties() { return true; }
36  virtual ~TOptOptionRequest();
37  protected:
38  unsigned short *Options;
39  int OptCnt;
40 };
41 
42 #endif
43