X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fmap%2Fmap.api;h=857a1c8fcb0c3b3cb4786a2c9fc0a8f700b20d22;hb=7b2e9fb1a;hp=5121b2c234f12635c79a8c9b1e85676087a39267;hpb=ffba3c377c679a69fd9507bc8f8bc3acf8258d1e;p=vpp.git diff --git a/src/plugins/map/map.api b/src/plugins/map/map.api index 5121b2c234f..857a1c8fcb0 100644 --- a/src/plugins/map/map.api +++ b/src/plugins/map/map.api @@ -13,7 +13,7 @@ * limitations under the License. */ -option version = "2.1.0"; +option version = "4.1.0"; import "vnet/ip/ip_types.api"; @@ -24,9 +24,10 @@ import "vnet/ip/ip_types.api"; @param ip4_prefix - Rule IPv4 prefix @param ip6_src - MAP domain IPv6 BR address / Tunnel source @param ea_bits_len - Embedded Address bits length - @param psid_offset - Port Set Identifider (PSID) offset + @param psid_offset - Port Set Identifier (PSID) offset @param psid_length - PSID length @param mtu - MTU + @param tag - A user field stored with the MAP */ define map_add_domain { @@ -38,9 +39,8 @@ define map_add_domain u8 ea_bits_len; u8 psid_offset; u8 psid_length; - u8 is_translation; - u8 is_rfc6052; u16 mtu; + string tag[64]; }; /** \brief Reply for MAP domain add @@ -81,7 +81,7 @@ autoreply define map_add_del_rule u32 client_index; u32 context; u32 index; - u8 is_add; + bool is_add; vl_api_ip6_address_t ip6_dst; u16 psid; }; @@ -96,6 +96,19 @@ define map_domain_dump u32 context; }; +/** \brief Details about a single MAP domain + @param context - returned sender context, to match reply w/ request + @param domain_index - MAP domain index + @param ip6_prefix - Rule IPv6 prefix + @param ip4_prefix - Rule IPv4 prefix + @param ip6_src - MAP domain IPv6 BR address / Tunnel source + @param ea_bits_len - Embedded Address bits length + @param psid_offset - Port Set Identifier (PSID) offset + @param psid_length - PSID length + @param flags - + @param mtu - MTU + @param tag - The user field stored with the MAP at creation time +*/ define map_domain_details { u32 context; @@ -108,7 +121,7 @@ define map_domain_details u8 psid_length; u8 flags; u16 mtu; - u8 is_translation; + string tag[64]; }; define map_rule_dump @@ -125,6 +138,22 @@ define map_rule_details u16 psid; }; +/** \brief Enable or disable a MAP interface + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param sw_if_index - + @param is_enable - 0=disable, 1=enable interface + @param is_translation - 0=encapsulation, 1=translation +*/ +autoreply define map_if_enable_disable +{ + u32 client_index; + u32 context; + u32 sw_if_index; + bool is_enable; + bool is_translation; /* 0 - encapsulation, 1 - translation */ +}; + /** \brief Request for a single block of summary stats @param client_index - opaque cookie to identify the sender @param context - sender context, to match reply w/ request @@ -153,3 +182,149 @@ define map_summary_stats_reply u64 total_ip4_fragments; u64 total_security_check[2]; }; + + +/** \brief Set MAP fragmentation parameters + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param inner - 1=frag inner packet, 0=frag tunnel packets + @param ignore_df - 1=IP4 fragment despite DF bit, 0=honor DF +*/ +autoreply define map_param_set_fragmentation +{ + u32 client_index; + u32 context; + bool inner; + bool ignore_df; +}; + + +/** \brief Set MAP ICMP parameters + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param icmp4_err_relay_src - IPv4 ICMP err relay src address +*/ +autoreply define map_param_set_icmp +{ + u32 client_index; + u32 context; + vl_api_ip4_address_t ip4_err_relay_src; +}; + + +/** \brief Set MAP ICMP6 parameters + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param enable_unreachable - 1 = send ICMP unreachable err msgs +*/ +autoreply define map_param_set_icmp6 +{ + u32 client_index; + u32 context; + bool enable_unreachable; +}; + + +/** \brief Add/delete MAP pre-resolve IP addresses parameters + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param is_add - 1 = Add non-zero IP addresses, 0 = delete + @param ip4_nh_address - direct IP4 next-hop address + @param ip6_nh_address - direct IP6 next-hop address +*/ +autoreply define map_param_add_del_pre_resolve +{ + u32 client_index; + u32 context; + bool is_add; + vl_api_ip4_address_t ip4_nh_address; + vl_api_ip6_address_t ip6_nh_address; +}; + +/** \brief Set MAP security-check parameters + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param enable - 1=enable security check on first inbound packet + @param fragments - 1=enable check on (subsequent) fragments too +*/ +autoreply define map_param_set_security_check +{ + u32 client_index; + u32 context; + bool enable; + bool fragments; +}; + + +/** \brief Set MAP traffic class parameters + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param copy - 1 = copy packet class/TOS field, 0 = use tc_class instead + @param tc_class - class field value when copy == 0 +*/ +autoreply define map_param_set_traffic_class +{ + u32 client_index; + u32 context; + bool copy; + u8 tc_class; +}; + + +/** \brief Set MAP TCP parameters + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @parma tcp_mss - TCP MSS clamping value +*/ +autoreply define map_param_set_tcp +{ + u32 client_index; + u32 context; + u16 tcp_mss; +}; + + +/** \brief Request for a single block of MAP parameters + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request +*/ +define map_param_get +{ + u32 client_index; + u32 context; +}; + + +/** \brief Reply for map_param_get request + @param context - sender context, to match reply w/ request + @param retval - return code for request + @param inner - 1=frag inner packet, 0=frag tunnel packets, ~0=untouched + @param ignore_df - 1=IP4 fragm despite DF bit, 0=honor DF, ~0=untouched + @param icmp_ip4_err_relay_src - IPv4 ICMP err relay src address + @param icmp6_enable_unreachable - 1 = send ICMP unreachable err msgs + @param ip4_nh_address - direct IP4 next-hop address + @param ip6_nh_address - direct IP6 next-hop address + @param sec_check_enable - 1=enable security check on first inbound packet + @param sec_check_fragments - 1=enable check on (subsequent) fragments too + @param tc_copy - 1 = copy packet class/TOS field, 0 = use class instead + @param tc_class - class field value when copy == 0 +*/ +define map_param_get_reply +{ + u32 context; + i32 retval; + u8 frag_inner; + u8 frag_ignore_df; + vl_api_ip4_address_t icmp_ip4_err_relay_src; + bool icmp6_enable_unreachable; + vl_api_ip4_address_t ip4_nh_address; + vl_api_ip6_address_t ip6_nh_address; + u16 ip4_lifetime_ms; + u16 ip4_pool_size; + u32 ip4_buffers; + f64 ip4_ht_ratio; + bool sec_check_enable; + bool sec_check_fragments; + bool tc_copy; + u8 tc_class; +};