NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
validator-null.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
25 #ifndef NDN_SECURITY_VALIDATOR_NULL_HPP
26 #define NDN_SECURITY_VALIDATOR_NULL_HPP
27 
28 #include "validator.hpp"
29 
30 namespace ndn {
31 namespace security {
32 
33 class ValidatorNull : public Validator
34 {
35 public:
36  virtual
38  {
39  }
40 
41 protected:
42  virtual void
43  checkPolicy(const Data& data,
44  int nSteps,
45  const OnDataValidated& onValidated,
46  const OnDataValidationFailed& onValidationFailed,
47  std::vector<shared_ptr<ValidationRequest> >& nextSteps)
48  {
49  onValidated(data.shared_from_this());
50  }
51 
52  virtual void
53  checkPolicy(const Interest& interest,
54  int nSteps,
55  const OnInterestValidated& onValidated,
56  const OnInterestValidationFailed& onValidationFailed,
57  std::vector<shared_ptr<ValidationRequest> >& nextSteps)
58  {
59  onValidated(interest.shared_from_this());
60  }
61 };
62 
63 } // namespace security
64 
66 
67 } // namespace ndn
68 
69 #endif //NDN_SECURITY_VALIDATOR_NULL_HPP
function< void(const shared_ptr< const Interest > &, const std::string &)> OnInterestValidationFailed
Callback to report a failed Interest validation.
virtual void checkPolicy(const Data &data, int nSteps, const OnDataValidated &onValidated, const OnDataValidationFailed &onValidationFailed, std::vector< shared_ptr< ValidationRequest > > &nextSteps)
Copyright (c) 2011-2015 Regents of the University of California.
represents an Interest packet
Definition: interest.hpp:42
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.
provides the interfaces for packet validation.
Definition: validator.hpp:42
virtual void checkPolicy(const Interest &interest, int nSteps, const OnInterestValidated &onValidated, const OnInterestValidationFailed &onValidationFailed, std::vector< shared_ptr< ValidationRequest > > &nextSteps)
represents a Data packet
Definition: data.hpp:37