39 m_wantDirectInterestOnly = wantDirectInterestOnly;
44 const shared_ptr<ValidationState>& state,
47 uint64_t incomingFaceId = 0;
48 auto interestState = std::dynamic_pointer_cast<InterestValidationState>(state);
49 if (interestState !=
nullptr) {
51 if (incomingFaceIdTag !=
nullptr) {
52 incomingFaceId = incomingFaceIdTag->
get();
56 auto dataState = std::dynamic_pointer_cast<DataValidationState>(state);
58 if (incomingFaceIdTag !=
nullptr) {
59 incomingFaceId = incomingFaceIdTag->
get();
63 if (incomingFaceId != 0) {
64 Interest directInterest(keyRequest->interest);
66 directInterest.
setTag(make_shared<lp::NextHopFaceIdTag>(incomingFaceId));
68 if (!m_wantDirectInterestOnly) {
75 dataCallback(data, keyRequest, state, continueValidation);
78 nackCallback(nack, keyRequest, state, continueValidation);
86 if (!m_wantDirectInterestOnly) {
90 else if (incomingFaceId == 0) {
Represents a Data packet.
Provide a communication channel with local or remote NDN forwarder.
PendingInterestHandle expressInterest(const Interest &interest, const DataCallback &afterSatisfied, const NackCallback &afterNacked, const TimeoutCallback &afterTimeout)
Express an Interest.
Represents an Interest packet.
void refreshNonce()
Change nonce value.
Provides a tag type for simple types.
constexpr const T & get() const noexcept
Returns the enclosed value.
void setTag(std::shared_ptr< T > tag) const
Set (add or replace) a tag item.
Represents a Network Nack.
void setSendDirectInterestOnly(bool wantDirectInterestOnly)
If wantDirectInterestOnly, only the direct Interest will be sent out.
void doFetch(const shared_ptr< CertificateRequest > &keyRequest, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation) override
Asynchronous certificate fetching implementation.
CertificateFetcherDirectFetch(Face &face)
Fetch missing keys from the network.
void dataCallback(const Data &data, const shared_ptr< CertificateRequest > &certRequest, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation)
Callback invoked when certificate is retrieved.
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.
void timeoutCallback(const shared_ptr< CertificateRequest > &certRequest, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation)
Callback invoked when interest for fetching certificate times out.
void doFetch(const shared_ptr< CertificateRequest > &certRequest, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation) override
Asynchronous certificate fetching implementation.
std::function< void(const Certificate &cert, const shared_ptr< ValidationState > &state)> ValidationContinuation
@ CANNOT_RETRIEVE_CERT
The certificate cannot be retrieved.
Contains the ndn-cxx security framework.