1 ;;; plugin-api-skel.el - vpp engine plug-in "all-apih.c" skeleton
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:
8 ;;; http://www.apache.org/licenses/LICENSE-2.0
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.
18 (define-skeleton skel-plugin-api
19 "Insert a plug-in '<name>.api' skeleton "
21 '(if (not (boundp 'plugin-name))
22 (setq plugin-name (read-string "Plugin name: ")))
23 '(setq PLUGIN-NAME (upcase plugin-name))
25 * " plugin-name ".api - binary API skeleton
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:
32 * http://www.apache.org/licenses/LICENSE-2.0
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.
42 * @file " plugin-name ".api
43 * @brief VPP control-plane API messages.
45 * This file defines VPP control-plane binary API messages which are generally
46 * called through a shared memory interface.
49 /* Version and type recitations */
51 option version = \"0.1.0\";
52 import \"vnet/interface_types.api\";
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
62 autoreply define " plugin-name "_enable_disable {
63 /* Client identifier, set from api_main.my_client_index */
66 /* Arbitrary context, so client can match reply to request */
69 /* Enable / disable the feature */
72 /* Interface handle */
73 vl_api_interface_index_t sw_if_index;