|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
37 s =
format(s,
":%u,", t->sport);
49 s =
format(s,
":%u", t->dport);
63 s =
format(s,
":%u,", t->sport);
71 s =
format(s,
":%u", t->dport);
75 s =
format(s,
" copy byte@[%d->%d]", t->from_offset, t->to_offset);
77 s =
format(s,
" clear byte@[%d]", t->clear_offset);
187 bool in =
false, out =
false;
188 bool match_set =
false, rewrite_set =
false;
204 else if (
unformat(line_input,
"interface %U",
208 else if (
unformat(line_input,
"in")) {
210 }
else if (
unformat(line_input,
"out")) {
212 }
else if (
unformat(line_input,
"del")) {
225 if ((in && out) || (!in && !out)) {
241 if ((match.dport || match.sport) &&
242 (match.proto != 17 && match.proto != 6)) {
260 0,
"Attaching binding to interface failed %d",
rv);
267 if (binding_index == ~0) {
294 .path =
"set pnat translation",
295 .short_help =
"set pnat translation interface <name> match <5-tuple> "
296 "rewrite <tuple> {in|out} [del]",
316 .path =
"show pnat translations",
317 .short_help =
"show pnat translations",
336 .path =
"show pnat interfaces",
337 .short_help =
"show pnat interfaces",
static clib_error_t * show_pnat_translations_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vl_api_pnat_match_tuple_t pnat_match_tuple_t
int pnat_binding_attach(u32 sw_if_index, pnat_attachment_point_t attachment, u32 binding_index)
int pnat_binding_del(u32 index)
static u8 * format_pnat_mask(u8 *s, va_list *args)
#define clib_error_return(e, args...)
pnat_rewrite_tuple_t rewrite
uword unformat_pnat_match_tuple(unformat_input_t *input, va_list *args)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
vl_api_pnat_mask_t pnat_mask_t
static clib_error_t * set_pnat_translation_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static u8 * format_pnat_interface(u8 *s, va_list *args)
#define pool_foreach(VAR, POOL)
Iterate through pool.
u32 pnat_flow_lookup(u32 sw_if_index, pnat_attachment_point_t attachment, pnat_match_tuple_t *match)
vl_api_pnat_rewrite_tuple_t pnat_rewrite_tuple_t
static vlib_cli_command_t show_pnat_translations_command
(constructor) VLIB_CLI_COMMAND (show_pnat_translations_command)
int pnat_binding_detach(u32 sw_if_index, pnat_attachment_point_t attachment, u32 binding_index)
static vlib_cli_command_t show_pnat_interfaces_command
(constructor) VLIB_CLI_COMMAND (show_pnat_interfaces_command)
vnet_main_t * vnet_get_main(void)
pnat_translation_t * translations
static vlib_cli_command_t set_pnat_translation_command
(constructor) VLIB_CLI_COMMAND (set_pnat_translation_command)
u8 * format_pnat_match_tuple(u8 *s, va_list *args)
u8 * format_pnat_translation(u8 *s, va_list *args)
Fixed length block allocator. Pools are built from clib vectors and bitmaps. Use pools when repeatedl...
#define VLIB_CLI_COMMAND(x,...)
uword unformat_pnat_rewrite_tuple(unformat_input_t *input, va_list *args)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
unformat_function_t unformat_vnet_sw_interface
description fragment has unexpected format
u8 * format_pnat_rewrite_tuple(u8 *s, va_list *args)
static clib_error_t * show_pnat_interfaces_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
pnat_interface_t * interfaces
vl_api_interface_index_t sw_if_index
int pnat_binding_add(pnat_match_tuple_t *match, pnat_rewrite_tuple_t *rewrite, u32 *index)
vl_api_pnat_attachment_point_t pnat_attachment_point_t