X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fip%2Fip_types.api;h=3e6149a78e7b1e8c1be6570373ca81fa495a294c;hb=3ec09e9243dceb78e7548725281b0da8eddf72b1;hp=af8f6231285eec21b4a69f634b03de47c28829c9;hpb=515eed42583a52d4783ff4906afa01244899e030;p=vpp.git diff --git a/src/vnet/ip/ip_types.api b/src/vnet/ip/ip_types.api index af8f6231285..3e6149a78e7 100644 --- a/src/vnet/ip/ip_types.api +++ b/src/vnet/ip/ip_types.api @@ -14,8 +14,9 @@ * limitations under the License. */ -typedef u8 ip4_address[4]; -typedef u8 ip6_address[16]; +option version = "3.0.0"; +manual_print typedef u8 ip4_address[4]; +manual_print typedef u8 ip6_address[16]; enum address_family { ADDRESS_IP4 = 0, @@ -69,6 +70,7 @@ enum ip_proto { IP_API_PROTO_GRE = 47, IP_API_PROTO_AH = 50, IP_API_PROTO_ESP = 51, + IP_API_PROTO_ICMP6 = 58, IP_API_PROTO_EIGRP = 88, IP_API_PROTO_OSPF = 89, IP_API_PROTO_SCTP = 132, @@ -80,12 +82,12 @@ union address_union { vl_api_ip6_address_t ip6; }; -typedef address { +manual_print typedef address { vl_api_address_family_t af; vl_api_address_union_t un; }; -typedef prefix { +manual_print typedef prefix { vl_api_address_t address; u8 len; }; @@ -97,16 +99,33 @@ typedef mprefix { vl_api_address_union_t src_address; }; -typedef ip6_prefix { +manual_print typedef ip6_prefix { vl_api_ip6_address_t address; u8 len; }; -typedef ip4_prefix { +manual_print typedef ip4_prefix { vl_api_ip4_address_t address; 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).