2 * mdata.c - buffer metadata change tracker vpp-api-test plug-in
4 * Copyright (c) 2019 Cisco and/or its affiliates.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at:
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 #include <vlibapi/api.h>
19 #include <vlibmemory/api.h>
20 #include <vppinfra/error.h>
23 #define __plugin_msg_base mdata_test_main.msg_id_base
24 #include <vlibapi/vat_helper_macros.h>
26 /* Declare message IDs */
27 #include <mdata/mdata.api_enum.h>
28 #include <mdata/mdata.api_types.h>
32 /* API message ID base */
37 mdata_test_main_t mdata_test_main;
40 api_mdata_enable_disable (vat_main_t * vam)
42 unformat_input_t *i = vam->input;
43 int enable_disable = 1;
44 vl_api_mdata_enable_disable_t *mp;
47 /* Parse args required to build the message */
48 while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
50 if (unformat (i, "disable"))
56 /* Construct the API message */
57 M (MDATA_ENABLE_DISABLE, mp);
58 mp->enable_disable = enable_disable;
63 /* Wait for a reply... */
69 * List of messages that the mdata test plugin sends,
70 * and that the data plane plugin processes
72 #include <mdata/mdata.api_test.c>
75 * fd.io coding-style-patch-verification: ON
78 * eval: (c-set-style "gnu")