NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::security::v2::CertificateFetcherFromNetwork Class Reference

Fetch missing keys from the network. More...

#include <certificate-fetcher-from-network.hpp>

Inheritance diagram for ndn::security::v2::CertificateFetcherFromNetwork:
Collaboration diagram for ndn::security::v2::CertificateFetcherFromNetwork:

Public Member Functions

 CertificateFetcherFromNetwork (Face &face)
 
- Public Member Functions inherited from ndn::security::v2::CertificateFetcher
 CertificateFetcher ()
 
virtual ~CertificateFetcher ()
 
virtual void setCertificateStorage (CertificateStorage &certStorage)
 Assign certificate storage to check known certificate and to cache unverified ones. More...
 
void fetch (const shared_ptr< CertificateRequest > &certRequest, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation)
 Asynchronously fetch certificate. More...
 

Protected Member Functions

void doFetch (const shared_ptr< CertificateRequest > &certRequest, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation) override
 Asynchronous certificate fetching implementation. More...
 
void dataCallback (const Data &data, const shared_ptr< CertificateRequest > &certRequest, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation)
 Callback invoked when certificate is retrieved. More...
 
void nackCallback (const lp::Nack &nack, const shared_ptr< CertificateRequest > &certRequest, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation)
 Callback invoked when interest for fetching certificate gets NACKed. More...
 
void timeoutCallback (const shared_ptr< CertificateRequest > &certRequest, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation)
 Callback invoked when interest for fetching certificate times out. More...
 

Protected Attributes

Facem_face
 
Scheduler m_scheduler
 
- Protected Attributes inherited from ndn::security::v2::CertificateFetcher
CertificateStoragem_certStorage
 

Additional Inherited Members

- Public Types inherited from ndn::security::v2::CertificateFetcher
using ValidationContinuation = std::function< void(const Certificate &cert, const shared_ptr< ValidationState > &state)>
 

Detailed Description

Fetch missing keys from the network.

Definition at line 40 of file certificate-fetcher-from-network.hpp.

Constructor & Destructor Documentation

◆ CertificateFetcherFromNetwork()

ndn::security::v2::CertificateFetcherFromNetwork::CertificateFetcherFromNetwork ( Face face)
explicit

Definition at line 35 of file certificate-fetcher-from-network.cpp.

Member Function Documentation

◆ doFetch()

void ndn::security::v2::CertificateFetcherFromNetwork::doFetch ( const shared_ptr< CertificateRequest > &  certRequest,
const shared_ptr< ValidationState > &  state,
const ValidationContinuation continueValidation 
)
overrideprotectedvirtual

Asynchronous certificate fetching implementation.

Implements ndn::security::v2::CertificateFetcher.

Definition at line 42 of file certificate-fetcher-from-network.cpp.

References ndn::Face::expressInterest(), and m_face.

Referenced by ndn::security::v2::CertificateFetcherDirectFetch::doFetch().

◆ dataCallback()

void ndn::security::v2::CertificateFetcherFromNetwork::dataCallback ( const Data data,
const shared_ptr< CertificateRequest > &  certRequest,
const shared_ptr< ValidationState > &  state,
const ValidationContinuation continueValidation 
)
protected

Callback invoked when certificate is retrieved.

Definition at line 59 of file certificate-fetcher-from-network.cpp.

References ndn::Data::getName(), and NDN_LOG_DEBUG_DEPTH.

Referenced by ndn::security::v2::CertificateFetcherDirectFetch::doFetch().

◆ nackCallback()

void ndn::security::v2::CertificateFetcherFromNetwork::nackCallback ( const lp::Nack nack,
const shared_ptr< CertificateRequest > &  certRequest,
const shared_ptr< ValidationState > &  state,
const ValidationContinuation continueValidation 
)
protected

Callback invoked when interest for fetching certificate gets NACKed.

Retries with exponential backoff while certRequest->nRetriesLeft > 0

Definition at line 78 of file certificate-fetcher-from-network.cpp.

References ndn::lp::Nack::getReason(), m_scheduler, NDN_LOG_DEBUG_DEPTH, and ndn::scheduler::Scheduler::schedule().

Referenced by ndn::security::v2::CertificateFetcherDirectFetch::doFetch().

◆ timeoutCallback()

void ndn::security::v2::CertificateFetcherFromNetwork::timeoutCallback ( const shared_ptr< CertificateRequest > &  certRequest,
const shared_ptr< ValidationState > &  state,
const ValidationContinuation continueValidation 
)
protected

Callback invoked when interest for fetching certificate times out.

It will retry if certRequest->nRetriesLeft > 0

Definition at line 99 of file certificate-fetcher-from-network.cpp.

References ndn::security::v2::CertificateFetcher::fetch(), and NDN_LOG_DEBUG_DEPTH.

Referenced by ndn::security::v2::CertificateFetcherDirectFetch::doFetch().

Member Data Documentation

◆ m_face

Face& ndn::security::v2::CertificateFetcherFromNetwork::m_face
protected

◆ m_scheduler

Scheduler ndn::security::v2::CertificateFetcherFromNetwork::m_scheduler
protected

Definition at line 80 of file certificate-fetcher-from-network.hpp.

Referenced by nackCallback().


The documentation for this class was generated from the following files: