X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fnat%2Fnat.api;h=9a000d5611f676a877215360cfdc630faea32932;hb=0938dcf192d203dcbe89d2819d3819d2f93408bf;hp=98a6f0673e45724dcf7b46244f83c7e19ee42f2b;hpb=5ba86f72439a627f2084bcafb221ad77f4990168;p=vpp.git diff --git a/src/plugins/nat/nat.api b/src/plugins/nat/nat.api index 98a6f0673e4..9a000d5611f 100644 --- a/src/plugins/nat/nat.api +++ b/src/plugins/nat/nat.api @@ -760,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 */ @@ -1567,3 +1648,44 @@ define nat64_prefix_details { u8 prefix_len; u32 vrf_id; }; + +/** \brief Add/delete NAT64 pool address from specific interfce + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param is_add - 1 if add, 0 if delete + @param sw_if_index - software index of the interface +*/ +autoreply define nat64_add_del_interface_addr { + u32 client_index; + u32 context; + u8 is_add; + u8 is_inside; + u32 sw_if_index; +}; + + +/* + * 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]; +};