Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

AddrAddr.h

Go to the documentation of this file.
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  * $Id: AddrAddr.h,v 1.4 2004/06/20 19:36:46 thomson Exp $
00009  *
00010  * $Log: AddrAddr.h,v $
00011  * Revision 1.4  2004/06/20 19:36:46  thomson
00012  * Minor fixes.
00013  *
00014  */
00015 
00016 #ifndef ADDRADDR_H
00017 #define ADDRADDR_H
00018 
00019 #include <iostream>
00020 #include "IPv6Addr.h"
00021 #include "SmartPtr.h"
00022 #include "DHCPConst.h"
00023 
00024 using namespace std;
00025 
00026 class TAddrAddr
00027 {
00028     friend ostream & operator<<(ostream & strum,TAddrAddr &x);
00029   public:
00030 
00031     TAddrAddr(SmartPtr<TIPv6Addr> addr, long pref, long valid);
00032 
00033     // return address in packed format (char[16])
00034     SmartPtr<TIPv6Addr> get();
00035 
00036     // lifetime related
00037     unsigned long getPref();
00038     unsigned long getValid();
00039     unsigned long getPrefTimeout();
00040     void setPref(unsigned long pref);
00041     void setValid(unsigned long valid);
00042     unsigned long getValidTimeout();
00043 
00044     // timestamp
00045     long getTimestamp();
00046     void setTimestamp(long ts);
00047     void setTimestamp();
00048     
00049     // tentative
00050     enum ETentative getTentative();
00051     void setTentative(enum ETentative state);
00052 
00053   private:
00054     enum ETentative Tentative;
00055 
00056     long Prefered;
00057     long Valid;
00058     SmartPtr<TIPv6Addr> Addr;
00059     long Timestamp;
00060 };
00061 
00062 
00063 #endif
00064 
00065 

Generated on Mon Dec 27 21:55:21 2004 for Dibbler - a portable DHCPv6 by  doxygen 1.3.9.1