diff options
author | Filip Varga <fivarga@cisco.com> | 2021-03-23 12:57:58 +0100 |
---|---|---|
committer | Ole Tr�an <otroan@employees.org> | 2021-03-31 11:46:05 +0000 |
commit | ed2ee5e57b0f65ac4a94aac84cb6c27468878ea4 (patch) | |
tree | 60ce5bb4f17bf57c12146c20db66cd19fdb233a4 /src/plugins/nat/nat66/nat66.h | |
parent | 7554aef84a8a406c9dae73a7445e8b97920a83b3 (diff) |
nat: NAT66 plugin enable&disable calls update
Type: improvement
Adding support for enable&disable calls
(dynamic plugin configuration).
API (nat66_plugin_enable_disable) and
CLI (nat66 plugin enable/nat66 plugin disable) with support for
outside_vrf id configuration.
Change-Id: I5637ff1621d6662adc3b7c6f7f8176d84a4b492b
Signed-off-by: Filip Varga <fivarga@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat66/nat66.h')
-rw-r--r-- | src/plugins/nat/nat66/nat66.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/nat/nat66/nat66.h b/src/plugins/nat/nat66/nat66.h index 42dd7ca0eb2..17a69234b44 100644 --- a/src/plugins/nat/nat66/nat66.h +++ b/src/plugins/nat/nat66/nat66.h @@ -20,6 +20,7 @@ #define __included_nat66_h__ #include <vnet/ip/ip.h> +#include <vnet/fib/fib_table.h> #include <vppinfra/bihash_24_8.h> typedef struct @@ -48,6 +49,7 @@ typedef struct u32 sw_if_index; u8 flags; } nat66_interface_t; + #define NAT66_INTERFACE_FLAG_IS_INSIDE 1 #define NAT66_INTERFACE_FLAG_IS_OUTSIDE 2 #define nat66_interface_is_inside(i) i->flags & NAT66_INTERFACE_FLAG_IS_INSIDE @@ -65,16 +67,16 @@ typedef struct clib_bihash_24_8_t sm_e; /** Session counters */ vlib_combined_counter_main_t session_counters; - /** node index **/ - u32 in2out_node_index; - u32 out2in_node_index; u32 outside_vrf_id; u32 outside_fib_index; + fib_source_t nat_fib_src_hi; u16 msg_id_base; u8 log_level; + u8 enabled; + vlib_simple_counter_main_t in2out_packets; vlib_simple_counter_main_t out2in_packets;; } nat66_main_t; @@ -114,6 +116,8 @@ nat66_static_mapping_t *nat66_static_mapping_get (ip6_address_t * addr, int nat66_static_mapping_add_del (ip6_address_t * l_addr, ip6_address_t * e_addr, u32 vrf_id, u8 is_add); +int nat66_plugin_enable (u32 outside_vrf); +int nat66_plugin_disable (); #endif /* __included_nat66_h__ */ |