1 /* Hey Emacs use -*- mode: C -*- */
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 This file defines the vpp control-plane API messages
19 used to control the ABF plugin
22 option version = "1.0.0";
23 import "vnet/ip/ip_types.api";
24 import "vnet/fib/fib_types.api";
25 import "vnet/interface_types.api";
27 /** \brief Get the plugin version
28 @param client_index - opaque cookie to identify the sender
29 @param context - sender context, to match reply w/ request
31 define abf_plugin_get_version
33 option status="in_progress";
38 /** \brief Reply to get the plugin version
39 @param context - returned sender context, to match reply w/ request
40 @param major - Incremented every time a known breaking behavior change is introduced
41 @param minor - Incremented with small changes, may be used to avoid buggy versions
43 define abf_plugin_get_version_reply
45 option status="in_progress";
51 /** \brief A description of an ABF policy
52 @param policy_id User chosen Identifier for the policy
53 @param acl_index The ACL that the policy will match against
54 @param n_paths Number of paths
55 @param paths The set of forwarding paths that are being added or removed.
62 vl_api_fib_path_t paths[n_paths];
65 /** \brief A description of an ABF policy
66 @param is_add Is this the addition or removal of paths from the policy
67 If the policy does not exist it is created. If the last path
68 Is being removed, the policy is deleted
69 @param policy The policy
71 autoreply define abf_policy_add_del
73 option status="in_progress";
77 vl_api_abf_policy_t policy;
80 /** \brief Policy description returned in the dump
82 define abf_policy_details
84 option status="in_progress";
86 vl_api_abf_policy_t policy;
89 /** \brief Dump all ABF policies
91 define abf_policy_dump
93 option status="in_progress";
98 /** \brief A description of a policy attachment to an interface
99 @param The policy ID to attach
100 @param sw_if_index The interface to attach to
101 @param priority The priority of the attachment, w.r.t. to other attachments
102 on this interface. lower value is 'better'
103 @param is_ipv6 Does this attachment apply to IPv6 packets (or IPv4)
105 typedef abf_itf_attach
108 vl_api_interface_index_t sw_if_index;
113 /** \brief Add or delete a policy attachment to an interface
115 autoreply define abf_itf_attach_add_del
117 option status="in_progress";
121 vl_api_abf_itf_attach_t attach;
124 /** \brief Attachment details from a dump
126 define abf_itf_attach_details
128 option status="in_progress";
130 vl_api_abf_itf_attach_t attach;
133 /** \brief Dump all the policy attachments
135 define abf_itf_attach_dump
137 option status="in_progress";