X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fip%2Fip_types.api;h=13c6a4aab287fde966f934bff9cd54fb4e54164c;hb=038e1dfbd;hp=ad24d6e65ce47cf441947f8a3183be10d566217f;hpb=ffba3c377c679a69fd9507bc8f8bc3acf8258d1e;p=vpp.git diff --git a/src/vnet/ip/ip_types.api b/src/vnet/ip/ip_types.api index ad24d6e65ce..13c6a4aab28 100644 --- a/src/vnet/ip/ip_types.api +++ b/src/vnet/ip/ip_types.api @@ -14,19 +14,67 @@ * limitations under the License. */ -typedef ip4_address { - u8 address[4]; -}; - -typedef ip6_address { - u8 address[16]; -}; +typedef u8 ip4_address[4]; +typedef u8 ip6_address[16]; enum address_family { ADDRESS_IP4 = 0, ADDRESS_IP6, }; +/* ECN code points - RFC 3168 + https://tools.ietf.org/html/rfc3168 +*/ +enum ip_ecn : u8 { + IP_API_ECN_NONE = 0, + IP_API_ECN_ECT0 = 1, + IP_API_ECN_ECT1 = 2, + IP_API_ECN_CE = 3, +}; + +/* DSCP code points - RFC 2474 + https://tools.ietf.org/html/rfc2474 + Values other than these RFC defined values are accepted. +*/ +enum ip_dscp : u8 { + IP_API_DSCP_CS0 = 0, + IP_API_DSCP_CS1 = 8, + IP_API_DSCP_AF11 = 10, + IP_API_DSCP_AF12 = 12, + IP_API_DSCP_AF13 = 14, + IP_API_DSCP_CS2 = 16, + IP_API_DSCP_AF21 = 18, + IP_API_DSCP_AF22 = 20, + IP_API_DSCP_AF23 = 22, + IP_API_DSCP_CS3 = 24, + IP_API_DSCP_AF31 = 26, + IP_API_DSCP_AF32 = 28, + IP_API_DSCP_AF33 = 30, + IP_API_DSCP_CS4 = 32, + IP_API_DSCP_AF41 = 34, + IP_API_DSCP_AF42 = 36, + IP_API_DSCP_AF43 = 38, + IP_API_DSCP_CS5 = 40, + IP_API_DSCP_EF = 46, + IP_API_DSCP_CS6 = 48, + IP_API_DSCP_CS7 = 50, +}; + +enum ip_proto { + IP_API_PROTO_HOPOPT = 0, + IP_API_PROTO_ICMP = 1, + IP_API_PROTO_IGMP = 2, + IP_API_PROTO_TCP = 6, + IP_API_PROTO_UDP = 17, + IP_API_PROTO_GRE = 47, + IP_API_PROTO_AH = 50, + IP_API_PROTO_ESP = 51, + IP_API_PROTO_EIGRP = 88, + IP_API_PROTO_OSPF = 89, + IP_API_PROTO_SCTP = 132, + IP_API_PROTO_RESERVED = 255, +}; + union address_union { vl_api_ip4_address_t ip4; vl_api_ip6_address_t ip6; @@ -39,7 +87,7 @@ typedef address { typedef prefix { vl_api_address_t address; - u8 address_length; + u8 len; }; typedef mprefix { @@ -50,11 +98,11 @@ typedef mprefix { }; typedef ip6_prefix { - vl_api_ip6_address_t prefix; + vl_api_ip6_address_t address; u8 len; }; typedef ip4_prefix { - vl_api_ip4_address_t prefix; + vl_api_ip4_address_t address; u8 len; };