NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: 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 {
30 namespace security {
31 
33 typedef function<void(const shared_ptr<const Interest>&)> OnInterestValidated;
34 
36 typedef function<void(const shared_ptr<const Interest>&,
37  const std::string&)> OnInterestValidationFailed;
38 
40 typedef function<void(const shared_ptr<const Data>&)> OnDataValidated;
41 
43 typedef function<void(const shared_ptr<const Data>&,
44  const std::string&)> OnDataValidationFailed;
45 
56 {
57 public:
58  ValidationRequest(const Interest& interest,
59  const OnDataValidated& onDataValidated,
60  const OnDataValidationFailed& onDataValidationFailed,
61  int nRetries, int nSteps)
62  : m_interest(interest)
63  , m_onDataValidated(onDataValidated)
64  , m_onDataValidationFailed(onDataValidationFailed)
65  , m_nRetries(nRetries)
66  , m_nSteps(nSteps)
67  {
68  }
69 
70  virtual
72  {
73  }
74 
84  int m_nSteps;
85 };
86 
87 } // namespace security
88 
94 
95 } // namespace ndn
96 
97 #endif //NDN_SECURITY_VALIDATION_REQUEST_HPP
function< void(const shared_ptr< const Interest > &, const std::string &)> OnInterestValidationFailed
Callback to report a failed Interest validation.
Copyright (c) 2011-2015 Regents of the University of California.
Interest m_interest
the Interest for the requested data/certificate.
ValidationRequest(const Interest &interest, const OnDataValidated &onDataValidated, const OnDataValidationFailed &onDataValidationFailed, int nRetries, int nSteps)
represents an Interest packet
Definition: interest.hpp:42
ValidationRequest contains information related to further validation.
int m_nRetries
the number of retries when the interest times out.
function< void(const shared_ptr< const Data > &, const std::string &)> OnDataValidationFailed
Callback to report a failed Data validation.
function< void(const shared_ptr< const Data > &)> OnDataValidated
Callback to report a successful Data validation.
function< void(const shared_ptr< const Interest > &)> OnInterestValidated
Callback to report a successful Interest validation.
int m_nSteps
the number of validation steps that have been performed.
OnDataValidationFailed m_onDataValidationFailed
callback when the retrieved certificate cannot be authenticated.
OnDataValidated m_onDataValidated
callback when the retrieved certificate is authenticated.