X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fnat%2Fnat64.h;h=118076705cc64abfcd6bfc30e0a0dfe1de56a810;hb=0938dcf192d203dcbe89d2819d3819d2f93408bf;hp=68224cab01343145d6a7f66a2f1850f010f9ff29;hpb=2ea2e423a95d497b97b858ebadc0b6aca1027e66;p=vpp.git 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; @@ -102,6 +106,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. *