IBR-DTNSuite
0.12
Main Page
Namespaces
Classes
Files
File List
File Members
LinkMonitor.h
Go to the documentation of this file.
1
/*
2
* LinkMonitor.h
3
*
4
* Copyright (C) 2013 IBR, TU Braunschweig
5
*
6
* Written-by: David Goltzsche <goltzsch@ibr.cs.tu-bs.de>
7
* Written-by: Johannes Morgenroth <morgenroth@ibr.cs.tu-bs.de>
8
*
9
* Licensed under the Apache License, Version 2.0 (the "License");
10
* you may not use this file except in compliance with the License.
11
* You may obtain a copy of the License at
12
*
13
* http://www.apache.org/licenses/LICENSE-2.0
14
*
15
* Unless required by applicable law or agreed to in writing, software
16
* distributed under the License is distributed on an "AS IS" BASIS,
17
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
* See the License for the specific language governing permissions and
19
* limitations under the License.
20
*
21
* Created on: Sep 9, 2013
22
*/
23
24
#ifndef LINKREQUESTER_H_
25
#define LINKREQUESTER_H_
26
27
#include "
ibrcommon/link/LinkManager.h
"
28
#include "
ibrcommon/thread/Conditional.h
"
29
#include "
ibrcommon/net/vinterface.h
"
30
#include "
ibrcommon/net/vaddress.h
"
31
#include "
ibrcommon/thread/Thread.h
"
32
33
#include <set>
34
#include <map>
35
36
namespace
ibrcommon
37
{
38
class
LinkMonitor
:
public
ibrcommon::JoinableThread
39
{
40
static
const
std::string TAG;
41
42
public
:
43
LinkMonitor
(
LinkManager
&lm);
44
virtual
~LinkMonitor
();
45
46
void
add
(
const
ibrcommon::vinterface
&iface)
throw
();
47
void
remove
()
throw
();
48
49
protected
:
50
void
run
()
throw
();
51
void
__cancellation
()
throw
();
52
53
private
:
54
ibrcommon::Conditional
_cond;
55
bool
_running;
56
LinkManager
&_lmgr;
57
58
typedef
std::set<vaddress> addr_set;
59
typedef
std::map< vinterface, addr_set > iface_map;
60
iface_map _addr_map;
61
};
62
}
63
#endif
/* LINKREQUESTER_H_ */
ibrcommon
ibrcommon
link
LinkMonitor.h
Generated on Thu Mar 27 2014 09:26:20 for IBR-DTNSuite by
1.8.4