From 7b929793feba7d966c34b1ddb31dc818174f3a57 Mon Sep 17 00:00:00 2001 From: Juraj Sloboda Date: Thu, 23 Nov 2017 13:20:48 +0100 Subject: Translate matching packets using NAT (VPP-1069) Add API function which enables forwarding of packets not matching existing translation or static mapping instead of dropping them. When forwarding is enabled matching packets will be translated while non-matching packets will be forwarded without translation. Change-Id: Ic13040cbad16d3a1ecdc3e02a497171bef6aa413 Signed-off-by: Juraj Sloboda --- src/plugins/nat/nat.api | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'src/plugins/nat/nat.api') diff --git a/src/plugins/nat/nat.api b/src/plugins/nat/nat.api index 2a8eeb9489f..d6a912b72d0 100644 --- a/src/plugins/nat/nat.api +++ b/src/plugins/nat/nat.api @@ -606,6 +606,37 @@ autoreply define nat44_del_session { u32 vrf_id; }; +/** \brief Enable/disable forwarding for NAT44 + Forward packets which don't match existing translation + or static mapping instead of dropping them. + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param enable - 0 for enable, 1 for disable +*/ +autoreply define nat44_forwarding_enable_disable { + u32 client_index; + u32 context; + u8 enable; +}; + +/** \brief Check if forwarding is enabled or disabled + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request +*/ +define nat44_forwarding_is_enabled { + u32 client_index; + u32 context; +}; + +/** \brief Response to check if forwarding is enabled or disabled + @param context - sender context, to match reply w/ request + @param enabled - 1 if enabled, 0 if disabled +*/ +define nat44_forwarding_is_enabled_reply { + u32 context; + u8 enabled; +}; + /* * Deterministic NAT (CGN) APIs -- cgit 1.2.3-korg