Dibbler - a portable DHCPv6  1.0.2RC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RelIfaceMgr.h
Go to the documentation of this file.
1 /*
2  * Dibbler - a portable DHCPv6
3  *
4  * authors: Tomasz Mrugalski <thomson@klub.com.pl>
5  * Marek Senderski <msend@o2.pl>
6  *
7  * released under GNU GPL v2 only licence
8  *
9  */
10 
11 #ifndef RELIFACEMGR_H
12 #define RELIFACEMGR_H
13 
14 #include "RelMsg.h"
15 #include "IfaceMgr.h"
16 #include "Iface.h"
17 
18 #define RelIfaceMgr() (TRelIfaceMgr::instance())
19 
20 class TRelIfaceMgr: public TIfaceMgr {
21  public:
22  static void instanceCreate(const std::string& xmlFile);
23  static TRelIfaceMgr& instance();
24  ~TRelIfaceMgr();
25  friend std::ostream & operator <<(std::ostream & strum, TRelIfaceMgr &x);
26 
28  SPtr<TIPv6Addr> peer,
29  char * buf, int bufsize);
30 
32  SPtr<TIPv6Addr> peer,
33  char * buf, int bufsize);
35  SPtr<TIPv6Addr> peer,
36  char * buf, int bufsize);
38  SPtr<TIPv6Addr> peer,
39  char * buf, int bufsize);
40  void dump();
41 
42  // ---sends messages---
43  bool send(int iface, char *data, int dataLen, SPtr<TIPv6Addr> addr, int port);
44 
45  // ---receives messages---
46  SPtr<TRelMsg> select(unsigned long timeout);
47 
48 protected:
49  TRelIfaceMgr(const std::string& xmlFile);
51 };
52 
53 #endif
54