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: RelMsg.h,v 1.5 2005/04/28 21:20:52 thomson Exp $ 00010 * 00011 * $Log: RelMsg.h,v $ 00012 * Revision 1.5 2005/04/28 21:20:52 thomson 00013 * Support for multiple relays added. 00014 * 00015 * Revision 1.4 2005/04/25 00:19:20 thomson 00016 * Changes in progress. 00017 * 00018 * Revision 1.3 2005/01/13 22:45:55 thomson 00019 * Relays implemented. 00020 * 00021 * Revision 1.2 2005/01/11 23:35:22 thomson 00022 * *** empty log message *** 00023 * 00024 * Revision 1.1 2005/01/11 22:53:35 thomson 00025 * Relay skeleton implemented. 00026 * 00027 */ 00028 00029 class TRelMsg; 00030 #ifndef RELMSG_H 00031 #define RELMSG_H 00032 00033 #include "RelCommon.h" 00034 #include "Msg.h" 00035 #include "Iface.h" 00036 00037 class TRelMsg : public TMsg 00038 { 00039 public: 00040 TRelMsg(TCtx * ctx, int iface, SmartPtr<TIPv6Addr> addr, char* data, int dataLen); 00041 virtual bool check() = 0; 00042 virtual int getSize() = 0; 00043 void setDestination(int ifindex, SmartPtr<TIPv6Addr> dest); 00044 int getDestIface(); 00045 SmartPtr<TIPv6Addr> getDestAddr(); 00046 void decodeOpts(char * data, int dataLen); 00047 int getHopCount(); 00048 00049 protected: 00050 TCtx * Ctx; 00051 int DestIface; 00052 SmartPtr<TIPv6Addr> DestAddr; 00053 00054 int HopCount; // mormal messages =0, RELAY_FORW, RELAY_REPL = (0..32) 00055 }; 00056 00057 #endif 00058