NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
status-server.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26 #ifndef NFD_DAEMON_MGMT_STATUS_SERVER_HPP
27 #define NFD_DAEMON_MGMT_STATUS_SERVER_HPP
28 
29 #include "mgmt/app-face.hpp"
30 #include <ndn-cxx/management/nfd-forwarder-status.hpp>
31 
32 namespace nfd {
33 
34 class Forwarder;
35 
36 class StatusServer : noncopyable
37 {
38 public:
39  StatusServer(shared_ptr<AppFace> face, Forwarder& forwarder, ndn::KeyChain& keyChain);
40 
41 private:
42  void
43  onInterest(const Interest& interest) const;
44 
45  shared_ptr<ndn::nfd::ForwarderStatus>
46  collectStatus() const;
47 
48 private:
49  static const Name DATASET_PREFIX;
50  static const time::milliseconds RESPONSE_FRESHNESS;
51 
52  shared_ptr<AppFace> m_face;
53  Forwarder& m_forwarder;
54  time::system_clock::TimePoint m_startTimestamp;
55  ndn::KeyChain& m_keyChain;
56 };
57 
58 } // namespace nfd
59 
60 #endif // NFD_DAEMON_MGMT_STATUS_SERVER_HPP
StatusServer(shared_ptr< AppFace > face, Forwarder &forwarder, ndn::KeyChain &keyChain)
main class of NFD
Definition: forwarder.hpp:54
represents an Interest packet
Definition: interest.hpp:45
Copyright (c) 2011-2015 Regents of the University of California.
Definition: ndn-common.hpp:38
Name abstraction to represent an absolute name.
Definition: name.hpp:46
Forwarder
Definition: forwarder.cpp:38
time_point TimePoint
Definition: time.hpp:78