blob: ab3c08a47ffceaf8c8357a6b94d9cde7fbe22dc3 [file] [log] [blame]
Steve DiBenedetto471c0602014-02-18 12:32:00 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
3 * Copyright (C) 2014 Named Data Networking Project
4 * See COPYING for copyright and distribution information.
5 */
6
7#ifndef NFD_MGMT_LOCAL_CONTROL_HEADER_MANAGER_HPP
8#define NFD_MGMT_LOCAL_CONTROL_HEADER_MANAGER_HPP
9
10#include "common.hpp"
11#include "face/face.hpp"
12#include "mgmt/app-face.hpp"
13#include "mgmt/manager-base.hpp"
14
15namespace nfd {
16
17class LocalControlHeaderManager : public ManagerBase
18{
19public:
20 LocalControlHeaderManager(function<shared_ptr<Face>(FaceId)> getFace,
21 shared_ptr<AppFace> face);
22
23 void
24 onLocalControlHeaderRequest(const Interest& request);
25
26
27private:
28 function<shared_ptr<Face>(FaceId)> m_getFace;
29
30 static const Name COMMAND_PREFIX; // /localhost/nfd/control-header
31
32 // number of components in an invalid, but not malformed, unsigned command.
33 // (/localhost/nfd/control-headeer + control-module + verb) = 5
34 static const size_t COMMAND_UNSIGNED_NCOMPS;
35
36 // number of components in a valid signed Interest.
37 // 5 in mock (see UNSIGNED_NCOMPS)
38 static const size_t COMMAND_SIGNED_NCOMPS;
39};
40
41} // namespace nfd
42
43#endif // NFD_MGMT_LOCAL_CONTROL_HEADER_MANAGER_HPP
44
45
46