ip: Replace Sematics for Interface IP addresses
[vpp.git] / src / plugins / builtinurl / builtinurl_test.c
1 /*
2  * builtinurl.c - skeleton vpp-api-test plug-in
3  *
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:
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
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.
16  */
17 #include <vat/vat.h>
18 #include <vlibapi/api.h>
19 #include <vlibmemory/api.h>
20 #include <vppinfra/error.h>
21 #include <stdbool.h>
22
23 uword unformat_sw_if_index (unformat_input_t * input, va_list * args);
24
25 /* Declare message IDs */
26 #include <builtinurl/builtinurl.api_enum.h>
27 #include <builtinurl/builtinurl.api_types.h>
28
29 typedef struct
30 {
31   /* API message ID base */
32   u16 msg_id_base;
33   vat_main_t *vat_main;
34 } builtinurl_test_main_t;
35
36 builtinurl_test_main_t builtinurl_test_main;
37
38 #define __plugin_msg_base builtinurl_test_main.msg_id_base
39 #include <vlibapi/vat_helper_macros.h>
40
41 static int
42 api_builtinurl_enable (vat_main_t * vam)
43 {
44   vl_api_builtinurl_enable_t *mp;
45   int ret;
46
47   /* Construct the API message */
48   M (BUILTINURL_ENABLE, mp);
49
50   /* send it... */
51   S (mp);
52
53   /* Wait for a reply... */
54   W (ret);
55   return ret;
56 }
57
58 #include <builtinurl/builtinurl.api_test.c>
59
60 /*
61  * fd.io coding-style-patch-verification: ON
62  *
63  * Local Variables:
64  * eval: (c-set-style "gnu")
65  * End:
66  */