NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
certificate-cache-ttl.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
24
#ifndef NDN_SECURITY_CERTIFICATE_CACHE_TTL_HPP
25
#define NDN_SECURITY_CERTIFICATE_CACHE_TTL_HPP
26
27
#include "../common.hpp"
28
#include "
certificate-cache.hpp
"
29
#include "../util/scheduler.hpp"
30
31
namespace
ndn
{
32
39
class
CertificateCacheTtl
:
public
CertificateCache
40
{
41
public
:
42
explicit
43
CertificateCacheTtl
(boost::asio::io_service& io,
44
const
time::seconds& defaultTtl = time::seconds(3600));
45
46
virtual
47
~CertificateCacheTtl
();
48
49
virtual
void
50
insertCertificate
(shared_ptr<const IdentityCertificate> certificate);
51
52
virtual
shared_ptr<const IdentityCertificate>
53
getCertificate
(
const
Name
& certificateNameWithoutVersion);
54
55
virtual
void
56
reset
();
57
58
virtual
size_t
59
getSize
();
60
61
private
:
62
void
63
insert(shared_ptr<const IdentityCertificate> certificate);
64
65
void
66
remove
(
const
Name
& certificateName);
67
68
void
69
removeAll();
70
71
protected
:
72
typedef
std::map<Name, std::pair<shared_ptr<const IdentityCertificate>,
EventId
> >
Cache
;
73
74
time::seconds
m_defaultTtl
;
75
Cache
m_cache
;
76
Scheduler
m_scheduler
;
77
};
78
79
}
// namespace ndn
80
81
#endif // NDN_SECURITY_CERTIFICATE_CACHE_TTL_HPP
ndn::CertificateCacheTtl
Cache of validated certificates with freshness-based eviction policy.
Definition:
certificate-cache-ttl.hpp:39
ndn::CertificateCacheTtl::reset
virtual void reset()
Definition:
certificate-cache-ttl.cpp:56
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::util::scheduler::Scheduler
Generic scheduler.
Definition:
scheduler.hpp:44
ndn::CertificateCacheTtl::insertCertificate
virtual void insertCertificate(shared_ptr< const IdentityCertificate > certificate)
Definition:
certificate-cache-ttl.cpp:40
certificate-cache.hpp
ndn::CertificateCacheTtl::getSize
virtual size_t getSize()
Definition:
certificate-cache-ttl.cpp:62
ndn::util::scheduler::EventId
std::shared_ptr< ns3::EventId > EventId
Definition:
scheduler.hpp:39
ndn::CertificateCacheTtl::m_cache
Cache m_cache
Definition:
certificate-cache-ttl.hpp:75
ndn::CertificateCacheTtl::~CertificateCacheTtl
virtual ~CertificateCacheTtl()
Definition:
certificate-cache-ttl.cpp:35
ndn::Name
Name abstraction to represent an absolute name.
Definition:
name.hpp:46
ndn::CertificateCacheTtl::getCertificate
virtual shared_ptr< const IdentityCertificate > getCertificate(const Name &certificateNameWithoutVersion)
Definition:
certificate-cache-ttl.cpp:46
ndn::CertificateCacheTtl::Cache
std::map< Name, std::pair< shared_ptr< const IdentityCertificate >, EventId > > Cache
Definition:
certificate-cache-ttl.hpp:72
ndn::CertificateCacheTtl::CertificateCacheTtl
CertificateCacheTtl(boost::asio::io_service &io, const time::seconds &defaultTtl=time::seconds(3600))
Definition:
certificate-cache-ttl.cpp:28
ndn::CertificateCache
Interface for the cache of validated certificates.
Definition:
certificate-cache.hpp:35
ndn::CertificateCacheTtl::m_scheduler
Scheduler m_scheduler
Definition:
certificate-cache-ttl.hpp:76
ndn::CertificateCacheTtl::m_defaultTtl
time::seconds m_defaultTtl
Definition:
certificate-cache-ttl.hpp:74
ndnSIM
ndn-cxx
src
security
certificate-cache-ttl.hpp
Generated on Sat Nov 12 2016 16:02:52 for ndnSIM by
1.8.12