diff options
author | Neale Ranns <nranns@cisco.com> | 2018-10-01 01:42:13 -0700 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-10-01 17:08:55 +0000 |
commit | d1e68ab77e57f3f170c989d9f73b6a44648b4f60 (patch) | |
tree | 8b68e26b2f89ac98a0ba775cb40ed1306fecbeca /src/plugins/svs/svs.api | |
parent | 346ed07526326f0b1c48ac356d5d786ff9ae0013 (diff) |
Source VRF Select
match against a packet's source address to determine
the VRF for the subsequent destination address lookup.
Change-Id: I48ee0ef54dcb891f0ec7f879e4d3b925a0ed0081
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/plugins/svs/svs.api')
-rw-r--r-- | src/plugins/svs/svs.api | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/src/plugins/svs/svs.api b/src/plugins/svs/svs.api new file mode 100644 index 00000000000..4bed037be90 --- /dev/null +++ b/src/plugins/svs/svs.api @@ -0,0 +1,131 @@ +/* Hey Emacs use -*- mode: C -*- */ +/* + * Copyright (c) 2016 Cisco and/or its affiliates. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * This file defines the vpp control-plane API messages + * used to control the Source VRF select (SVS) plugin + */ + +option version = "1.0.0"; +import "vnet/ip/ip_types.api"; + +/** + * brief Get the plugin version + * @param client_index - opaque cookie to identify the sender + *@param context - sender context, to match reply w/ request + */ +define svs_plugin_get_version +{ + u32 client_index; + u32 context; +}; + +/** + * @brief Reply to get the plugin version + * @param context - returned sender context, to match reply w/ request + * @param major - Incremented every time a known breaking behavior change is introduced + * @param minor - Incremented with small changes, may be used to avoid buggy versions + */ +define svs_plugin_get_version_reply +{ + u32 context; + u32 major; + u32 minor; +}; + +/** + * @brief Add a table in which to add routes that will match against source + * addresses + * @param client_index - opaque cookie to identify the sender + * @param context - sender context, to match reply w/ request + * @param af - Address Family + * @param table_id - User provided ID for the table + * @param is_add - add or delete + */ +autoreply define svs_table_add_del +{ + u32 client_index; + u32 context; + u8 is_add; + vl_api_address_family_t af; + u32 table_id; +}; + +/** + * @brief Add a route into the source address matching table + * @param client_index - opaque cookie to identify the sender + * @param context - sender context, to match reply w/ request + * @param prefix - prefix + * @param table_id - The SVS table (from svs_table_add_del) + * @param source_table_id - This is the table ID that will be used for + * the subsequent lookup of the packet. The V in SVS. + * this table must exist (from e.g. ip_table_add_del) + */ +autoreply define svs_route_add_del +{ + u32 client_index; + u32 context; + u8 is_add; + vl_api_prefix_t prefix; + u32 table_id; + u32 source_table_id; +}; + +/** + * @brief Enable SVS on a given interface by using the given table to match + * RX'd packets' source addresses + * @param client_index - opaque cookie to identify the sender + * @param context - sender context, to match reply w/ request + * @param af - Address Family + * @param table_id - The SVS table (from svs_table_add_del) + * @param sw_if_index - Interface + */ +autoreply define svs_enable_disable +{ + u32 client_index; + u32 context; + u8 is_enable; + vl_api_address_family_t af; + u32 table_id; + u32 sw_if_index; +}; + +/** + * @brief Dump the SVS table mappings of table_id to interface + * To see the routes added to a given table use ip_fib_dump() + */ +define svs_dump +{ + u32 client_index; + u32 context; +}; + +/** + * @brief SVS table-id to interface mapping + * @param context - sender context, to match reply w/ request + * @param af - Address Family + * @param table_id - The SVS table (from svs_table_add_del) + * @param sw_if_index - Interface + */ +define svs_details +{ + u32 context; + u32 table_id; + u32 sw_if_index; + vl_api_address_family_t af; +}; + |