aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2019-09-11 17:49:08 +0200
committerOle Troan <ot@cisco.com>2019-09-12 13:17:40 +0200
commite6a5712624186d4162cbba8e49ff15362aeda17d (patch)
treeb5ced6fc0c1b5d635ce1cc6780d570ec91daa77c /src/vnet/ip
parent4b943d632864949310da4c88ea00e59f6043ae40 (diff)
api: split vl_api_prefix into two
One type for address with prefix and one type for prefix. Ticket: VPP-1769 Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: Icfec51d9b7d5cde1d69fbecdd97498688ab7b295 Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'src/vnet/ip')
-rw-r--r--src/vnet/ip/ip.api4
-rw-r--r--src/vnet/ip/ip_types.api17
2 files changed, 19 insertions, 2 deletions
diff --git a/src/vnet/ip/ip.api b/src/vnet/ip/ip.api
index 2dae4385602..e6b9b348cfc 100644
--- a/src/vnet/ip/ip.api
+++ b/src/vnet/ip/ip.api
@@ -29,7 +29,7 @@ import "vnet/mfib/mfib_types.api";
/** \brief An IP table
@param is_ipv6 - V4 or V6 table
@param table_id - table ID associated with the route
- This table ID will apply to both the unicats
+ This table ID will apply to both the unicats
and mlticast FIBs
@param name - A client provided name/tag for the table. If this is
not set by the client, then VPP will generate something
@@ -496,7 +496,7 @@ define ip_address_details
{
u32 context;
u32 sw_if_index;
- vl_api_prefix_t prefix;
+ vl_api_address_with_prefix_t prefix;
};
define ip_address_dump
diff --git a/src/vnet/ip/ip_types.api b/src/vnet/ip/ip_types.api
index af8f6231285..bc1b5adbcdb 100644
--- a/src/vnet/ip/ip_types.api
+++ b/src/vnet/ip/ip_types.api
@@ -107,6 +107,23 @@ typedef ip4_prefix {
u8 len;
};
+/** \brief
+ *
+ * The vl_api_[ip4|ip6]_address_with_prefix_t types are used as a type to denote
+ * both an IP address and a prefix. I.e. in CIDR notation
+ * '192.168.10.1/24' the address is 192.168.10.1 and the network
+ * prefix is 192.168.10.0/24.
+ *
+ * If only an address is needed use: vl_api_address_t types and if
+ * only a network prefix is needed (i.e. no hosts bits), then use the
+ * vl_api_prefix_t types.
+ *
+ **/
+
+typedef vl_api_prefix_t address_with_prefix;
+typedef vl_api_ip4_prefix_t ip4_address_with_prefix;
+typedef vl_api_ip6_prefix_t ip6_address_with_prefix;
+
/** \brief A context for matching prefixes against. (Think ip prefix list.)
The meaning (exact match / want subnets) of an unset matcher is left to the implementer.
@param le - le mut be <= to prefix.len. Default: 255 (not set).