|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
17 #define DSLITE_EXPECTED_ARGUMENT "expected required argument(s)"
27 u32 start_host_order, end_host_order;
44 else if (
unformat (line_input,
"del"))
54 start_host_order = clib_host_to_net_u32 (
start_addr.as_u32);
55 end_host_order = clib_host_to_net_u32 (
end_addr.as_u32);
57 if (end_host_order < start_host_order)
63 count = (end_host_order - start_host_order) + 1;
70 case VNET_API_ERROR_NO_SUCH_ENTRY:
75 case VNET_API_ERROR_VALUE_EXIST:
114 ip6_address_t ip6_addr;
139 "Set DS-Lite AFTR tunnel endpoint address failed.");
165 ip6_address_t ip6_addr;
211 dslite_session_t *session = va_arg (*args, dslite_session_t *);
214 s =
format (s,
"%Uin %U:%u out %U:%u protocol %U\n",
217 clib_net_to_host_u16 (session->in2out.port),
219 clib_net_to_host_u16 (session->out2in.port),
221 s =
format (s,
"%Utotal pkts %d, total bytes %lld\n",
223 session->total_pkts, session->total_bytes);
233 u32 elt_index, head_index;
235 dslite_session_t *session;
246 elt_index = head->
next;
248 session_index =
elt->value;
249 while (session_index != ~0)
255 session_index =
elt->value;
296 .path =
"dslite add pool address",
297 .short_help =
"dslite add pool address <ip4-range-start> [- <ip4-range-end>] "
315 .path =
"show dslite pool",
316 .short_help =
"show dslite pool",
329 .path =
"dslite set aftr-tunnel-endpoint-address",
330 .short_help =
"dslite set aftr-tunnel-endpoint-address <ip6>",
343 .path =
"show dslite aftr-tunnel-endpoint-address",
344 .short_help =
"show dslite aftr-tunnel-endpoint-address",
357 .path =
"dslite set b4-tunnel-endpoint-address",
358 .short_help =
"dslite set b4-tunnel-endpoint-address <ip6>",
371 .path =
"show dslite b4-tunnel-endpoint-address",
372 .short_help =
"show dslite b4-tunnel-endpoint-address",
392 .path =
"show dslite sessions",
393 .short_help =
"show dslite sessions",
u32 sessions_per_b4_list_head_index
static vlib_cli_command_t dslite_add_pool_address_command
(constructor) VLIB_CLI_COMMAND (dslite_add_pool_address_command)
static clib_error_t * dslite_show_pool_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static clib_error_t * dslite_set_aftr_tunnel_addr_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vl_api_address_t end_addr
static u8 * format_dslite_b4(u8 *s, va_list *args)
struct app_rx_mq_elt_ * next
int dslite_set_aftr_ip6_addr(dslite_main_t *dm, ip6_address_t *addr)
dslite_per_thread_data_t * per_thread_data
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
static u8 * format_dslite_session(u8 *s, va_list *args)
dslite_session_t * sessions
#define clib_error_return(e, args...)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
ip6_address_t aftr_ip6_addr
static vlib_cli_command_t dslite_set_aftr_tunnel_addr
(constructor) VLIB_CLI_COMMAND (dslite_set_aftr_tunnel_addr)
static vlib_cli_command_t dslite_set_b4_tunnel_addr
(constructor) VLIB_CLI_COMMAND (dslite_set_b4_tunnel_addr)
vl_api_address_t start_addr
#define pool_foreach(VAR, POOL)
Iterate through pool.
static clib_error_t * dslite_set_b4_tunnel_addr_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static clib_error_t * dslite_show_b4_ip6_addr_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define VLIB_CLI_COMMAND(x,...)
static vlib_cli_command_t dslite_show_aftr_ip6_addr
(constructor) VLIB_CLI_COMMAND (dslite_show_aftr_ip6_addr)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
static clib_error_t * dslite_show_sessions_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static vlib_cli_command_t dslite_show_sessions
(constructor) VLIB_CLI_COMMAND (dslite_show_sessions)
nat_ip4_pool_addr_t * pool_addr
format_function_t format_nat_protocol
static vlib_cli_command_t show_dslite_pool_command
(constructor) VLIB_CLI_COMMAND (show_dslite_pool_command)
description fragment has unexpected format
static clib_error_t * dslite_show_aftr_ip6_addr_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
ip6_address_t b4_ip6_addr
static vlib_cli_command_t dslite_show_b4_ip6_addr
(constructor) VLIB_CLI_COMMAND (dslite_show_b4_ip6_addr)
#define vec_foreach(var, vec)
Vector iterator.
int dslite_set_b4_ip6_addr(dslite_main_t *dm, ip6_address_t *addr)
int nat_add_del_ip4_pool_addrs(nat_ip4_pool_t *pool, ip4_address_t addr, u32 count, u8 is_add, void *opaque)
#define DSLITE_EXPECTED_ARGUMENT
dslite_main_t dslite_main
static clib_error_t * dslite_add_del_pool_addr_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)