abf.api revision 097fa66b
1/* Hey Emacs use -*- mode: C -*- */
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
17/** \file
18    This file defines the vpp control-plane API messages
19    used to control the ABF plugin
20*/
21
22option version = "1.0.0";
23import "vnet/ip/ip_types.api";
24import "vnet/fib/fib_types.api";
25
26/** \brief Get the plugin version
27    @param client_index - opaque cookie to identify the sender
28    @param context - sender context, to match reply w/ request
29*/
30define abf_plugin_get_version
31{
32  u32 client_index;
33  u32 context;
34};
35
36/** \brief Reply to get the plugin version
37    @param context - returned sender context, to match reply w/ request
38    @param major - Incremented every time a known breaking behavior change is introduced
39    @param minor - Incremented with small changes, may be used to avoid buggy versions
40*/
41define abf_plugin_get_version_reply
42{
43  u32 context;
44  u32 major;
45  u32 minor;
46};
47
48/** \brief A description of an ABF policy
49    @param policy_id User chosen Identifier for the policy
50    @param acl_index The ACL that the policy will match against
51    @param n_paths Number of paths
52    @param paths The set of forwarding paths that are being added or removed.
53 */
54typeonly define abf_policy
55{
56  u32 policy_id;
57  u32 acl_index;
58  u8 n_paths;
59  vl_api_fib_path_t paths[n_paths];
60};
61
62/** \brief A description of an ABF policy
63    @param is_add Is this the addition or removal of paths from the policy
64           If the policy does not exist it is created. If the last path
65           Is being removed, the policy is deleted
66    @param policy The policy
67 */
68autoreply define abf_policy_add_del
69{
70  u32 client_index;
71  u32 context;
72  u8 is_add;
73  vl_api_abf_policy_t policy;
74};
75
76/** \brief Policy description returned in the dump
77 */
78define abf_policy_details
79{
80  u32 context;
81  vl_api_abf_policy_t policy;
82};
83
84/** \brief Dump all ABF policies
85 */
86define abf_policy_dump
87{
88  u32 client_index;
89  u32 context;
90};
91
92/** \brief A description of a policy attachment to an interface
93    @param The policy ID to attach
94    @param sw_if_index The interface to attach to
95    @param priority The priority of the attachment, w.r.t. to other attachments
96              on this interface. lower value is 'better'
97    @param is_ipv6 Does this attachment apply to IPv6 packets (or IPv4)
98*/
99typeonly define abf_itf_attach
100{
101  u32 policy_id;
102  u32 sw_if_index;
103  u32 priority;
104  u8 is_ipv6;
105};
106
107/** \brief Add or delete a policy attachment to an interface
108 */
109autoreply define abf_itf_attach_add_del
110{
111  u32 client_index;
112  u32 context;
113  u8 is_add;
114  vl_api_abf_itf_attach_t attach;
115};
116
117/** \brief Attachment details from a dump
118 */
119define abf_itf_attach_details
120{
121  u32 context;
122  vl_api_abf_itf_attach_t attach;
123};
124
125/** \brief Dump all the policy attachments
126 */
127define abf_itf_attach_dump
128{
129  u32 client_index;
130  u32 context;
131};
132
133