00001 /* 00002 * Dibbler - a portable DHCPv6 00003 * 00004 * authors: Tomasz Mrugalski <thomson@klub.com.pl> 00005 * Marek Senderski <msend@o2.pl> 00006 * 00007 * released under GNU GPL v2 or later licence 00008 * 00009 * $Id: OptOptionRequest.h,v 1.2 2004/10/25 20:45:53 thomson Exp $ 00010 * 00011 * $Log: OptOptionRequest.h,v $ 00012 * Revision 1.2 2004/10/25 20:45:53 thomson 00013 * Option support, parsers rewritten. ClntIfaceMgr now handles options. 00014 * 00015 */ 00016 00017 #ifndef OPTOPTIONREQUEST_H 00018 #define OPTOPTIONREQUEST_H 00019 00020 #include "DHCPConst.h" 00021 #include "SmartPtr.h" 00022 #include "Opt.h" 00023 #include "OptClientIdentifier.h" 00024 00025 class TClntConfMgr; 00026 00027 class TOptOptionRequest : public TOpt 00028 { 00029 public: 00030 TOptOptionRequest(TMsg* parent); 00031 TOptOptionRequest(char * &buf, int &n, TMsg* parent); 00032 00033 void addOption(short optNr); 00034 void delOption(short optNr); 00035 bool isOption(short optNr); 00036 int count(); 00037 void clearOptions(); 00038 00039 int getSize(); 00040 char * storeSelf( char* buf); 00041 int getReqOpt(int optNr); 00042 bool isValid(); 00043 ~TOptOptionRequest(); 00044 protected: 00045 bool Valid; 00046 short *Options; 00047 int OptCnt; 00048 }; 00049 00050 #endif 00051