41 m_wantDirectInterestOnly = wantDirectInterestOnly;
46 const shared_ptr<ValidationState>& state,
49 uint64_t incomingFaceId = 0;
50 auto interestState = dynamic_pointer_cast<InterestValidationState>(state);
51 if (interestState !=
nullptr) {
53 if (incomingFaceIdTag !=
nullptr) {
54 incomingFaceId = incomingFaceIdTag->
get();
58 auto dataState = dynamic_pointer_cast<DataValidationState>(state);
60 if (incomingFaceIdTag !=
nullptr) {
61 incomingFaceId = incomingFaceIdTag->
get();
65 if (incomingFaceId != 0) {
66 Interest directInterest(keyRequest->interest);
68 directInterest.
setTag(make_shared<lp::NextHopFaceIdTag>(incomingFaceId));
70 if (!m_wantDirectInterestOnly) {
77 dataCallback(data, keyRequest, state, continueValidation);
80 nackCallback(nack, keyRequest, state, continueValidation);
88 if (!m_wantDirectInterestOnly) {
92 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(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 doFetch(const shared_ptr< CertificateRequest > &certRequest, const shared_ptr< ValidationState > &state, const ValidationContinuation &continueValidation) override
Asynchronous certificate fetching implementation.
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.
std::function< void(const Certificate &cert, const shared_ptr< ValidationState > &state)> ValidationContinuation
@ CANNOT_RETRIEVE_CERT
The certificate cannot be retrieved.