mgmt, main: add support for authorized commands
refs: #1227
Change-Id: I907d1fa6e78775470c5376fcdfe898be4c311001
diff --git a/daemon/mgmt/local-control-header-manager.hpp b/daemon/mgmt/local-control-header-manager.hpp
index 8c03e4e..0aa5d63 100644
--- a/daemon/mgmt/local-control-header-manager.hpp
+++ b/daemon/mgmt/local-control-header-manager.hpp
@@ -14,26 +14,31 @@
namespace nfd {
+const std::string CONTROL_HEADER_PRIVILEGE = "control-header"; // config file privilege name
+
class LocalControlHeaderManager : public ManagerBase
{
public:
LocalControlHeaderManager(function<shared_ptr<Face>(FaceId)> getFace,
- shared_ptr<AppFace> face);
+ shared_ptr<InternalFace> face);
void
onLocalControlHeaderRequest(const Interest& request);
+ void
+ onCommandValidated(const shared_ptr<const Interest>& command);
+
private:
function<shared_ptr<Face>(FaceId)> m_getFace;
static const Name COMMAND_PREFIX; // /localhost/nfd/control-header
// number of components in an invalid, but not malformed, unsigned command.
- // (/localhost/nfd/control-headeer + control-module + verb) = 5
+ // (/localhost/nfd/control-header + control-module + verb) = 5
static const size_t COMMAND_UNSIGNED_NCOMPS;
// number of components in a valid signed Interest.
- // 5 in mock (see UNSIGNED_NCOMPS)
+ // UNSIGNED_NCOMPS + 4 command Interest components = 9
static const size_t COMMAND_SIGNED_NCOMPS;
};