#include <nat/nat44-ei/nat44_ei.h>
#include <nat/nat44-ei/nat44_ei_ha.h>
+#define NAT44_EI_EXPECTED_ARGUMENT "expected required argument(s)"
+
u8 *
format_nat44_ei_session (u8 *s, va_list *args)
{
nat44_ei_static_mapping_t *m = va_arg (*args, nat44_ei_static_mapping_t *);
nat44_ei_lb_addr_port_t *local;
- if (nat44_ei_is_identity_static_mapping (m))
+ if (is_sm_identity_nat (m->flags))
{
- if (nat44_ei_is_addr_only_static_mapping (m))
+ if (is_sm_addr_only (m->flags))
s = format (s, "identity mapping %U", format_ip4_address,
&m->local_addr);
else
return s;
}
- if (nat44_ei_is_addr_only_static_mapping (m))
+ if (is_sm_addr_only (m->flags))
{
s = format (s, "local %U external %U vrf %d", format_ip4_address,
&m->local_addr, format_ip4_address, &m->external_addr,
va_arg (*args, nat44_ei_static_map_resolve_t *);
vnet_main_t *vnm = vnet_get_main ();
- if (m->addr_only)
+ if (is_sm_addr_only (m->flags))
s =
format (s, "local %U external %U vrf %d", format_ip4_address, &m->l_addr,
format_vnet_sw_if_index_name, vnm, m->sw_if_index, m->vrf_id);
}
static clib_error_t *
-nat44_ei_enable_command_fn (vlib_main_t *vm, unformat_input_t *input,
- vlib_cli_command_t *cmd)
+nat44_ei_enable_disable_command_fn (vlib_main_t *vm, unformat_input_t *input,
+ vlib_cli_command_t *cmd)
{
nat44_ei_main_t *nm = &nat44_ei_main;
unformat_input_t _line_input, *line_input = &_line_input;
clib_error_t *error = 0;
nat44_ei_config_t c = { 0 };
- u8 mode_set = 0;
+ u8 enable_set = 0, enable = 0, mode_set = 0;
- if (nm->enabled)
- return clib_error_return (0, "nat44 ei already enabled");
-
- /* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
- {
- if (nat44_ei_plugin_enable (c) != 0)
- return clib_error_return (0, "nat44 ei enable failed");
- return 0;
- }
+ return clib_error_return (0, NAT44_EI_EXPECTED_ARGUMENT);
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
;
else if (unformat (line_input, "user-sessions %u", &c.user_sessions))
;
+ else if (!enable_set)
+ {
+ enable_set = 1;
+ if (unformat (line_input, "disable"))
+ ;
+ else if (unformat (line_input, "enable"))
+ enable = 1;
+ }
else
{
error = clib_error_return (0, "unknown input '%U'",
}
}
- if (!c.sessions)
+ if (!enable_set)
{
- error = clib_error_return (0, "number of sessions is required");
+ error = clib_error_return (0, "expected enable | disable");
goto done;
}
- if (nat44_ei_plugin_enable (c) != 0)
- error = clib_error_return (0, "nat44 ei enable failed");
-done:
- unformat_free (line_input);
- return error;
-}
-
-static clib_error_t *
-nat44_ei_disable_command_fn (vlib_main_t *vm, unformat_input_t *input,
- vlib_cli_command_t *cmd)
-{
- nat44_ei_main_t *nm = &nat44_ei_main;
- clib_error_t *error = 0;
+ if (enable)
+ {
+ if (nm->enabled)
+ {
+ error = clib_error_return (0, "already enabled");
+ goto done;
+ }
- if (!nm->enabled)
- return clib_error_return (0, "nat44 ei already disabled");
+ if (nat44_ei_plugin_enable (c) != 0)
+ error = clib_error_return (0, "enable failed");
+ }
+ else
+ {
+ if (!nm->enabled)
+ {
+ error = clib_error_return (0, "already disabled");
+ goto done;
+ }
- if (nat44_ei_plugin_disable () != 0)
- error = clib_error_return (0, "nat44 ei disable failed");
+ if (nat44_ei_plugin_disable () != 0)
+ error = clib_error_return (0, "disable failed");
+ }
+done:
+ unformat_free (line_input);
return error;
}
int rv = 0;
clib_error_t *error = 0;
- /* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
- return 0;
+ return clib_error_return (0, NAT44_EI_EXPECTED_ARGUMENT);
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
}
static clib_error_t *
-nat_show_workers_commnad_fn (vlib_main_t *vm, unformat_input_t *input,
+nat_show_workers_command_fn (vlib_main_t *vm, unformat_input_t *input,
vlib_cli_command_t *cmd)
{
nat44_ei_main_t *nm = &nat44_ei_main;
u8 log_level = NAT_LOG_NONE;
clib_error_t *error = 0;
- /* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
- return 0;
+ return clib_error_return (0, NAT44_EI_EXPECTED_ARGUMENT);
if (!unformat (line_input, "%d", &log_level))
{
vlib_cli_command_t *cmd)
{
unformat_input_t _line_input, *line_input = &_line_input;
- u32 domain_id = 0;
- u32 src_port = 0;
- u8 enable = 1;
- int rv = 0;
clib_error_t *error = 0;
- /* Get a line of input. */
+ u32 domain_id = 0, src_port = 0;
+ u8 enable_set = 0, enable = 0;
+
if (!unformat_user (input, unformat_line_input, line_input))
- {
- rv =
- nat_ipfix_logging_enable_disable (enable, domain_id, (u16) src_port);
- if (rv)
- return clib_error_return (0, "ipfix logging enable failed");
- return 0;
- }
+ return clib_error_return (0, NAT44_EI_EXPECTED_ARGUMENT);
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
;
else if (unformat (line_input, "disable"))
enable = 0;
+ else if (!enable_set)
+ {
+ enable_set = 1;
+ if (unformat (line_input, "disable"))
+ ;
+ else if (unformat (line_input, "enable"))
+ enable = 1;
+ }
else
{
error = clib_error_return (0, "unknown input '%U'",
}
}
- rv = nat_ipfix_logging_enable_disable (enable, domain_id, (u16) src_port);
+ if (!enable_set)
+ {
+ error = clib_error_return (0, "expected enable | disable");
+ goto done;
+ }
- if (rv)
+ if (nat_ipfix_logging_enable_disable (enable, domain_id, (u16) src_port))
{
error = clib_error_return (0, "ipfix logging enable failed");
goto done;
clib_error_t *error = 0;
u32 psid, psid_offset, psid_length, port_start, port_end;
- /* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
- return 0;
+ return clib_error_return (0, NAT44_EI_EXPECTED_ARGUMENT);
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
clib_error_t *error = 0;
u32 mss;
- /* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
- return 0;
+ return clib_error_return (0, NAT44_EI_EXPECTED_ARGUMENT);
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
int rv;
clib_error_t *error = 0;
- /* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
- return 0;
+ return clib_error_return (0, NAT44_EI_EXPECTED_ARGUMENT);
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
}
}
- rv = nat_ha_set_failover (&addr, (u16) port, session_refresh_interval);
+ rv = nat_ha_set_failover (vm, &addr, (u16) port, session_refresh_interval);
if (rv)
error = clib_error_return (0, "set HA failover failed");
int rv;
clib_error_t *error = 0;
- /* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
- return 0;
+ return clib_error_return (0, NAT44_EI_EXPECTED_ARGUMENT);
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
}
}
- rv = nat_ha_set_listener (&addr, (u16) port, path_mtu);
+ rv = nat_ha_set_listener (vm, &addr, (u16) port, path_mtu);
if (rv)
error = clib_error_return (0, "set HA listener failed");
int rv = 0;
clib_error_t *error = 0;
- /* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
- return 0;
+ return clib_error_return (0, NAT44_EI_EXPECTED_ARGUMENT);
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
for (i = 0; i < count; i++)
{
if (is_add)
- rv = nat44_ei_add_address (nm, &this_addr, vrf_id);
+ rv = nat44_ei_add_address (&this_addr, vrf_id);
else
- rv = nat44_ei_del_address (nm, this_addr, 0);
+ rv = nat44_ei_del_address (this_addr, 0);
switch (rv)
{
u32 *inside_sw_if_indices = 0;
u32 *outside_sw_if_indices = 0;
u8 is_output_feature = 0;
- int is_del = 0;
- int i;
+ int i, rv, is_del = 0;
sw_if_index = ~0;
- /* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
- return 0;
+ return clib_error_return (0, NAT44_EI_EXPECTED_ARGUMENT);
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
sw_if_index = inside_sw_if_indices[i];
if (is_output_feature)
{
- if (nat44_ei_interface_add_del_output_feature (sw_if_index, 1,
- is_del))
+ if (is_del)
+ {
+ rv = nat44_ei_del_output_interface (sw_if_index);
+ }
+ else
+ {
+ rv = nat44_ei_add_output_interface (sw_if_index);
+ }
+ if (rv)
{
error = clib_error_return (
0, "%s %U failed", is_del ? "del" : "add",
}
else
{
- if (nat44_ei_interface_add_del (sw_if_index, 1, is_del))
+ if (is_del)
+ {
+ rv = nat44_ei_del_interface (sw_if_index, 1);
+ }
+ else
+ {
+ rv = nat44_ei_add_interface (sw_if_index, 1);
+ }
+ if (rv)
{
error = clib_error_return (
0, "%s %U failed", is_del ? "del" : "add",
sw_if_index = outside_sw_if_indices[i];
if (is_output_feature)
{
- if (nat44_ei_interface_add_del_output_feature (sw_if_index, 0,
- is_del))
+ if (is_del)
+ {
+ rv = nat44_ei_del_output_interface (sw_if_index);
+ }
+ else
+ {
+ rv = nat44_ei_add_output_interface (sw_if_index);
+ }
+ if (rv)
{
error = clib_error_return (
0, "%s %U failed", is_del ? "del" : "add",
}
else
{
- if (nat44_ei_interface_add_del (sw_if_index, 0, is_del))
+ if (is_del)
+ {
+ rv = nat44_ei_del_interface (sw_if_index, 0);
+ }
+ else
+ {
+ rv = nat44_ei_add_interface (sw_if_index, 0);
+ }
+ if (rv)
{
error = clib_error_return (
0, "%s %U failed", is_del ? "del" : "add",
vlib_cli_command_t *cmd)
{
unformat_input_t _line_input, *line_input = &_line_input;
- clib_error_t *error = 0;
- ip4_address_t l_addr, e_addr;
- u32 l_port = 0, e_port = 0, vrf_id = ~0;
- int is_add = 1, addr_only = 1, rv;
- u32 sw_if_index = ~0;
vnet_main_t *vnm = vnet_get_main ();
+ clib_error_t *error = 0;
+ int rv;
+
nat_protocol_t proto = NAT_PROTOCOL_OTHER;
- u8 proto_set = 0;
+ ip4_address_t l_addr, e_addr, pool_addr = { 0 };
+ u32 l_port = 0, e_port = 0, vrf_id = ~0;
+ u8 l_port_set = 0, e_port_set = 0;
+ u32 sw_if_index = ~0, flags = 0;
+ int is_add = 1;
- /* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
- return 0;
+ return clib_error_return (0, NAT44_EI_EXPECTED_ARGUMENT);
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (line_input, "local %U %u", unformat_ip4_address, &l_addr,
&l_port))
- addr_only = 0;
+ {
+ l_port_set = 1;
+ }
else if (unformat (line_input, "local %U", unformat_ip4_address,
&l_addr))
;
else if (unformat (line_input, "external %U %u", unformat_ip4_address,
&e_addr, &e_port))
- addr_only = 0;
+ {
+ e_port_set = 1;
+ }
else if (unformat (line_input, "external %U", unformat_ip4_address,
&e_addr))
;
else if (unformat (line_input, "external %U %u",
unformat_vnet_sw_interface, vnm, &sw_if_index,
&e_port))
- addr_only = 0;
+ {
+ e_port_set = 1;
+ }
else if (unformat (line_input, "external %U", unformat_vnet_sw_interface,
vnm, &sw_if_index))
;
else if (unformat (line_input, "vrf %u", &vrf_id))
;
else if (unformat (line_input, "%U", unformat_nat_protocol, &proto))
- proto_set = 1;
+ ;
else if (unformat (line_input, "del"))
- is_add = 0;
+ {
+ is_add = 0;
+ }
else
{
error = clib_error_return (0, "unknown input: '%U'",
}
}
- if (addr_only)
+ if (l_port_set != e_port_set)
{
- if (proto_set)
- {
- error = clib_error_return (
- 0, "address only mapping doesn't support protocol");
- goto done;
- }
+ error = clib_error_return (0, "Either both ports are set or none.");
+ goto done;
}
- else if (!proto_set)
+
+ if (!l_port_set)
{
- error = clib_error_return (0, "protocol is required");
- goto done;
+ flags |= NAT44_EI_SM_FLAG_ADDR_ONLY;
+ }
+ else
+ {
+ l_port = clib_host_to_net_u16 (l_port);
+ e_port = clib_host_to_net_u16 (e_port);
}
- rv = nat44_ei_add_del_static_mapping (
- l_addr, e_addr, clib_host_to_net_u16 (l_port),
- clib_host_to_net_u16 (e_port), proto, sw_if_index, vrf_id, addr_only, 0, 0,
- is_add);
+ if (sw_if_index != ~0)
+ {
+ flags |= NAT44_EI_SM_FLAG_SWITCH_ADDRESS;
+ }
+
+ if (is_add)
+ {
+ rv =
+ nat44_ei_add_static_mapping (l_addr, e_addr, l_port, e_port, proto,
+ vrf_id, sw_if_index, flags, pool_addr, 0);
+ }
+ else
+ {
+ rv = nat44_ei_del_static_mapping (l_addr, e_addr, l_port, e_port, proto,
+ vrf_id, sw_if_index, flags);
+ }
switch (rv)
{
vlib_cli_command_t *cmd)
{
unformat_input_t _line_input, *line_input = &_line_input;
+ vnet_main_t *vnm = vnet_get_main ();
clib_error_t *error = 0;
- u32 port = 0, vrf_id = ~0;
+
+ int rv, is_add = 1, port_set = 0;
+ u32 sw_if_index = ~0, port, flags, vrf_id = ~0;
+ nat_protocol_t proto = NAT_PROTOCOL_OTHER;
ip4_address_t addr;
- int is_add = 1;
- int addr_only = 1;
- u32 sw_if_index = ~0;
- vnet_main_t *vnm = vnet_get_main ();
- int rv;
- nat_protocol_t proto;
- addr.as_u32 = 0;
+ flags = NAT44_EI_SM_FLAG_IDENTITY_NAT;
- /* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
- return 0;
+ return clib_error_return (0, NAT44_EI_EXPECTED_ARGUMENT);
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
;
else if (unformat (line_input, "%U %u", unformat_nat_protocol, &proto,
&port))
- addr_only = 0;
+ {
+ port_set = 1;
+ }
else if (unformat (line_input, "del"))
- is_add = 0;
+ {
+ is_add = 0;
+ }
else
{
error = clib_error_return (0, "unknown input: '%U'",
}
}
- rv = nat44_ei_add_del_static_mapping (
- addr, addr, clib_host_to_net_u16 (port), clib_host_to_net_u16 (port),
- proto, sw_if_index, vrf_id, addr_only, 1, 0, is_add);
+ if (!port_set)
+ {
+ flags |= NAT44_EI_SM_FLAG_ADDR_ONLY;
+ }
+ else
+ {
+ port = clib_host_to_net_u16 (port);
+ }
+
+ if (sw_if_index != ~0)
+ {
+ flags |= NAT44_EI_SM_FLAG_SWITCH_ADDRESS;
+ }
+
+ if (is_add)
+ {
+
+ rv = nat44_ei_add_static_mapping (addr, addr, port, port, proto, vrf_id,
+ sw_if_index, flags, addr, 0);
+ }
+ else
+ {
+ rv = nat44_ei_del_static_mapping (addr, addr, port, port, proto, vrf_id,
+ sw_if_index, flags);
+ }
switch (rv)
{
unformat_input_t *input,
vlib_cli_command_t *cmd)
{
- nat44_ei_main_t *nm = &nat44_ei_main;
unformat_input_t _line_input, *line_input = &_line_input;
- u32 sw_if_index;
- int rv;
- int is_del = 0;
+ nat44_ei_main_t *nm = &nat44_ei_main;
clib_error_t *error = 0;
+ int rv, is_del = 0;
+ u32 sw_if_index;
- /* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
- return 0;
+ return clib_error_return (0, NAT44_EI_EXPECTED_ARGUMENT);
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
nm->vnet_main, &sw_if_index))
;
else if (unformat (line_input, "del"))
- is_del = 1;
+ {
+ is_del = 1;
+ }
else
{
error = clib_error_return (0, "unknown input '%U'",
}
}
- rv = nat44_ei_add_interface_address (nm, sw_if_index, is_del);
-
- switch (rv)
+ if (!is_del)
{
- case 0:
- break;
-
- default:
- error = clib_error_return (
- 0, "nat44_ei_add_interface_address returned %d", rv);
- goto done;
+ rv = nat44_ei_add_interface_address (sw_if_index);
+ if (rv)
+ {
+ error = clib_error_return (0, "add address returned %d", rv);
+ }
+ }
+ else
+ {
+ rv = nat44_ei_del_interface_address (sw_if_index);
+ if (rv)
+ {
+ error = clib_error_return (0, "del address returned %d", rv);
+ }
}
done:
{
unformat_input_t _line_input, *line_input = &_line_input;
clib_error_t *error = 0;
+ ip4_address_t saddr;
+ u8 filter_saddr = 0;
nat44_ei_main_per_thread_data_t *tnm;
nat44_ei_main_t *nm = &nat44_ei_main;
{
if (unformat (line_input, "detail"))
detail = 1;
+ else if (unformat (line_input, "filter saddr %U", unformat_ip4_address,
+ &saddr))
+ filter_saddr = 1;
else
{
error = clib_error_return (0, "unknown input '%U'",
nat44_ei_user_t *u;
pool_foreach (u, tnm->users)
{
+ if (filter_saddr && saddr.as_u32 != u->addr.as_u32)
+ continue;
vlib_cli_output (vm, " %U", format_nat44_ei_user, tnm, u, detail);
}
}
u32 fib_index = 0;
int rv;
- /* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
- return 0;
+ return clib_error_return (0, NAT44_EI_EXPECTED_ARGUMENT);
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
ip4_address_t addr;
int rv, is_in = 0;
- /* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
- return 0;
+ return clib_error_return (0, NAT44_EI_EXPECTED_ARGUMENT);
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
{
nat44_ei_main_t *nm = &nat44_ei_main;
unformat_input_t _line_input, *line_input = &_line_input;
- u8 forwarding_enable;
- u8 forwarding_enable_set = 0;
clib_error_t *error = 0;
- /* Get a line of input. */
+ u8 enable_set = 0, enable = 0;
+
if (!unformat_user (input, unformat_line_input, line_input))
- return clib_error_return (0, "'enable' or 'disable' expected");
+ return clib_error_return (0, NAT44_EI_EXPECTED_ARGUMENT);
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
- if (!forwarding_enable_set && unformat (line_input, "enable"))
+ if (!enable_set)
{
- forwarding_enable = 1;
- forwarding_enable_set = 1;
- }
- else if (!forwarding_enable_set && unformat (line_input, "disable"))
- {
- forwarding_enable = 0;
- forwarding_enable_set = 1;
+ enable_set = 1;
+ if (unformat (line_input, "disable"))
+ ;
+ else if (unformat (line_input, "enable"))
+ enable = 1;
}
else
{
}
}
- if (!forwarding_enable_set)
- {
- error = clib_error_return (0, "'enable' or 'disable' expected");
- goto done;
- }
-
- nm->forwarding_enabled = forwarding_enable;
+ if (!enable_set)
+ error = clib_error_return (0, "expected enable | disable");
+ else
+ nm->forwarding_enabled = enable;
done:
unformat_free (line_input);
-
return error;
}
unformat_input_t _line_input, *line_input = &_line_input;
clib_error_t *error = 0;
- /* Get a line of input. */
if (!unformat_user (input, unformat_line_input, line_input))
- return 0;
+ return clib_error_return (0, NAT44_EI_EXPECTED_ARGUMENT);
while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
{
{
nat44_ei_main_t *nm = &nat44_ei_main;
- // TODO: make format timeout function
vlib_cli_output (vm, "udp timeout: %dsec", nm->timeouts.udp);
vlib_cli_output (vm, "tcp-established timeout: %dsec",
nm->timeouts.tcp.established);
/*?
* @cliexpar
- * @cliexstart{nat44 ei enable}
+ * @cliexstart{nat44 ei}
* Enable nat44 ei plugin
- * To enable nat44, use:
- * vpp# nat44 ei enable sessions <n>
+ * To enable nat44-ei, use:
+ * vpp# nat44 ei plugin enable
+ * To disable nat44-ei, use:
+ * vpp# nat44 ei plugin disable
* To enable nat44 ei static mapping only, use:
- * vpp# nat44 ei enable sessions <n> static-mapping
+ * vpp# nat44 ei plugin enable static-mapping
* To enable nat44 ei static mapping with connection tracking, use:
- * vpp# nat44 ei enable sessions <n> static-mapping connection-tracking
+ * vpp# nat44 ei plugin enable static-mapping connection-tracking
* To enable nat44 ei out2in dpo, use:
- * vpp# nat44 ei enable sessions <n> out2in-dpo
+ * vpp# nat44 ei plugin enable out2in-dpo
* To set inside-vrf outside-vrf, use:
- * vpp# nat44 ei enable sessions <n> inside-vrf <id> outside-vrf <id>
+ * vpp# nat44 ei plugin enable inside-vrf <id> outside-vrf <id>
* @cliexend
?*/
-VLIB_CLI_COMMAND (nat44_ei_enable_command, static) = {
- .path = "nat44 ei enable",
+VLIB_CLI_COMMAND (nat44_ei_enable_disable_command, static) = {
+ .path = "nat44 ei plugin",
.short_help =
- "nat44 ei enable sessions <max-number> [users <max-number>] "
+ "nat44 ei plugin <enable [sessions <max-number>] [users <max-number>] "
"[static-mappig-only [connection-tracking]|out2in-dpo] [inside-vrf "
- "<vrf-id>] [outside-vrf <vrf-id>] [user-sessions <max-number>]",
- .function = nat44_ei_enable_command_fn,
-};
-
-/*?
- * @cliexpar
- * @cliexstart{nat44 ei disable}
- * Disable nat44 ei plugin
- * To disable nat44, use:
- * vpp# nat44 ei disable
- * @cliexend
-?*/
-VLIB_CLI_COMMAND (nat44_ei_disable_command, static) = {
- .path = "nat44 ei disable",
- .short_help = "nat44 ei disable",
- .function = nat44_ei_disable_command_fn,
+ "<vrf-id>] [outside-vrf <vrf-id>] [user-sessions <max-number>]>|disable",
+ .function = nat44_ei_enable_disable_command_fn,
};
/*?
VLIB_CLI_COMMAND (nat_show_workers_command, static) = {
.path = "show nat44 ei workers",
.short_help = "show nat44 ei workers",
- .function = nat_show_workers_commnad_fn,
+ .function = nat_show_workers_command_fn,
};
/*?
VLIB_CLI_COMMAND (nat44_ei_ipfix_logging_enable_disable_command, static) = {
.path = "nat44 ei ipfix logging",
.function = nat44_ei_ipfix_logging_enable_disable_command_fn,
- .short_help =
- "nat44 ei ipfix logging [domain <domain-id>] [src-port <port>] [disable]",
+ .short_help = "nat44 ei ipfix logging <enable [domain <domain-id>] "
+ "[src-port <port>]>|disable",
};
/*?
?*/
VLIB_CLI_COMMAND (nat44_ei_show_sessions_command, static) = {
.path = "show nat44 ei sessions",
- .short_help = "show nat44 ei sessions [detail|metrics]",
+ .short_help = "show nat44 ei sessions [detail] [filter saddr <ip>]",
.function = nat44_ei_show_sessions_command_fn,
};