24 .arc_name =
"ip6-punt",
30 .arc_name =
"ip6-drop",
37 #ifndef CLIB_MARCH_VARIANT 42 #define _(sym,string) string, 52 vnet_feat_arc_ip6_punt.feature_arc_index,
60 .name =
"ip6-punt-policer",
61 .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);
117 .vector_size =
sizeof (
u32),
127 .name =
"ip6-not-enabled",
128 .vector_size =
sizeof (
u32),
139 .vector_size =
sizeof (
u32),
148 .arc_name =
"ip6-punt",
149 .node_name =
"error-punt",
154 .arc_name =
"ip6-drop",
155 .node_name =
"error-drop",
160 #ifndef CLIB_MARCH_VARIANT 188 if (
unformat (line_input,
"%d", &policer_index))
190 else if (
unformat (line_input,
"del"))
192 else if (
unformat (line_input,
"add"))
201 if (is_add && ~0 == policer_index)
225 .path =
"ip6 punt policer",
227 .short_help =
"ip6 punt policer [add|del] <index>",
232 #define foreach_ip6_punt_redirect_error \ 233 _(DROP, "ip6 punt redirect drop") 237 #define _(sym,str) IP6_PUNT_REDIRECT_ERROR_##sym, 244 #define _(sym,string) string, 254 vnet_feat_arc_ip6_punt.feature_arc_index,
260 .name =
"ip6-punt-redirect",
261 .vector_size =
sizeof (
u32),
276 .arc_name =
"ip6-punt",
277 .node_name =
"ip6-punt-redirect",
282 #ifndef CLIB_MARCH_VARIANT 286 u32 tx_sw_if_index, ip46_address_t *
nh)
292 .frp_sw_if_index = tx_sw_if_index,
332 u32 rx_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",
363 if (~0 == rx_sw_if_index)
392 .path =
"ip6 punt redirect",
394 .short_help =
"ip6 punt redirect [add|del] rx [<interface>|all] via [<nh>] <tx_interface>",
398 #ifndef CLIB_MARCH_VARIANT 420 .path =
"show ip6 punt redirect",
422 .short_help =
"show ip6 punt redirect",
Contribute an object that is to be used to forward IP6 packets.
ip6_punt_redirect_error_t
A representation of a path as described by a route producer.
vnet_main_t * vnet_get_main(void)
uword unformat_fib_route_path(unformat_input_t *input, va_list *args)
Unformat a fib_route_path_t from CLI input.
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)
u8 * format_ip_punt_redirect_trace(u8 *s, va_list *args)
vlib_node_registration_t ip6_not_enabled_node
(constructor) VLIB_REGISTER_NODE (ip6_not_enabled_node)
#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)
dpo_proto_t frp_proto
The protocol of the address below.
unformat_function_t unformat_vnet_sw_interface
#define VLIB_NODE_FN(node)
void ip_punt_redirect_add(fib_protocol_t fproto, u32 rx_sw_if_index, fib_forward_chain_type_t ct, fib_route_path_t *rpaths)
Add a punt redirect entry.
void ip6_punt_redirect_del(u32 rx_sw_if_index)
u8 * format_ip_punt_redirect(u8 *s, va_list *args)
void ip6_punt_policer_add_del(u8 is_add, u32 policer_index)
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
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
ip_punt_policer_t ip6_punt_policer_cfg
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.
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)
static clib_error_t * ip6_punt_redirect_show_cmd(vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
vlib_node_registration_t ip6_punt_node
(constructor) VLIB_REGISTER_NODE (ip6_punt_node)
#define VLIB_REGISTER_NODE(x,...)
#define vec_free(V)
Free vector's memory (no header).
#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(...)
static uword ip_punt_redirect(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u8 arc_index, fib_protocol_t fproto)
void ip_punt_redirect_del(fib_protocol_t fproto, u32 rx_sw_if_index)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
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)
#define VLIB_NODE_FLAG_TRACE
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
void ip6_punt_redirect_add_paths(u32 rx_sw_if_index, fib_route_path_t *rpaths)
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)