From 75761b933f3e28494bae4b2cf5636a07ffe6ce18 Mon Sep 17 00:00:00 2001 From: Ole Troan Date: Wed, 11 Sep 2019 17:49:08 +0200 Subject: api: split vl_api_prefix into two One type for address with prefix and one type for prefix. Type: fix Signed-off-by: Ole Troan Change-Id: Icfec51d9b7d5cde1d69fbecdd97498688ab7b295 Signed-off-by: Ole Troan Signed-off-by: Klement Sekera Signed-off-by: Ole Troan --- src/vnet/ip/ip_types.api | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/vnet/ip/ip_types.api') diff --git a/src/vnet/ip/ip_types.api b/src/vnet/ip/ip_types.api index d9ad893412d..49294587991 100644 --- a/src/vnet/ip/ip_types.api +++ b/src/vnet/ip/ip_types.api @@ -108,6 +108,23 @@ manual_print 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. + * + **/ + +manual_print typedef vl_api_prefix_t address_with_prefix; +manual_print typedef vl_api_ip4_prefix_t ip4_address_with_prefix; +manual_print 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). -- cgit 1.2.3-korg