NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
client-to-nlsr-readvertise-policy.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#include "
client-to-nlsr-readvertise-policy.hpp
"
27
28
namespace
nfd
{
29
namespace
rib {
30
31
ndn::optional<ReadvertiseAction>
32
ClientToNlsrReadvertisePolicy::handleNewRoute
(
const
RibRouteRef
& ribRoute)
const
33
{
34
if
(ribRoute.
route
->origin ==
ndn::nfd::ROUTE_ORIGIN_CLIENT
) {
35
return
ReadvertiseAction
{ribRoute.
entry
->getName(),
ndn::security::SigningInfo
()};
36
}
37
else
{
38
return
ndn::nullopt
;
39
}
40
}
41
42
time::milliseconds
43
ClientToNlsrReadvertisePolicy::getRefreshInterval
()
const
44
{
45
return
time::seconds(3600);
46
}
47
48
}
// namespace rib
49
}
// namespace nfd
ndn::nullopt
constexpr nullopt_t nullopt
Definition:
backports-optional.hpp:108
ndn::optional
Definition:
backports-optional.hpp:93
nfd::rib::RibRouteRef::route
RibEntry::const_iterator route
Definition:
rib.hpp:46
nfd::rib::RibRouteRef
references a route
Definition:
rib.hpp:43
ndn::security::SigningInfo
Signing parameters passed to KeyChain.
Definition:
signing-info.hpp:40
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
nfd::rib::RibRouteRef::entry
shared_ptr< RibEntry > entry
Definition:
rib.hpp:45
ndn::nfd::ROUTE_ORIGIN_CLIENT
Definition:
nfd-constants.hpp:103
client-to-nlsr-readvertise-policy.hpp
nfd::rib::ReadvertiseAction
a decision made by readvertise policy
Definition:
readvertise-policy.hpp:37
nfd::rib::ClientToNlsrReadvertisePolicy::handleNewRoute
ndn::optional< ReadvertiseAction > handleNewRoute(const RibRouteRef &ribRoute) const override
advertise if the route's origin is client
Definition:
client-to-nlsr-readvertise-policy.cpp:32
nfd::rib::ClientToNlsrReadvertisePolicy::getRefreshInterval
time::milliseconds getRefreshInterval() const override
Definition:
client-to-nlsr-readvertise-policy.cpp:43
ndnSIM
NFD
rib
readvertise
client-to-nlsr-readvertise-policy.cpp
Generated on Sun Feb 25 2018 13:27:06 for ndnSIM by
1.8.14