X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fnat%2Fnat.api;h=d8fdf7283cfa2a8f7e057f471dca78c1588c4d48;hb=efcd1e9e1d7dda4e4ea3db5750925cd8f6894f4d;hp=7245cb078b9cf79f8ae061c9ada60ea066ff1291;hpb=2ba92e32e0197f676dd905e5edcb4ff3e1bec241;p=vpp.git diff --git a/src/plugins/nat/nat.api b/src/plugins/nat/nat.api index 7245cb078b9..d8fdf7283cf 100644 --- a/src/plugins/nat/nat.api +++ b/src/plugins/nat/nat.api @@ -12,6 +12,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +vl_api_version 1.0.0 + /** * @file nat.api * @brief VPP control-plane API messages. @@ -757,6 +760,87 @@ autoreply define nat_ipfix_enable_disable { u8 enable; }; +/** \brief Set NAT virtual fragmentation reassembly + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param timeout - reassembly timeout + @param max_reass - maximum number of concurrent reassemblies + @param max_frag - maximum number of fragmets per reassembly + @param drop_frag - if 0 translate fragments, otherwise drop fragments + @param is_ip6 - 1 if IPv6, 0 if IPv4 +*/ +autoreply define nat_set_reass { + u32 client_index; + u32 context; + u32 timeout; + u16 max_reass; + u8 max_frag; + u8 drop_frag; + u8 is_ip6; +}; + +/** \brief Get NAT virtual fragmentation reassembly configuration + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request +*/ +define nat_get_reass { + u32 client_index; + u32 context; +}; + +/** \brief Get NAT virtual fragmentation reassembly configuration reply + @param context - sender context, to match reply w/ request + @param retval - return code + @param ip4_timeout - reassembly timeout + @param ip4_max_reass - maximum number of concurrent reassemblies + @param ip4_max_frag - maximum number of fragmets per reassembly + @param ip4_drop_frag - if 0 translate fragments, otherwise drop fragments + @param ip6_timeout - reassembly timeout + @param ip6_max_reass - maximum number of concurrent reassemblies + @param ip6_max_frag - maximum number of fragmets per reassembly + @param ip6_drop_frag - if 0 translate fragments, otherwise drop fragments +*/ +define nat_get_reass_reply { + u32 context; + i32 retval; + u32 ip4_timeout; + u16 ip4_max_reass; + u8 ip4_max_frag; + u8 ip4_drop_frag; + u32 ip6_timeout; + u16 ip6_max_reass; + u8 ip6_max_frag; + u8 ip6_drop_frag; +}; + +/** \brief Dump NAT virtual fragmentation reassemblies + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request +*/ +define nat_reass_dump { + u32 client_index; + u32 context; +}; + +/** \brief NAT virtual fragmentation reassemblies response + @param context - sender context, to match reply w/ request + @param is_ip4 - 1 if address type is IPv4 + @param src_addr - source IP address + @param dst_addr - destination IP address + @param frag_id - fragment ID + @param proto - protocol + @param frag_n - number of cached fragments +*/ +define nat_reass_details { + u32 context; + u8 is_ip4; + u8 src_addr[16]; + u8 dst_addr[16]; + u32 frag_id; + u8 proto; + u8 frag_n; +}; + /* * NAT44 APIs */ @@ -824,7 +908,7 @@ define nat44_interface_dump { /** \brief NAT44 interface details response @param context - sender context, to match reply w/ request - @param is_inside - 1 if inside, 0 if outside + @param is_inside - 1 if inside, 0 if outside, 2 if inside and outside @param sw_if_index - software index of the interface */ define nat44_interface_details { @@ -1025,6 +1109,59 @@ define nat44_user_session_details { u32 total_pkts; }; +typeonly manual_endian define nat44_lb_addr_port { + u8 addr[4]; + u16 port; + u8 probability; +}; + +autoreply manual_endian define nat44_add_del_lb_static_mapping { + u32 client_index; + u32 context; + u8 is_add; + u8 external_addr[4]; + u16 external_port; + u8 protocol; + u32 vrf_id; + u8 local_num; + vl_api_nat44_lb_addr_port_t locals[local_num]; +}; + +define nat44_lb_static_mapping_dump { + u32 client_index; + u32 context; +}; + +manual_endian define nat44_lb_static_mapping_details { + u32 context; + u8 external_addr[4]; + u16 external_port; + u8 protocol; + u32 vrf_id; + u8 local_num; + vl_api_nat44_lb_addr_port_t locals[local_num]; +}; + +/** \brief Delete NAT44 session + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param is_in - 1 if inside network addres and port pari, 0 if outside + @param ip_address - IPv4 address + @param protocol - IP protocol + @param port - port number + @param vfr_id - VRF ID +*/ +autoreply define nat44_del_session { + u32 client_index; + u32 context; + u8 is_in; + u8 address[4]; + u8 protocol; + u16 port; + u32 vrf_id; +}; + + /* * Deterministic NAT (CGN) APIs */ @@ -1511,3 +1648,30 @@ define nat64_prefix_details { u8 prefix_len; u32 vrf_id; }; + + +/* + * DS-Lite APIs + */ + +/** \brief Add/delete address range to DS-Lite pool + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param start_addr - start address of the range + @param end_addr - end address of the range + @param is_add - 1 if add, 0 if delete +*/ +autoreply define dslite_add_del_pool_addr_range { + u32 client_index; + u32 context; + u8 start_addr[4]; + u8 end_addr[4]; + u8 is_add; +}; + +autoreply define dslite_set_aftr_addr { + u32 client_index; + u32 context; + u8 ip4_addr[4]; + u8 ip6_addr[16]; +};