24 .arc_name =
"ip6-punt",
30 .arc_name =
"ip6-drop",
38 #define _(sym,string) string, 48 vnet_feat_arc_ip6_punt.feature_arc_index,
57 .name =
"ip6-punt-policer",
58 .vector_size =
sizeof (
u32),
74 .arc_name =
"ip6-punt",
75 .node_name =
"ip6-punt-policer",
87 vnet_feat_arc_ip6_drop.feature_arc_index);
99 vnet_feat_arc_ip6_drop.feature_arc_index);
110 vnet_feat_arc_ip6_punt.feature_arc_index);
118 .vector_size =
sizeof (
u32),
131 .name =
"ip6-not-enabled",
132 .vector_size =
sizeof (
u32),
146 .vector_size =
sizeof (
u32),
157 .arc_name =
"ip6-punt",
158 .node_name =
"error-punt",
163 .arc_name =
"ip6-drop",
164 .node_name =
"error-drop",
195 if (
unformat (line_input,
"%d", &policer_index))
197 else if (
unformat (line_input,
"del"))
199 else if (
unformat (line_input,
"add"))
208 if (is_add && ~0 == policer_index)
232 .path =
"ip6 punt policer",
234 .short_help =
"ip6 punt policer [add|del] <index>",
246 #define foreach_ip6_punt_redirect_error \ 247 _(DROP, "ip6 punt redirect drop") 251 #define _(sym,str) IP6_PUNT_REDIRECT_ERROR_##sym, 258 #define _(sym,string) string, 268 vnet_feat_arc_ip6_punt.feature_arc_index,
269 &ip6_punt_redirect_cfg));
275 .name =
"ip6-punt-redirect",
276 .vector_size =
sizeof (
u32),
294 .arc_name =
"ip6-punt",
295 .node_name =
"ip6-punt-redirect",
302 u32 tx_sw_if_index, ip46_address_t * nh)
330 u32 rx_sw_if_index = 0;
331 u32 tx_sw_if_index = 0;
346 else if (
unformat (line_input,
"add"))
348 else if (
unformat (line_input,
"rx all"))
350 else if (
unformat (line_input,
"rx %U",
353 else if (
unformat (line_input,
"via %U %U",
358 else if (
unformat (line_input,
"via %U",
370 if (rx_sw_if_index && tx_sw_if_index)
396 .path =
"ip6 punt redirect",
398 .short_help =
"ip6 punt redirect [add|del] rx [<interface>|all] via [<nh>] <tx_interface>",
412 if (sw_if_index == ~0 || sw_if_index == rx_sw_if_index)
460 .path =
"show ip6 punt redirect",
462 .short_help =
"show ip6 punt redirect",
static uword ip6_punt(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
#define vec_foreach_index(var, v)
Iterate over vector indices.
ip6_punt_redirect_error_t
vnet_main_t * vnet_get_main(void)
static vlib_node_registration_t ip6_punt_redirect_node
(constructor) VLIB_REGISTER_NODE (ip6_punt_redirect_node)
static clib_error_t * ip6_punt_redirect_cmd(vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
static vlib_node_registration_t ip6_not_enabled_node
(constructor) VLIB_REGISTER_NODE (ip6_not_enabled_node)
ip_punt_redirect_rx_t * redirect_by_rx_sw_if_index
per-RX interface configuration
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
static uword ip_drop_or_punt(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u8 arc_index)
void ip_punt_redirect_del(ip_punt_redirect_t *cfg, u32 rx_sw_if_index)
clib_memset(h->entries, 0, sizeof(h->entries[0])*entries)
unformat_function_t unformat_vnet_sw_interface
static uword ip6_punt_policer(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
void ip6_punt_redirect_del(u32 rx_sw_if_index)
u8 * format_ip_punt_redirect_trace(u8 *s, va_list *args)
void ip6_punt_policer_add_del(u8 is_add, u32 policer_index)
static vlib_node_registration_t ip6_drop_node
(constructor) VLIB_REGISTER_NODE (ip6_drop_node)
void ip6_punt_redirect_add(u32 rx_sw_if_index, u32 tx_sw_if_index, ip46_address_t *nh)
static char * ip6_punt_policer_error_strings[]
#define clib_error_return(e, args...)
#define foreach_ip_punt_policer_error
ip_punt_policer_t ip6_punt_policer_cfg
IP punt redirect configuration.
ip_punt_redirect_detail_t * ip6_punt_redirect_entries(u32 sw_if_index)
static uword ip_punt_policer(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u8 arc_index, u32 policer_index)
IP punt policing node function.
static vlib_node_registration_t ip6_punt_policer_node
(constructor) VLIB_REGISTER_NODE (ip6_punt_policer_node)
u8 * format_ip_punt_policer_trace(u8 *s, va_list *args)
#define ADJ_INDEX_INVALID
Invalid ADJ index - used when no adj is known likewise blazoned capitals INVALID speak volumes where ...
static clib_error_t * ip6_punt_redirect_show_cmd(vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
static vlib_node_registration_t ip6_punt_node
(constructor) VLIB_REGISTER_NODE (ip6_punt_node)
static uword ip6_punt_redirect(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static uword ip6_not_enabled(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static uword ip_punt_redirect(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u8 arc_index, ip_punt_redirect_t *redirect)
#define VLIB_REGISTER_NODE(x,...)
ip_punt_redirect_rx_t any_rx_sw_if_index
any RX interface redirect
IP4 punt redirect per-rx interface configuration redirect punted traffic to another location...
u32 tx_sw_if_index
the TX interface to send redirected packets
#define VLIB_CLI_COMMAND(x,...)
VNET_FEATURE_INIT(ip6_punt_policer_node, static)
#define foreach_ip6_punt_redirect_error
IP4 punt policer configuration we police the punt rate to prevent overloading the host...
static char * ip6_punt_redirect_error_strings[]
#define VNET_FEATURES(...)
void ip_punt_redirect_add(ip_punt_redirect_t *cfg, u32 rx_sw_if_index, ip_punt_redirect_rx_t *redirect, fib_protocol_t fproto, vnet_link_t linkt)
Add a punt redirect entry.
u32 rx_sw_if_index
the RX interface
VNET_FEATURE_ARC_INIT(ip6_punt)
void ip6_forward_next_trace(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, vlib_rx_or_tx_t which_adj_index)
u8 * format_ip_punt_redirect(u8 *s, va_list *args)
u16 flags
Copy of main node flags.
static uword ip6_drop(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
#define VLIB_NODE_FLAG_TRACE
VLIB_NODE_FUNCTION_MULTIARCH(ip6_punt_policer_node, ip6_punt_policer)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
int vnet_feature_enable_disable(const char *arc_name, const char *node_name, u32 sw_if_index, int enable_disable, void *feature_config, u32 n_feature_config_bytes)
static clib_error_t * ip6_punt_police_cmd(vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
u8 * format_ip6_forward_next_trace(u8 *s, va_list *args)