NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: 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
namespace
security
{
33
40
class
CertificateCacheTtl
:
public
CertificateCache
41
{
42
public
:
43
explicit
44
CertificateCacheTtl
(boost::asio::io_service& io,
45
const
time::seconds& defaultTtl = time::seconds(3600));
46
47
virtual
48
~CertificateCacheTtl
();
49
50
virtual
void
51
insertCertificate
(shared_ptr<const v1::IdentityCertificate> certificate);
52
53
virtual
shared_ptr<const v1::IdentityCertificate>
54
getCertificate
(
const
Name
& certificateNameWithoutVersion);
55
56
virtual
void
57
reset
();
58
59
virtual
size_t
60
getSize
();
61
62
private
:
63
void
64
insert(shared_ptr<const v1::IdentityCertificate> certificate);
65
66
void
67
remove
(
const
Name
& certificateName);
68
69
void
70
removeAll();
71
72
protected
:
73
typedef
std::map<Name, std::pair<shared_ptr<const v1::IdentityCertificate>,
EventId
> >
Cache
;
74
75
time::seconds
m_defaultTtl
;
76
Cache
m_cache
;
77
Scheduler
m_scheduler
;
78
};
79
80
}
// namespace security
81
82
using
security::CertificateCacheTtl
;
83
84
}
// namespace ndn
85
86
#endif // NDN_SECURITY_CERTIFICATE_CACHE_TTL_HPP
ndn::security::CertificateCacheTtl::m_scheduler
Scheduler m_scheduler
Definition:
certificate-cache-ttl.hpp:77
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::security::CertificateCacheTtl::CertificateCacheTtl
CertificateCacheTtl(boost::asio::io_service &io, const time::seconds &defaultTtl=time::seconds(3600))
Definition:
certificate-cache-ttl.cpp:29
certificate-cache.hpp
ndn::security::CertificateCacheTtl::Cache
std::map< Name, std::pair< shared_ptr< const v1::IdentityCertificate >, EventId > > Cache
Definition:
certificate-cache-ttl.hpp:73
ndn::security::CertificateCacheTtl::insertCertificate
virtual void insertCertificate(shared_ptr< const v1::IdentityCertificate > certificate)
Definition:
certificate-cache-ttl.cpp:41
ndn::security::CertificateCacheTtl
Cache of validated certificates with freshness-based eviction policy.
Definition:
certificate-cache-ttl.hpp:40
ndn::security::CertificateCacheTtl::getSize
virtual size_t getSize()
Definition:
certificate-cache-ttl.cpp:63
ndn::util::scheduler::EventId
std::shared_ptr< ns3::EventId > EventId
Definition:
scheduler.hpp:39
ndn::security::CertificateCacheTtl::m_cache
Cache m_cache
Definition:
certificate-cache-ttl.hpp:76
ndn::security::CertificateCacheTtl::reset
virtual void reset()
Definition:
certificate-cache-ttl.cpp:57
ndn::security::CertificateCacheTtl::~CertificateCacheTtl
virtual ~CertificateCacheTtl()
Definition:
certificate-cache-ttl.cpp:36
ndn::Name
Name abstraction to represent an absolute name.
Definition:
name.hpp:46
ndn::security::CertificateCacheTtl::getCertificate
virtual shared_ptr< const v1::IdentityCertificate > getCertificate(const Name &certificateNameWithoutVersion)
Definition:
certificate-cache-ttl.cpp:47
ndn::security::CertificateCache
Interface for the cache of validated certificates.
Definition:
certificate-cache.hpp:36
ndn::security::CertificateCacheTtl::m_defaultTtl
time::seconds m_defaultTtl
Definition:
certificate-cache-ttl.hpp:75
security
ndnSIM
ndn-cxx
src
security
certificate-cache-ttl.hpp
Generated on Wed Jan 11 2017 18:17:14 for ndnSIM by
1.8.13