NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
certificate-fetcher-direct-fetch.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#include "
certificate-fetcher-direct-fetch.hpp
"
23
#include "face.hpp"
24
#include "
lp/tags.hpp
"
25
26
namespace
ndn
{
27
namespace
security
{
28
namespace
v2 {
29
30
CertificateFetcherDirectFetch::CertificateFetcherDirectFetch
(
Face
&
face
)
31
:
CertificateFetcherFromNetwork
(face)
32
{
33
}
34
35
void
36
CertificateFetcherDirectFetch::doFetch
(
const
shared_ptr<CertificateRequest>& keyRequest,
37
const
shared_ptr<ValidationState>& state,
38
const
ValidationContinuation
& continueValidation)
39
{
40
auto
interestState = dynamic_pointer_cast<
InterestValidationState
>(state);
41
if
(interestState !=
nullptr
) {
42
uint64_t incomingFaceId = 0;
43
auto
incomingFaceIdTag = interestState->
getOriginalInterest
().
getTag
<
lp::IncomingFaceIdTag
>();
44
if
(incomingFaceIdTag !=
nullptr
) {
45
incomingFaceId = incomingFaceIdTag->
get
();
46
}
47
48
if
(incomingFaceId != 0) {
49
Interest
directInterest(keyRequest->m_interest);
50
directInterest.
refreshNonce
();
51
directInterest.
setTag
(make_shared<lp::NextHopFaceIdTag>(incomingFaceId));
52
m_face
.
expressInterest
(directInterest,
nullptr
,
nullptr
,
nullptr
);
53
}
54
}
55
56
// send infrastructure Interest
57
CertificateFetcherFromNetwork::doFetch
(keyRequest, state, continueValidation);
58
}
59
60
}
// namespace v2
61
}
// namespace security
62
}
// namespace ndn
ndn::security::v2::CertificateFetcherFromNetwork
Fetch missing keys from the network.
Definition:
certificate-fetcher-from-network.hpp:39
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::security::v2::CertificateFetcherDirectFetch::CertificateFetcherDirectFetch
CertificateFetcherDirectFetch(Face &face)
Definition:
certificate-fetcher-direct-fetch.cpp:30
ndn::Interest::refreshNonce
void refreshNonce()
Refresh nonce.
Definition:
interest.cpp:318
ndn::Interest
represents an Interest packet
Definition:
interest.hpp:42
ndn::security::v2::CertificateFetcher::ValidationContinuation
std::function< void(const Certificate &cert, const shared_ptr< ValidationState > &state)> ValidationContinuation
Definition:
certificate-fetcher.hpp:43
ndn::TagHost::setTag
void setTag(shared_ptr< T > tag) const
set a tag item
Definition:
tag-host.hpp:80
websocketpp::transport::asio::socket::error::security
Catch-all error for security policy errors that don't fit in other categories.
Definition:
base.hpp:79
ndn::security::v2::CertificateFetcherDirectFetch::doFetch
void doFetch(const shared_ptr< CertificateRequest > &keyRequest, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation) override
Asynchronous certificate fetching implementation.
Definition:
certificate-fetcher-direct-fetch.cpp:36
ndn::SimpleTag
provides a tag type for simple types
Definition:
tag.hpp:58
tags.hpp
ndn::security::v2::InterestValidationState
Validation state for an interest packet.
Definition:
validation-state.hpp:204
ndn::Face
Provide a communication channel with local or remote NDN forwarder.
Definition:
face.hpp:95
ndn::security::v2::CertificateFetcherFromNetwork::m_face
Face & m_face
Definition:
certificate-fetcher-from-network.hpp:81
face
certificate-fetcher-direct-fetch.hpp
ndn::TagHost::getTag
shared_ptr< T > getTag() const
get a tag item
Definition:
tag-host.hpp:67
ndn::Face::expressInterest
const PendingInterestId * expressInterest(const Interest &interest, const DataCallback &afterSatisfied, const NackCallback &afterNacked, const TimeoutCallback &afterTimeout)
Express Interest.
Definition:
face.cpp:144
ndn::SimpleTag::get
const T & get() const
Definition:
tag.hpp:86
ndn::security::v2::InterestValidationState::getOriginalInterest
const Interest & getOriginalInterest() const
Definition:
validation-state.cpp:201
ndn::security::v2::CertificateFetcherFromNetwork::doFetch
void doFetch(const shared_ptr< CertificateRequest > &certRequest, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation) override
Asynchronous certificate fetching implementation.
Definition:
certificate-fetcher-from-network.cpp:41
ndnSIM
ndn-cxx
src
security
v2
certificate-fetcher-direct-fetch.cpp
Generated on Thu Nov 2 2017 03:30:28 for ndnSIM by
1.8.11