From f2a23cc8602525a325eaeaae6aca5e18882c33da Mon Sep 17 00:00:00 2001 From: Matus Fabian Date: Mon, 22 Jan 2018 03:41:53 -0800 Subject: NAT66 1:1 mapping (VPP-1108) Support the 1:1 translation of source address for IPv6 Change-Id: I934d18e5ec508bf7422d796ee5f172b79c048011 Signed-off-by: Matus Fabian --- src/plugins/nat/nat.api | 81 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) (limited to 'src/plugins/nat/nat.api') diff --git a/src/plugins/nat/nat.api b/src/plugins/nat/nat.api index ce565f6b9b5..1a960173c43 100644 --- a/src/plugins/nat/nat.api +++ b/src/plugins/nat/nat.api @@ -1280,3 +1280,84 @@ define dslite_get_b4_addr_reply { u8 ip4_addr[4]; u8 ip6_addr[16]; }; + +/* + * NAT66 APIs + */ +/** \brief Enable/disable NAT66 feature on the interface + @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 is_inside - 1 if inside, 0 if outside + @param sw_if_index - software index of the interface +*/ +autoreply define nat66_add_del_interface { + u32 client_index; + u32 context; + u8 is_add; + u8 is_inside; + u32 sw_if_index; +}; + +/** \brief Dump interfaces with NAT66 feature + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request +*/ +define nat66_interface_dump { + u32 client_index; + u32 context; +}; + +/** \brief NAT66 interface details response + @param context - sender context, to match reply w/ request + @param is_inside - 1 if inside, 0 if outside + @param sw_if_index - software index of the interface +*/ +define nat66_interface_details { + u32 context; + u8 is_inside; + u32 sw_if_index; +}; + +/** \brief Add/delete 1:1 NAT66 + @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 local_ip_address - local IPv6 address + @param external_ip_address - external IPv6 address + @param vrf_id - VRF id of tenant +*/ +autoreply define nat66_add_del_static_mapping { + u32 client_index; + u32 context; + u8 is_add; + u8 local_ip_address[16]; + u8 external_ip_address[16]; + u32 vrf_id; +}; + +/** \brief Dump NAT66 static mappings + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request +*/ +define nat66_static_mapping_dump { + u32 client_index; + u32 context; +}; + +/** \brief NAT66 static mapping details response + @param context - sender context, to match reply w/ request + @param local_ip_address - local IPv6 address + @param external_ip_address - external IPv6 address + @param vrf_id - VRF id of tenant + @param total_bytes - count of bytes sent through static mapping + @param total_pkts - count of pakets sent through static mapping +*/ +define nat66_static_mapping_details { + u32 context; + u8 local_ip_address[16]; + u8 external_ip_address[16]; + u32 vrf_id; + u64 total_bytes; + u64 total_pkts; +}; -- cgit 1.2.3-korg