00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 class TSrvIfaceMgr;
00025 #ifndef RELIFACEMGR_H
00026 #define RELIFACEMGR_H
00027
00028 #include "RelCommon.h"
00029 #include "RelMsg.h"
00030 #include "IfaceMgr.h"
00031 #include "Iface.h"
00032
00033 class TRelIfaceMgr: public TIfaceMgr {
00034 public:
00035 TRelIfaceMgr(string xmlFile);
00036 ~TRelIfaceMgr();
00037 friend ostream & operator <<(ostream & strum, TRelIfaceMgr &x);
00038
00039 SmartPtr<TRelMsg> decodeMsg(SmartPtr<TIfaceIface> iface,
00040 SmartPtr<TIPv6Addr> peer,
00041 char * buf, int bufsize);
00042
00043 SmartPtr<TRelMsg> decodeRelayRepl(SmartPtr<TIfaceIface> iface,
00044 SmartPtr<TIPv6Addr> peer,
00045 char * buf, int bufsize);
00046 SmartPtr<TRelMsg> decodeRelayForw(SmartPtr<TIfaceIface> iface,
00047 SmartPtr<TIPv6Addr> peer,
00048 char * buf, int bufsize);
00049 SmartPtr<TRelMsg> decodeGeneric(SmartPtr<TIfaceIface> iface,
00050 SmartPtr<TIPv6Addr> peer,
00051 char * buf, int bufsize);
00052 void dump();
00053
00054
00055 bool send(int iface, char *data, int dataLen, SmartPtr<TIPv6Addr> addr, int port);
00056
00057
00058 SmartPtr<TRelMsg> select(unsigned long timeout);
00059
00060 private:
00061 TCtx * Ctx;
00062 };
00063
00064 #endif
00065