2 * Copyright (c) 2023 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 #include <vlib/vlib.h>
17 #include <tracenode/tracenode.h>
18 #include <vlibmemory/api.h>
20 /* define message IDs */
21 #include <tracenode/tracenode.api_enum.h>
22 #include <tracenode/tracenode.api_types.h>
24 #define REPLY_MSG_ID_BASE (tnm->msg_id_base)
25 #include <vlibapi/api_helper_macros.h>
28 vl_api_tracenode_enable_disable_t_handler (
29 vl_api_tracenode_enable_disable_t *mp)
31 tracenode_main_t *tnm = &tracenode_main;
32 vl_api_tracenode_enable_disable_reply_t *rmp;
35 VALIDATE_SW_IF_INDEX (mp);
37 rv = tracenode_feature_enable_disable (ntohl (mp->sw_if_index), mp->is_pcap,
40 BAD_SW_IF_INDEX_LABEL;
42 REPLY_MACRO (VL_API_TRACENODE_ENABLE_DISABLE_REPLY);
45 #include <tracenode/tracenode.api.c>
48 tracenode_plugin_api_hookup (vlib_main_t *vm)
50 tracenode_main_t *tnm = &tracenode_main;
52 /* ask for a correctly-sized block of API message decode slots */
53 tnm->msg_id_base = setup_message_id_table ();
59 * fd.io coding-style-patch-verification: ON
62 * eval: (c-set-style "gnu")