summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat44_api.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_api.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_api.c')
-rw-r--r--src/plugins/nat/nat44_api.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/plugins/nat/nat44_api.c b/src/plugins/nat/nat44_api.c
index 5bc4b4cb4e6..cfe2211acd3 100644
--- a/src/plugins/nat/nat44_api.c
+++ b/src/plugins/nat/nat44_api.c
@@ -31,7 +31,8 @@
#include <nat/nat44.api_enum.h>
#include <nat/nat44.api_types.h>
-#include <nat/nat_ha.h>
+#include <nat/nat44-ei/nat44_ei_ha.h>
+#include <nat/nat44-ei/nat44_ei.h>
#include <nat/nat_inlines.h>
#include <nat/nat44/inlines.h>
@@ -350,11 +351,11 @@ static void
switch (mp->alg)
{
case NAT_ADDR_AND_PORT_ALLOC_ALG_DEFAULT:
- nat_set_alloc_addr_and_port_default ();
+ nat44_ei_set_alloc_default ();
break;
case NAT_ADDR_AND_PORT_ALLOC_ALG_MAPE:
- nat_set_alloc_addr_and_port_mape (ntohs (mp->psid), mp->psid_offset,
- mp->psid_length);
+ nat44_ei_set_alloc_mape (ntohs (mp->psid), mp->psid_offset,
+ mp->psid_length);
break;
case NAT_ADDR_AND_PORT_ALLOC_ALG_RANGE:
port_start = ntohs (mp->start_port);
@@ -364,7 +365,7 @@ static void
rv = VNET_API_ERROR_INVALID_VALUE;
goto send_reply;
}
- nat_set_alloc_addr_and_port_range (port_start, port_end);
+ nat44_ei_set_alloc_range (port_start, port_end);
break;
default:
rv = VNET_API_ERROR_INVALID_VALUE;