summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat64.h
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2017-11-08 01:59:38 -0800
committerOle Trøan <otroan@employees.org>2017-11-08 11:01:46 +0000
commit0938dcf192d203dcbe89d2819d3819d2f93408bf (patch)
tree1e3044664b7a3e84bdf0bc353b366916d9411f29 /src/plugins/nat/nat64.h
parent2ea2e423a95d497b97b858ebadc0b6aca1027e66 (diff)
NAT64 to use IPv4 address from interface (VPP-1051)
Change-Id: I326429c31dea6958a342ee152ef86cb975f4b12c Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat64.h')
-rw-r--r--src/plugins/nat/nat64.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/plugins/nat/nat64.h b/src/plugins/nat/nat64.h
index 68224cab013..118076705cc 100644
--- a/src/plugins/nat/nat64.h
+++ b/src/plugins/nat/nat64.h
@@ -55,6 +55,9 @@ typedef struct
/** Address pool vector */
snat_address_t *addr_pool;
+ /** sw_if_indices whose interface addresses should be auto-added */
+ u32 *auto_add_sw_if_indices;
+
/** Pref64 vector */
nat64_prefix_t *pref64;
@@ -70,6 +73,7 @@ typedef struct
u8 is_disabled;
+ ip4_main_t *ip4_main;
snat_main_t *sm;
} nat64_main_t;
@@ -103,6 +107,16 @@ typedef int (*nat64_pool_addr_walk_fn_t) (snat_address_t * addr, void *ctx);
void nat64_pool_addr_walk (nat64_pool_addr_walk_fn_t fn, void *ctx);
/**
+ * @brief NAT64 pool address from specific (DHCP addressed) interface.
+ *
+ * @param sw_if_index Index of the interface.
+ * @param is_add 1 if add, 0 if delete.
+ *
+ * @returns 0 on success, non-zero value otherwise.
+ */
+int nat64_add_interface_address (u32 sw_if_index, int is_add);
+
+/**
* @brief Enable/disable NAT64 feature on the interface.
*
* @param sw_if_index Index of the interface.