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: OptIAAddress.h,v 1.4 2004/10/27 22:07:56 thomson Exp $ 00010 * 00011 * $Log: OptIAAddress.h,v $ 00012 * Revision 1.4 2004/10/27 22:07:56 thomson 00013 * Signed/unsigned issues fixed, Lifetime option implemented, INFORMATION-REQUEST 00014 * message is now sent properly. Valid lifetime granted by server fixed. 00015 * 00016 * Revision 1.3 2004/09/07 22:02:33 thomson 00017 * pref/valid/IAID is not unsigned, RAPID-COMMIT now works ok. 00018 * 00019 */ 00020 00021 #ifndef OPTIAADDRESS_H 00022 #define OPTIAADDRESS_H 00023 00024 #include "SmartPtr.h" 00025 #include "Container.h" 00026 #include "Opt.h" 00027 #include "IPv6Addr.h" 00028 00029 class TOptIAAddress : public TOpt 00030 { 00031 public: 00032 TOptIAAddress( char * &addr, int &n, TMsg* parent); 00033 TOptIAAddress( SmartPtr<TIPv6Addr> addr, unsigned long pref, unsigned long valid, TMsg* parent); 00034 int getSize(); 00035 00036 char * storeSelf( char* buf); 00037 SmartPtr<TIPv6Addr> getAddr(); 00038 unsigned long getPref(); 00039 unsigned long getValid(); 00040 void setPref(unsigned long pref); 00041 void setValid(unsigned long valid); 00042 bool isValid(); 00043 00044 private: 00045 SmartPtr<TIPv6Addr> Addr; 00046 unsigned long Valid; 00047 unsigned long Pref; 00048 bool ValidOpt; 00049 }; 00050 00051 #endif 00052