NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
validation-request.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
24 #ifndef NDN_SECURITY_VALIDATION_REQUEST_HPP
25 #define NDN_SECURITY_VALIDATION_REQUEST_HPP
26 
27 #include "../interest.hpp"
28 
29 namespace ndn {
31 typedef function<void(const shared_ptr<const Interest>&)> OnInterestValidated;
32 
34 typedef function<void(const shared_ptr<const Interest>&,
35  const std::string&)> OnInterestValidationFailed;
36 
38 typedef function<void(const shared_ptr<const Data>&)> OnDataValidated;
39 
41 typedef function<void(const shared_ptr<const Data>&,
42  const std::string&)> OnDataValidationFailed;
43 
54 {
55 public:
56  ValidationRequest(const Interest& interest,
57  const OnDataValidated& onDataValidated,
58  const OnDataValidationFailed& onDataValidationFailed,
59  int nRetries, int nSteps)
60  : m_interest(interest)
61  , m_onDataValidated(onDataValidated)
62  , m_onDataValidationFailed(onDataValidationFailed)
63  , m_nRetries(nRetries)
64  , m_nSteps(nSteps)
65  {
66  }
67 
68  virtual
70  {
71  }
72 
82  int m_nSteps;
83 };
84 
85 } // namespace ndn
86 
87 #endif //NDN_SECURITY_VALIDATION_REQUEST_HPP
Copyright (c) 2011-2015 Regents of the University of California.
ValidationRequest contains information related to further validation.
represents an Interest packet
Definition: interest.hpp:45
OnDataValidationFailed m_onDataValidationFailed
callback when the retrieved certificate cannot be authenticated.
ValidationRequest(const Interest &interest, const OnDataValidated &onDataValidated, const OnDataValidationFailed &onDataValidationFailed, int nRetries, int nSteps)
function< void(const shared_ptr< const Data > &)> OnDataValidated
Callback to report a successful Data validation.
function< void(const shared_ptr< const Data > &, const std::string &)> OnDataValidationFailed
Callback to report a failed Data validation.
int m_nRetries
the number of retries when the interest times out.
Interest m_interest
the Interest for the requested data/certificate.
function< void(const shared_ptr< const Interest > &, const std::string &)> OnInterestValidationFailed
Callback to report a failed Interest validation.
int m_nSteps
the number of validation steps that have been performed.
function< void(const shared_ptr< const Interest > &)> OnInterestValidated
Callback to report a successful Interest validation.
OnDataValidated m_onDataValidated
callback when the retrieved certificate is authenticated.