diff options
author | Christian Hopps <chopps@labn.net> | 2020-05-04 10:28:03 -0400 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2020-05-05 11:25:58 +0000 |
commit | f5d38e05ac6c9c56311eb4d75ca2644d592ae535 (patch) | |
tree | 5d844eda85b0130c5fc7d29f89ccce53009523eb /src/vnet/ip/ip.api | |
parent | 2fdb41ae41bd3a034bf28d06c17df992fc664d37 (diff) |
api: ip: add IP_ROUTE_LOOKUP API
Add an IP_ROUTE_LOOKUP function that does either an exact match or
longest prefix match in a given fib table for a given prefix
returning the match if present.
Add API test.
Type: improvement
Signed-off-by: Christian Hopps <chopps@labn.net>
Change-ID: I67ec5a61079f4acf1349a9c646185f91f5f11806
Diffstat (limited to 'src/vnet/ip/ip.api')
-rw-r--r-- | src/vnet/ip/ip.api | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/vnet/ip/ip.api b/src/vnet/ip/ip.api index 5624bcfaf6a..42371c492ac 100644 --- a/src/vnet/ip/ip.api +++ b/src/vnet/ip/ip.api @@ -190,6 +190,32 @@ manual_endian manual_print define ip_route_details vl_api_ip_route_t route; }; +/** \brief Lookup IP route from a table + @param client_index - opaque cookie to identify the sender + @param table_id - The IP table to look the route up in + @param exact - 0 for normal route lookup, 1 for exact match only + @param prefix - The prefix (or host) for route lookup. +*/ +define ip_route_lookup +{ + u32 client_index; + u32 context; + u32 table_id; + u8 exact; + vl_api_prefix_t prefix; +}; + +/** \brief IP FIB table lookup response + @param retval - return code of the lookup + @param route - The route entry in the table if found +*/ +define ip_route_lookup_reply +{ + u32 context; + i32 retval; + vl_api_ip_route_t route; +}; + /** \brief Set the ip flow hash config for a fib request @param client_index - opaque cookie to identify the sender @param context - sender context, to match reply w/ request |