2 * Copyright (c) 2017 Cisco and/or its affiliates.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
16 #ifndef __VOM_INSPECT_H__
17 #define __VOM_INSPECT_H__
28 * A means to inspect the state VPP has built, in total, and per-client
39 * Destructor to tidyup socket resources
44 * handle input from the requester
46 * @param input command
47 * @param output output
49 void handle_input(const std::string& input, std::ostream& output);
52 * inspect command handler Handler
57 command_handler() = default;
58 virtual ~command_handler() = default;
63 virtual void show(std::ostream& os) = 0;
67 * Register a command handler for inspection
69 static void register_handler(const std::vector<std::string>& cmds,
70 const std::string& help,
75 * command handler list
77 static std::unique_ptr<std::map<std::string, command_handler*>>
82 static std::unique_ptr<
83 std::deque<std::pair<std::vector<std::string>, std::string>>>
89 * fd.io coding-style-patch-verification: ON
92 * eval: (c-set-style "mozilla")