26 #ifndef NFD_DAEMON_MGMT_FACE_MANAGER_HPP
27 #define NFD_DAEMON_MGMT_FACE_MANAGER_HPP
30 #include <ndn-cxx/mgmt/nfd/face-status.hpp>
31 #include <ndn-cxx/mgmt/nfd/face-query-filter.hpp>
37 class NetworkInterfaceInfo;
38 class ProtocolFactory;
48 Dispatcher& dispatcher,
59 createFace(
const Name& topPrefix,
const Interest& interest,
60 const ControlParameters& parameters,
61 const ndn::mgmt::CommandContinuation& done);
64 updateFace(
const Name& topPrefix,
const Interest& interest,
65 const ControlParameters& parameters,
66 const ndn::mgmt::CommandContinuation& done);
69 destroyFace(
const Name& topPrefix,
const Interest& interest,
70 const ControlParameters& parameters,
71 const ndn::mgmt::CommandContinuation& done);
77 enableLocalControl(
const Name& topPrefix,
const Interest& interest,
78 const ControlParameters& parameters,
79 const ndn::mgmt::CommandContinuation& done);
85 disableLocalControl(
const Name& topPrefix,
const Interest& interest,
86 const ControlParameters& parameters,
87 const ndn::mgmt::CommandContinuation& done);
91 afterCreateFaceSuccess(
const ControlParameters& parameters,
92 const shared_ptr<Face>& newFace,
93 const ndn::mgmt::CommandContinuation& done);
96 afterCreateFaceFailure(uint32_t status,
97 const std::string& reason,
98 const ndn::mgmt::CommandContinuation& done);
101 findFaceForLocalControl(
const Interest& request,
102 const ControlParameters& parameters,
103 const ndn::mgmt::CommandContinuation& done);
106 setLinkServiceOptions(Face& face,
107 const ControlParameters& parameters,
108 ControlParameters& response);
112 listFaces(
const Name& topPrefix,
const Interest& interest,
113 ndn::mgmt::StatusDatasetContext& context);
116 listChannels(
const Name& topPrefix,
const Interest& interest,
117 ndn::mgmt::StatusDatasetContext& context);
120 queryFaces(
const Name& topPrefix,
const Interest& interest,
121 ndn::mgmt::StatusDatasetContext& context);
125 matchFilter(
const ndn::nfd::FaceQueryFilter& filter,
const Face& face);
129 static ndn::nfd::FaceStatus
130 collectFaceStatus(
const Face& face,
const time::steady_clock::TimePoint& now);
135 template<
typename FaceTraits>
137 collectFaceProperties(
const Face& face, FaceTraits& traits);
141 notifyAddFace(
const Face& face);
144 notifyRemoveFace(
const Face& face);
148 processConfig(
const ConfigSection& configSection,
bool isDryRun,
149 const std::string& filename);
152 processSectionUnix(
const ConfigSection& configSection,
bool isDryRun);
155 processSectionTcp(
const ConfigSection& configSection,
bool isDryRun);
158 processSectionUdp(
const ConfigSection& configSection,
bool isDryRun,
159 const std::vector<NetworkInterfaceInfo>& nicList);
162 processSectionEther(
const ConfigSection& configSection,
bool isDryRun,
163 const std::vector<NetworkInterfaceInfo>& nicList);
166 processSectionWebSocket(
const ConfigSection& configSection,
bool isDryRun);
169 std::map<std::string , shared_ptr<ProtocolFactory>> m_factories;
173 ndn::mgmt::PostNotification m_postNotification;
174 signal::ScopedConnection m_faceAddConn;
175 signal::ScopedConnection m_faceRemoveConn;
180 #endif // NFD_DAEMON_MGMT_FACE_MANAGER_HPP
configuration file parsing utility
implement the Face Management of NFD Management Protocol.
provides ControlCommand authorization according to NFD configuration file
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
a collection of common functions shared by all NFD managers, such as communicating with the dispatche...
boost::property_tree::ptree ConfigSection
void setConfigFile(ConfigFile &configFile)
Subscribe to face_system section for the config file.
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE
FaceManager(FaceTable &faceTable, Dispatcher &dispatcher, CommandAuthenticator &authenticator)