2 * Copyright (c) 2016 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 *------------------------------------------------------------------
17 * vxlan_gpe_ioam_export_test.c - test harness plugin
18 *------------------------------------------------------------------
22 #include <vlibapi/api.h>
23 #include <vlibmemory/api.h>
24 #include <vppinfra/error.h>
25 #include <vnet/format_fns.h>
27 #define __plugin_msg_base vxlan_gpe_ioam_export_test_main.msg_id_base
28 #include <vlibapi/vat_helper_macros.h>
30 /* Declare message IDs */
31 #include <ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.api_enum.h>
32 #include <ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.api_types.h>
36 /* API message ID base */
39 } vxlan_gpe_ioam_export_test_main_t;
41 vxlan_gpe_ioam_export_test_main_t vxlan_gpe_ioam_export_test_main;
44 api_vxlan_gpe_ioam_export_enable_disable (vat_main_t * vam)
46 unformat_input_t *i = vam->input;
48 vl_api_vxlan_gpe_ioam_export_enable_disable_t *mp;
51 /* Parse args required to build the message */
52 while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
54 if (unformat (i, "disable"))
60 /* Construct the API message */
61 M (VXLAN_GPE_IOAM_EXPORT_ENABLE_DISABLE, mp);
62 mp->is_disable = is_disable;
67 /* Wait for a reply... */
72 /* Override generated plugin register symbol */
73 #define vat_plugin_register vxlan_gpe_ioam_export_vat_plugin_register
74 #include <ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.api_test.c>
77 * fd.io coding-style-patch-verification: ON
80 * eval: (c-set-style "gnu")