blob: f776ce2a44c6f7f703b9537438990d46de39acc6 [file] [log] [blame]
Dave Barachb852bfa2016-01-04 15:27:42 -05001;;; plugin-api-skel.el - vpp engine plug-in "all-apih.c" skeleton
2;;;
3;;; Copyright (c) 2016 Cisco and/or its affiliates.
4;;; Licensed under the Apache License, Version 2.0 (the "License");
5;;; you may not use this file except in compliance with the License.
6;;; You may obtain a copy of the License at:
7;;;
8;;; http://www.apache.org/licenses/LICENSE-2.0
9;;;
10;;; Unless required by applicable law or agreed to in writing, software
11;;; distributed under the License is distributed on an "AS IS" BASIS,
12;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13;;; See the License for the specific language governing permissions and
14;;; limitations under the License.
15
16(require 'skeleton)
17
Keith Burns (alagalah)ca46d8c2016-03-18 07:22:15 -070018(define-skeleton skel-plugin-api
Dave Barachb852bfa2016-01-04 15:27:42 -050019"Insert a plug-in '<name>.api' skeleton "
20nil
21'(if (not (boundp 'plugin-name))
22 (setq plugin-name (read-string "Plugin name: ")))
23'(setq PLUGIN-NAME (upcase plugin-name))
Dave Barach913f4c92019-05-29 09:59:51 -040024"/*
25 * " plugin-name ".api - binary API skeleton
26 *
27 * Copyright (c) <current-year> <your-organization>
28 * Licensed under the Apache License, Version 2.0 (the \"License\");
29 * you may not use this file except in compliance with the License.
30 * You may obtain a copy of the License at:
31 *
32 * http://www.apache.org/licenses/LICENSE-2.0
33 *
34 * Unless required by applicable law or agreed to in writing, software
35 * distributed under the License is distributed on an \"AS IS\" BASIS,
36 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
37 * See the License for the specific language governing permissions and
38 * limitations under the License.
39 */
Dave Barachb852bfa2016-01-04 15:27:42 -050040
Dave Barach913f4c92019-05-29 09:59:51 -040041/**
42 * @file " plugin-name ".api
43 * @brief VPP control-plane API messages.
44 *
45 * This file defines VPP control-plane binary API messages which are generally
46 * called through a shared memory interface.
47 */
48
49/* Version and type recitations */
50
51option version = \"0.1.0\";
52import \"vnet/interface_types.api\";
53
54
55/** @brief API to enable / disable " plugin-name " on an interface
56 @param client_index - opaque cookie to identify the sender
57 @param context - sender context, to match reply w/ request
58 @param enable_disable - 1 to enable, 0 to disable the feature
59 @param sw_if_index - interface handle
60*/
61
62autoreply define " plugin-name "_enable_disable {
Dave Barachb852bfa2016-01-04 15:27:42 -050063 /* Client identifier, set from api_main.my_client_index */
64 u32 client_index;
65
66 /* Arbitrary context, so client can match reply to request */
67 u32 context;
68
69 /* Enable / disable the feature */
Dave Barach913f4c92019-05-29 09:59:51 -040070 bool enable_disable;
Dave Barachb852bfa2016-01-04 15:27:42 -050071
72 /* Interface handle */
Dave Barach913f4c92019-05-29 09:59:51 -040073 vl_api_interface_index_t sw_if_index;
Dave Barachb852bfa2016-01-04 15:27:42 -050074};
75")