NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Typedefs
a
b
c
d
e
f
i
l
m
n
o
p
q
r
s
t
u
v
Enumerations
+
Enumerator
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
u
v
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
~
+
Variables
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
t
u
w
+
Typedefs
a
b
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
+
Enumerator
a
d
e
f
g
i
k
l
m
n
p
r
s
u
w
+
Related Functions
b
c
d
f
i
k
l
n
o
p
s
+
Files
File List
+
File Members
+
All
a
b
c
d
e
f
g
h
k
l
m
n
p
r
s
u
v
w
+
Functions
c
f
h
m
r
s
u
w
+
Variables
a
c
d
g
k
l
n
p
r
s
Typedefs
+
Macros
b
d
e
l
m
n
p
r
s
u
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
broadcast-strategy.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#include "
broadcast-strategy.hpp
"
27
28
namespace
nfd
{
29
namespace
fw {
30
31
NFD_LOG_INIT
(
"BroadcastStrategy"
);
32
33
const
Name
BroadcastStrategy::STRATEGY_NAME
(
"ndn:/localhost/nfd/strategy/broadcast/%FD%02"
);
34
NFD_REGISTER_STRATEGY
(
BroadcastStrategy
);
35
36
BroadcastStrategy::BroadcastStrategy
(
Forwarder
& forwarder,
const
Name
&
name
)
37
:
MulticastStrategy
(forwarder, name)
38
, m_isFirstUse(true)
39
{
40
}
41
42
void
43
BroadcastStrategy::afterReceiveInterest
(
const
Face& inFace,
44
const
Interest
& interest,
45
shared_ptr<fib::Entry> fibEntry,
46
shared_ptr<pit::Entry> pitEntry)
47
{
48
if
(m_isFirstUse) {
49
NFD_LOG_WARN
(
"The broadcast strategy has been renamed as multicast strategy. "
50
"Use ndn:/localhost/nfd/strategy/multicast to select the multicast strategy."
);
51
m_isFirstUse =
false
;
52
}
53
54
this->
MulticastStrategy::afterReceiveInterest
(inFace, interest, fibEntry, pitEntry);
55
}
56
57
}
// namespace fw
58
}
// namespace nfd
nfd::fw::BroadcastStrategy::afterReceiveInterest
virtual void afterReceiveInterest(const Face &inFace, const Interest &interest, shared_ptr< fib::Entry > fibEntry, shared_ptr< pit::Entry > pitEntry) 1
trigger after Interest is received
Definition:
broadcast-strategy.cpp:43
nfd::Forwarder
main class of NFD
Definition:
forwarder.hpp:55
ndn::Interest
represents an Interest packet
Definition:
interest.hpp:45
broadcast-strategy.hpp
nfd::fw::BroadcastStrategy::BroadcastStrategy
BroadcastStrategy(Forwarder &forwarder, const Name &name=STRATEGY_NAME)
Definition:
broadcast-strategy.cpp:36
NFD_LOG_WARN
#define NFD_LOG_WARN(expression)
Definition:
logger.hpp:58
nfd::fw::BroadcastStrategy
identical to MulticastStrategy, for backwards compatibility
Definition:
broadcast-strategy.hpp:37
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
nfd::fw::MulticastStrategy::afterReceiveInterest
virtual void afterReceiveInterest(const Face &inFace, const Interest &interest, shared_ptr< fib::Entry > fibEntry, shared_ptr< pit::Entry > pitEntry) 1
trigger after Interest is received
Definition:
multicast-strategy.cpp:40
nfd::fw::NFD_REGISTER_STRATEGY
NFD_REGISTER_STRATEGY(AccessStrategy)
ndn::Name
Name abstraction to represent an absolute name.
Definition:
name.hpp:46
nfd::fw::BroadcastStrategy::STRATEGY_NAME
static const Name STRATEGY_NAME
Definition:
broadcast-strategy.hpp:49
nfd::fw::MulticastStrategy
a forwarding strategy that forwards Interest to all FIB nexthops
Definition:
multicast-strategy.hpp:36
NFD_LOG_INIT
#define NFD_LOG_INIT(name)
Definition:
logger.hpp:34
ndn::name
Definition:
name-component.cpp:37
ndnSIM
NFD
daemon
fw
broadcast-strategy.cpp
Generated on Sat Nov 12 2016 16:02:54 for ndnSIM by
1.8.12