summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat44_cli.c
diff options
context:
space:
mode:
authorFilip Varga <fivarga@cisco.com>2020-12-10 15:55:25 +0100
committerOle Tr�an <otroan@employees.org>2021-01-05 14:09:39 +0000
commita210798c407035f09c10c018ebdaf12312161730 (patch)
treec03e68701aaca9c3a4207107bdacb183da8a4a5a /src/plugins/nat/nat44_cli.c
parent641c6be821c3136cb140b6726e16246f2f1cbd4c (diff)
nat: refactor and split fo EI/ED features
This patch is aimed at moving EI features out of NAT44 plugin & split of EI/ED functions. Type: refactor Change-Id: I63cf70a264ed2512708fe92665d64f04690783d0 Signed-off-by: Filip Varga <fivarga@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat44_cli.c')
-rw-r--r--src/plugins/nat/nat44_cli.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/plugins/nat/nat44_cli.c b/src/plugins/nat/nat44_cli.c
index ca396fd22fe..7415b5fe76f 100644
--- a/src/plugins/nat/nat44_cli.c
+++ b/src/plugins/nat/nat44_cli.c
@@ -24,7 +24,9 @@
#include <nat/nat44/inlines.h>
#include <nat/nat_affinity.h>
#include <vnet/fib/fib_table.h>
-#include <nat/nat_ha.h>
+
+#include <nat/nat44-ei/nat44_ei_ha.h>
+#include <nat/nat44-ei/nat44_ei.h>
#define UNSUPPORTED_IN_ED_MODE_STR \
"This command is unsupported in endpoint dependent mode"
@@ -354,13 +356,13 @@ nat44_set_alloc_addr_and_port_alg_command_fn (vlib_main_t * vm,
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (line_input, "default"))
- nat_set_alloc_addr_and_port_default ();
+ nat44_ei_set_alloc_default ();
else
if (unformat
(line_input, "map-e psid %d psid-offset %d psid-len %d", &psid,
&psid_offset, &psid_length))
- nat_set_alloc_addr_and_port_mape ((u16) psid, (u16) psid_offset,
- (u16) psid_length);
+ nat44_ei_set_alloc_mape ((u16) psid, (u16) psid_offset,
+ (u16) psid_length);
else
if (unformat
(line_input, "port-range %d - %d", &port_start, &port_end))
@@ -372,8 +374,7 @@ nat44_set_alloc_addr_and_port_alg_command_fn (vlib_main_t * vm,
"The end-port must be greater than start-port");
goto done;
}
- nat_set_alloc_addr_and_port_range ((u16) port_start,
- (u16) port_end);
+ nat44_ei_set_alloc_range ((u16) port_start, (u16) port_end);
}
else
{