IBR-DTNSuite
0.12
Main Page
Namespaces
Classes
Files
File List
File Members
Win32LinkManager.h
Go to the documentation of this file.
1
/*
2
* Win32LinkManager.h
3
*
4
* Created on: 11.10.2012
5
* Author: morgenro
6
*/
7
8
#ifndef DEFAULTLINKMANAGER_H_
9
#define DEFAULTLINKMANAGER_H_
10
11
#include "
ibrcommon/link/LinkManager.h
"
12
#include "
ibrcommon/net/vinterface.h
"
13
#include "
ibrcommon/net/vaddress.h
"
14
#include "
ibrcommon/link/LinkMonitor.h
"
15
#include <list>
16
#include <set>
17
18
#include <winsock2.h>
19
#include <ddk/ntddndis.h>
20
#include <iphlpapi.h>
21
22
namespace
ibrcommon
23
{
24
class
Win32LinkManager
:
public
LinkManager
25
{
26
public
:
27
Win32LinkManager
();
28
virtual
~Win32LinkManager
();
29
30
void
up
()
throw
();
31
void
down
()
throw
();
32
33
const
vinterface
getInterface
(
int
index)
const
;
34
const
std::list<vaddress>
getAddressList
(
const
vinterface
&iface,
const
std::string &scope =
""
);
35
36
std::set<ibrcommon::vinterface>
getInterfaces
()
const
;
37
38
virtual
void
addEventListener
(
const
vinterface
&iface,
LinkManager::EventCallback
*cb)
throw
();
39
virtual
void
removeEventListener
(
const
vinterface
&,
LinkManager::EventCallback
*)
throw
();
40
virtual
void
removeEventListener
(
LinkManager::EventCallback
*)
throw
();
41
42
private
:
43
void
freeAdapterInfo(IP_ADAPTER_ADDRESSES *pAddresses)
const
;
44
IP_ADAPTER_ADDRESSES* getAdapterInfo()
const
;
45
vaddress
getAddress(SOCKET_ADDRESS &address)
const
;
46
47
LinkMonitor
_lm;
48
};
49
}
/* namespace ibrcommon */
50
#endif
/* DEFAULTLINKMANAGER_H_ */
ibrcommon
ibrcommon
link
Win32LinkManager.h
Generated on Thu Mar 27 2014 09:26:20 for IBR-DTNSuite by
1.8.4