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__
26 * A means to inspect the state VPP has built, in total, and per-client
37 * Destructor to tidyup socket resources
42 * handle input from the requester
44 * @param input command
45 * @param output output
47 void handle_input(const std::string& input, std::ostream& output);
50 * inspect command handler Handler
55 command_handler() = default;
56 virtual ~command_handler() = default;
61 virtual void show(std::ostream& os) = 0;
65 * Register a command handler for inspection
67 static void register_handler(const std::vector<std::string>& cmds,
68 const std::string& help,
73 * command handler list
75 static std::unique_ptr<std::map<std::string, command_handler*>>
80 static std::unique_ptr<
81 std::deque<std::pair<std::vector<std::string>, std::string>>>
87 * fd.io coding-style-patch-verification: ON
90 * eval: (c-set-style "mozilla")