FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
ip4_punt_drop.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include <vnet/ip/ip.h>
17 #include <vnet/ip/ip_punt_drop.h>
18 #include <vnet/policer/policer.h>
20 
21 /* *INDENT-OFF* */
23 {
24  .arc_name = "ip4-punt",
25  .start_nodes = VNET_FEATURES ("ip4-punt"),
26 };
27 
28 VNET_FEATURE_ARC_INIT (ip4_drop) =
29 {
30  .arc_name = "ip4-drop",
31  .start_nodes = VNET_FEATURES ("ip4-drop", "ip4-not-enabled"),
32 };
33 /* *INDENT-ON* */
34 
36 
37 #ifndef CLIB_MARCH_VARIANT
38 u8 *
39 format_ip_punt_policer_trace (u8 * s, va_list * args)
40 {
41  CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
42  CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
43  ip_punt_policer_trace_t *t = va_arg (*args, ip_punt_policer_trace_t *);
44 
45  s = format (s, "policer_index %d next %d", t->policer_index, t->next);
46  return s;
47 }
48 
50  .policer_index = ~0,
51 };
52 #endif /* CLIB_MARCH_VARIANT */
53 
54 static char *ip4_punt_policer_handoff_error_strings[] = { "congestion drop" };
55 
58 {
61 }
62 
64  .name = "ip4-punt-policer-handoff",
65  .vector_size = sizeof (u32),
66  .format_trace = format_policer_handoff_trace,
70 
71  .n_next_nodes = 1,
72  .next_nodes = {
73  [0] = "error-drop",
74  },
75 };
76 
78 #define _(sym,string) string,
80 #undef _
81 };
82 
86 {
87  return (ip_punt_policer (vm, node, frame,
88  vnet_feat_arc_ip4_punt.feature_arc_index,
90 }
91 
92 /* *INDENT-OFF* */
94  .name = "ip4-punt-policer",
95  .vector_size = sizeof (u32),
96  .n_next_nodes = IP_PUNT_POLICER_N_NEXT,
97  .format_trace = format_ip_punt_policer_trace,
99  .error_strings = ip4_punt_policer_error_strings,
100 
101  .next_nodes = {
102  [IP_PUNT_POLICER_NEXT_DROP] = "ip4-drop",
103  [IP_PUNT_POLICER_NEXT_HANDOFF] = "ip4-punt-policer-handoff",
104  },
105 };
106 
108  .arc_name = "ip4-punt",
109  .node_name = "ip4-punt-policer",
110  .runs_before = VNET_FEATURES("ip4-punt-redirect"),
111 };
112 /* *INDENT-ON* */
113 
114 
115 #define foreach_ip4_punt_redirect_error \
116 _(DROP, "ip4 punt redirect drop")
117 
118 typedef enum
119 {
120 #define _(sym,str) IP4_PUNT_REDIRECT_ERROR_##sym,
122 #undef _
125 
127 #define _(sym,string) string,
129 #undef _
130 };
131 
135 {
136  return (ip_punt_redirect (vm, node, frame,
137  vnet_feat_arc_ip4_punt.feature_arc_index,
139 }
140 
141 /* *INDENT-OFF* */
143  .name = "ip4-punt-redirect",
144  .vector_size = sizeof (u32),
145  .n_next_nodes = IP_PUNT_REDIRECT_N_NEXT,
146  .format_trace = format_ip_punt_redirect_trace,
148  .error_strings = ip4_punt_redirect_error_strings,
149 
150  /* edit / add dispositions here */
151  .next_nodes = {
152  [IP_PUNT_REDIRECT_NEXT_DROP] = "ip4-drop",
153  [IP_PUNT_REDIRECT_NEXT_TX] = "ip4-rewrite",
154  [IP_PUNT_REDIRECT_NEXT_ARP] = "ip4-arp",
155  },
156 };
157 
159  .arc_name = "ip4-punt",
160  .node_name = "ip4-punt-redirect",
161  .runs_before = VNET_FEATURES("error-punt"),
162 };
163 /* *INDENT-ON* */
164 
167 {
168  if (node->flags & VLIB_NODE_FLAG_TRACE)
170 
171  return ip_drop_or_punt (vm, node, frame,
172  vnet_feat_arc_ip4_drop.feature_arc_index);
173 
174 }
175 
179 {
180  if (node->flags & VLIB_NODE_FLAG_TRACE)
182 
183  return ip_drop_or_punt (vm, node, frame,
184  vnet_feat_arc_ip4_drop.feature_arc_index);
185 }
186 
187 static uword
189 {
190  if (node->flags & VLIB_NODE_FLAG_TRACE)
192 
193  return ip_drop_or_punt (vm, node, frame,
194  vnet_feat_arc_ip4_punt.feature_arc_index);
195 }
196 
197 /* *INDENT-OFF* */
199 {
200  .name = "ip4-drop",
201  .vector_size = sizeof (u32),
202  .format_trace = format_ip4_forward_next_trace,
203  .n_next_nodes = 1,
204  .next_nodes = {
205  [0] = "error-drop",
206  },
207 };
208 
210 {
211  .name = "ip4-not-enabled",
212  .vector_size = sizeof (u32),
213  .format_trace = format_ip4_forward_next_trace,
214  .sibling_of = "ip4-drop",
215 };
216 
218 {
219  .function = ip4_punt,
220  .name = "ip4-punt",
221  .vector_size = sizeof (u32),
222  .format_trace = format_ip4_forward_next_trace,
223  .n_next_nodes = 1,
224  .next_nodes = {
225  [0] = "error-punt",
226  },
227 };
228 
229 VNET_FEATURE_INIT (ip4_punt_end_of_arc, static) = {
230  .arc_name = "ip4-punt",
231  .node_name = "error-punt",
232  .runs_before = 0, /* not before any other features */
233 };
234 
235 VNET_FEATURE_INIT (ip4_drop_end_of_arc, static) = {
236  .arc_name = "ip4-drop",
237  .node_name = "error-drop",
238  .runs_before = 0, /* not before any other features */
239 };
240 /* *INDENT-ON */
241 
242 #ifndef CLIB_MARCH_VARIANT
243 void
244 ip4_punt_policer_add_del (u8 is_add, u32 policer_index)
245 {
246  ip4_punt_policer_cfg.policer_index = policer_index;
247 
248  vnet_feature_enable_disable ("ip4-punt", "ip4-punt-policer",
249  0, is_add, 0, 0);
250 }
251 #endif /* CLIB_MARCH_VARIANT */
252 
253 static clib_error_t *
255  unformat_input_t * main_input,
256  vlib_cli_command_t * cmd)
257 {
258  unformat_input_t _line_input, *line_input = &_line_input;
259  clib_error_t *error = 0;
260  u32 policer_index;
261  u8 is_add = 1;
262 
263  policer_index = ~0;
264 
265  if (!unformat_user (main_input, unformat_line_input, line_input))
266  return 0;
267 
268  while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
269  {
270  if (unformat (line_input, "%d", &policer_index))
271  ;
272  else if (unformat (line_input, "del"))
273  is_add = 0;
274  else if (unformat (line_input, "add"))
275  is_add = 1;
276  else
277  {
278  error = unformat_parse_error (line_input);
279  goto done;
280  }
281  }
282 
283  if (is_add && ~0 == policer_index)
284  {
285  error = clib_error_return (0, "expected policer index `%U'",
286  format_unformat_error, line_input);
287  goto done;
288  }
289  if (!is_add)
290  policer_index = ~0;
291 
292  ip4_punt_policer_add_del(is_add, policer_index);
293 
294 done:
295  unformat_free (line_input);
296  return (error);
297 }
298 
299 /*?
300  *
301  * @cliexpar
302  * @cliexcmd{set ip punt policer <INDEX>}
303  ?*/
304 /* *INDENT-OFF* */
306 {
307  .path = "ip punt policer",
308  .function = ip4_punt_police_cmd,
309  .short_help = "ip punt policer [add|del] <index>",
310 };
311 /* *INDENT-ON* */
312 
313 #ifndef CLIB_MARCH_VARIANT
314 
315 void
316 ip4_punt_redirect_add (u32 rx_sw_if_index,
317  u32 tx_sw_if_index, ip46_address_t * nh)
318 {
319  /* *INDENT-OFF* */
320  fib_route_path_t *rpaths = NULL, rpath = {
322  .frp_addr = *nh,
323  .frp_sw_if_index = tx_sw_if_index,
324  .frp_weight = 1,
325  .frp_fib_index = ~0,
326  };
327  /* *INDENT-ON* */
328 
329  vec_add1 (rpaths, rpath);
330 
331  ip4_punt_redirect_add_paths (rx_sw_if_index, rpaths);
332 
333  vec_free (rpaths);
334 }
335 
336 void
338 {
340  rx_sw_if_index,
342 
343  vnet_feature_enable_disable ("ip4-punt", "ip4-punt-redirect", 0, 1, 0, 0);
344 }
345 
346 void
347 ip4_punt_redirect_del (u32 rx_sw_if_index)
348 {
349  vnet_feature_enable_disable ("ip4-punt", "ip4-punt-redirect", 0, 0, 0, 0);
350 
351  ip_punt_redirect_del (FIB_PROTOCOL_IP4, rx_sw_if_index);
352 }
353 #endif /* CLIB_MARCH_VARIANT */
354 
355 static clib_error_t *
357  unformat_input_t * main_input,
358  vlib_cli_command_t * cmd)
359 {
360  unformat_input_t _line_input, *line_input = &_line_input;
361  ip46_address_t nh = { 0 };
362  clib_error_t *error = 0;
363  u32 rx_sw_if_index = ~0;
364  u32 tx_sw_if_index = ~0;
365  vnet_main_t *vnm;
366  u8 is_add;
367 
368  is_add = 1;
369  vnm = vnet_get_main ();
370 
371  if (!unformat_user (main_input, unformat_line_input, line_input))
372  return 0;
373 
374  while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
375  {
376  if (unformat (line_input, "del"))
377  is_add = 0;
378  else if (unformat (line_input, "add"))
379  is_add = 1;
380  else if (unformat (line_input, "rx all"))
381  rx_sw_if_index = ~0;
382  else if (unformat (line_input, "rx %U",
383  unformat_vnet_sw_interface, vnm, &rx_sw_if_index))
384  ;
385  else if (unformat (line_input, "via %U %U",
386  unformat_ip4_address, &nh.ip4,
388  ;
389  else if (unformat (line_input, "via %U",
391  ;
392  else
393  {
394  error = unformat_parse_error (line_input);
395  goto done;
396  }
397  }
398 
399  if (~0 == rx_sw_if_index)
400  {
401  error = unformat_parse_error (line_input);
402  goto done;
403  }
404 
405  if (is_add)
406  {
407  ip4_punt_redirect_add (rx_sw_if_index, tx_sw_if_index, &nh);
408  }
409  else
410  {
411  ip4_punt_redirect_del (rx_sw_if_index);
412  }
413 
414 done:
415  unformat_free (line_input);
416  return (error);
417 }
418 
419 /*?
420  *
421  * @cliexpar
422  * @cliexcmd{set ip punt policer}
423  ?*/
424 /* *INDENT-OFF* */
426 {
427  .path = "ip punt redirect",
428  .function = ip4_punt_redirect_cmd,
429  .short_help = "ip punt redirect [add|del] rx [<interface>|all] via [<nh>] <tx_interface>",
430 };
431 /* *INDENT-ON* */
432 
433 static clib_error_t *
435  unformat_input_t * main_input,
436  vlib_cli_command_t * cmd)
437 {
439 
440  return (NULL);
441 }
442 
443 /*?
444  *
445  * @cliexpar
446  * @cliexcmd{set ip punt redierect}
447  ?*/
448 /* *INDENT-OFF* */
450 {
451  .path = "show ip punt redirect",
452  .function = ip4_punt_redirect_show_cmd,
453  .short_help = "show ip punt redirect",
454  .is_mp_safe = 1,
455 };
456 /* *INDENT-ON* */
457 
458 /*
459  * fd.io coding-style-patch-verification: ON
460  *
461  * Local Variables:
462  * eval: (c-set-style "gnu")
463  * End:
464  */
ip4_punt_policer_error_strings
static char * ip4_punt_policer_error_strings[]
Definition: ip4_punt_drop.c:77
ip4_punt_policer_command
static vlib_cli_command_t ip4_punt_policer_command
(constructor) VLIB_CLI_COMMAND (ip4_punt_policer_command)
Definition: ip4_punt_drop.c:305
unformat_user
uword unformat_user(unformat_input_t *input, unformat_function_t *func,...)
Definition: unformat.c:989
ip_punt_policer_trace_t_::next
u32 next
Definition: ip_punt_drop.h:43
ip4_punt_redirect_command
static vlib_cli_command_t ip4_punt_redirect_command
(constructor) VLIB_CLI_COMMAND (ip4_punt_redirect_command)
Definition: ip4_punt_drop.c:425
ip4_punt_policer_node
vlib_node_registration_t ip4_punt_policer_node
(constructor) VLIB_REGISTER_NODE (ip4_punt_policer_node)
Definition: ip4_punt_drop.c:93
ip4_forward_next_trace
void ip4_forward_next_trace(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, vlib_rx_or_tx_t which_adj_index)
Definition: ip4_forward.c:1240
unformat_line_input
unformat_function_t unformat_line_input
Definition: format.h:275
IP_PUNT_REDIRECT_NEXT_TX
@ IP_PUNT_REDIRECT_NEXT_TX
Definition: ip_punt_drop.h:253
IP_PUNT_POLICER_NEXT_DROP
@ IP_PUNT_POLICER_NEXT_DROP
Definition: ip_punt_drop.h:35
VLIB_NODE_TYPE_INTERNAL
@ VLIB_NODE_TYPE_INTERNAL
Definition: node.h:72
show_ip4_punt_redirect_command
static vlib_cli_command_t show_ip4_punt_redirect_command
(constructor) VLIB_CLI_COMMAND (show_ip4_punt_redirect_command)
Definition: ip4_punt_drop.c:449
clib_error_return
#define clib_error_return(e, args...)
Definition: error.h:99
vlib_cli_command_t::path
char * path
Definition: cli.h:96
foreach_ip_punt_policer_error
#define foreach_ip_punt_policer_error
Definition: ip_punt_drop.h:46
VNET_FEATURE_ARC_INIT
VNET_FEATURE_ARC_INIT(ip4_punt)
foreach_ip4_punt_redirect_error
#define foreach_ip4_punt_redirect_error
Definition: ip4_punt_drop.c:115
unformat_parse_error
#define unformat_parse_error(input)
Definition: format.h:261
policer.h
ip_punt_policer_t_::policer_index
u32 policer_index
Definition: ip_punt_drop.h:29
ip_punt_redirect_del
void ip_punt_redirect_del(fib_protocol_t fproto, u32 rx_sw_if_index)
Definition: ip_punt_drop.c:105
unformat_input_t
struct _unformat_input_t unformat_input_t
fib_route_path_t_::frp_proto
dpo_proto_t frp_proto
The protocol of the address below.
Definition: fib_types.h:505
ip_punt_drop.h
vlib_frame_t
Definition: node.h:372
policer_handoff
static_always_inline uword policer_handoff(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u32 fq_index, u32 policer_index)
Definition: police_inlines.h:118
error
Definition: cJSON.c:88
format_ip4_forward_next_trace
u8 * format_ip4_forward_next_trace(u8 *s, va_list *args)
Definition: ip4_forward.c:1190
ip_punt_policer_t_::fq_index
u32 fq_index
Definition: ip_punt_drop.h:30
ip_punt_policer_t_
IP4 punt policer configuration we police the punt rate to prevent overloading the host.
Definition: ip_punt_drop.h:27
unformat
uword unformat(unformat_input_t *i, const char *fmt,...)
Definition: unformat.c:978
ip_punt_redirect_add
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.
Definition: ip_punt_drop.c:72
FIB_FORW_CHAIN_TYPE_UNICAST_IP4
@ FIB_FORW_CHAIN_TYPE_UNICAST_IP4
Contribute an object that is to be used to forward IP4 packets.
Definition: fib_types.h:108
unformat_free
static void unformat_free(unformat_input_t *i)
Definition: format.h:155
VLIB_NODE_FN
#define VLIB_NODE_FN(node)
Definition: node.h:202
vec_add1
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
Definition: vec.h:606
ip4_punt_node
vlib_node_registration_t ip4_punt_node
(constructor) VLIB_REGISTER_NODE (ip4_punt_node)
Definition: ip4_punt_drop.c:217
CLIB_UNUSED
#define CLIB_UNUSED(x)
Definition: clib.h:90
IP_PUNT_POLICER_N_NEXT
@ IP_PUNT_POLICER_N_NEXT
Definition: ip_punt_drop.h:37
format_policer_handoff_trace
u8 * format_policer_handoff_trace(u8 *s, va_list *args)
Definition: policer.c:25
vnet_get_main
vnet_main_t * vnet_get_main(void)
Definition: pnat_test_stubs.h:56
VLIB_NODE_FLAG_TRACE
#define VLIB_NODE_FLAG_TRACE
Definition: node.h:291
ip_punt_policer_trace_t_
Definition: ip_punt_drop.h:40
ip_punt_redirect
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)
Definition: ip_punt_drop.h:295
ARRAY_LEN
#define ARRAY_LEN(x)
Definition: clib.h:70
unformat_check_input
static uword unformat_check_input(unformat_input_t *i)
Definition: format.h:163
ip4_punt_redirect_cmd
static clib_error_t * ip4_punt_redirect_cmd(vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
Definition: ip4_punt_drop.c:356
frame
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
Definition: ip4_punt_drop.c:58
ip4_punt_policer_add_del
void ip4_punt_policer_add_del(u8 is_add, u32 policer_index)
Definition: ip4_punt_drop.c:244
uword
u64 uword
Definition: types.h:112
ip4_punt_redirect_show_cmd
static clib_error_t * ip4_punt_redirect_show_cmd(vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
Definition: ip4_punt_drop.c:434
tx_sw_if_index
vl_api_interface_index_t tx_sw_if_index
Definition: ip.api:548
ip4_punt_redirect_del
void ip4_punt_redirect_del(u32 rx_sw_if_index)
Definition: ip4_punt_drop.c:347
ip_punt_policer_trace_t_::policer_index
u32 policer_index
Definition: ip_punt_drop.h:42
ip4_punt_redirect_add_paths
void ip4_punt_redirect_add_paths(u32 rx_sw_if_index, fib_route_path_t *rpaths)
Definition: ip4_punt_drop.c:337
format_unformat_error
u8 * format_unformat_error(u8 *s, va_list *va)
Definition: unformat.c:91
ip_punt_policer
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.
Definition: ip_punt_drop.h:67
ip4_not_enabled_node
vlib_node_registration_t ip4_not_enabled_node
(constructor) VLIB_REGISTER_NODE (ip4_not_enabled_node)
Definition: ip4_punt_drop.c:209
VLIB_CLI_COMMAND
#define VLIB_CLI_COMMAND(x,...)
Definition: cli.h:163
ip4_punt_redirect_error_strings
static char * ip4_punt_redirect_error_strings[]
Definition: ip4_punt_drop.c:126
nh
vl_api_fib_path_nh_t nh
Definition: fib_types.api:126
police_inlines.h
FIB_PROTOCOL_IP4
@ FIB_PROTOCOL_IP4
Definition: fib_types.h:36
IP_PUNT_POLICER_NEXT_HANDOFF
@ IP_PUNT_POLICER_NEXT_HANDOFF
Definition: ip_punt_drop.h:36
ip4_punt_policer_handoff_node
vlib_node_registration_t ip4_punt_policer_handoff_node
(constructor) VLIB_REGISTER_NODE (ip4_punt_policer_handoff_node)
Definition: ip4_punt_drop.c:63
vlib_node_registration_t
struct _vlib_node_registration vlib_node_registration_t
vlib_cli_output
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
Definition: cli.c:716
ip4_punt_redirect_add
void ip4_punt_redirect_add(u32 rx_sw_if_index, u32 tx_sw_if_index, ip46_address_t *nh)
Definition: ip4_punt_drop.c:316
IP4_PUNT_REDIRECT_N_ERROR
@ IP4_PUNT_REDIRECT_N_ERROR
Definition: ip4_punt_drop.c:123
vnet_main_t
Definition: vnet.h:76
vec_free
#define vec_free(V)
Free vector's memory (no header).
Definition: vec.h:395
format_ip_punt_redirect
u8 * format_ip_punt_redirect(u8 *s, va_list *args)
Definition: ip_punt_drop.c:129
ip4_punt_redirect_node
vlib_node_registration_t ip4_punt_redirect_node
(constructor) VLIB_REGISTER_NODE (ip4_punt_redirect_node)
Definition: ip4_punt_drop.c:142
format_ip_punt_redirect_trace
u8 * format_ip_punt_redirect_trace(u8 *s, va_list *args)
Definition: ip_punt_drop.c:23
unformat_vnet_sw_interface
unformat_function_t unformat_vnet_sw_interface
Definition: interface_funcs.h:459
ip4_punt_redirect_error_t
ip4_punt_redirect_error_t
Definition: ip4_punt_drop.c:118
format
description fragment has unexpected format
Definition: map.api:433
vm
vlib_main_t * vm
Definition: ip4_punt_drop.c:57
ip4_punt
static uword ip4_punt(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip4_punt_drop.c:188
ip.h
u32
unsigned int u32
Definition: types.h:88
ip4_punt_policer_cfg
ip_punt_policer_t ip4_punt_policer_cfg
Definition: ip4_punt_drop.c:49
fib_route_path_t_
A representation of a path as described by a route producer.
Definition: fib_types.h:500
vnet_feature_enable_disable
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)
Definition: pnat_test_stubs.h:50
IP_PUNT_REDIRECT_NEXT_ARP
@ IP_PUNT_REDIRECT_NEXT_ARP
Definition: ip_punt_drop.h:254
vlib_main_t
Definition: main.h:102
vlib_node_t
Definition: node.h:247
VNET_FEATURES
#define VNET_FEATURES(...)
Definition: feature.h:470
u8
unsigned char u8
Definition: types.h:56
clib_error_t
Definition: clib_error.h:21
IP_PUNT_REDIRECT_N_NEXT
@ IP_PUNT_REDIRECT_N_NEXT
Definition: ip_punt_drop.h:255
DPO_PROTO_IP4
@ DPO_PROTO_IP4
Definition: dpo.h:64
VNET_FEATURE_INIT
VNET_FEATURE_INIT(ip4_punt_policer_node)
unformat_ip4_address
unformat_function_t unformat_ip4_address
Definition: format.h:68
IP_PUNT_REDIRECT_NEXT_DROP
@ IP_PUNT_REDIRECT_NEXT_DROP
Definition: ip_punt_drop.h:252
ip4_punt_policer_handoff_error_strings
static char * ip4_punt_policer_handoff_error_strings[]
Definition: ip4_punt_drop.c:54
vlib_node_runtime_t
Definition: node.h:454
ip4_drop_node
vlib_node_registration_t ip4_drop_node
(constructor) VLIB_REGISTER_NODE (ip4_drop_node)
Definition: ip4_punt_drop.c:198
vlib_cli_command_t
Definition: cli.h:92
ip_drop_or_punt
static uword ip_drop_or_punt(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u8 arc_index)
Definition: ip_punt_drop.h:378
ip4_punt_police_cmd
static clib_error_t * ip4_punt_police_cmd(vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
Definition: ip4_punt_drop.c:254
VLIB_TX
@ VLIB_TX
Definition: defs.h:47
node
vlib_main_t vlib_node_runtime_t * node
Definition: ip4_punt_drop.c:57
type
vl_api_fib_path_type_t type
Definition: fib_types.api:123
format_ip_punt_policer_trace
u8 * format_ip_punt_policer_trace(u8 *s, va_list *args)
Definition: ip4_punt_drop.c:39
UNFORMAT_END_OF_INPUT
#define UNFORMAT_END_OF_INPUT
Definition: format.h:137
VLIB_REGISTER_NODE
#define VLIB_REGISTER_NODE(x,...)
Definition: node.h:169