Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
ip: extend the punt cli to accept reason filter for sockets registration
[vpp.git]
/
src
/
vnet
/
ip
/
punt.c
diff --git
a/src/vnet/ip/punt.c
b/src/vnet/ip/punt.c
index
6fb8dd5
..
fb0cc22
100644
(file)
--- a/
src/vnet/ip/punt.c
+++ b/
src/vnet/ip/punt.c
@@
-581,6
+581,9
@@
punt_socket_register_cmd (vlib_main_t * vm,
pr.punt.l4.port = ~0;
else if (unformat (input, "socket %s", &socket_name))
;
pr.punt.l4.port = ~0;
else if (unformat (input, "socket %s", &socket_name))
;
+ else if (unformat (input, "reason %U", unformat_punt_reason,
+ &pr.punt.exception.reason))
+ pr.type = PUNT_TYPE_EXCEPTION;
else
{
error = clib_error_return (0, "parse error: '%U'",
else
{
error = clib_error_return (0, "parse error: '%U'",
@@
-652,6
+655,9
@@
punt_socket_deregister_cmd (vlib_main_t * vm,
;
else if (unformat (input, "all"))
pr.punt.l4.port = ~0;
;
else if (unformat (input, "all"))
pr.punt.l4.port = ~0;
+ else if (unformat (input, "reason %U", unformat_punt_reason,
+ &pr.punt.exception.reason))
+ pr.type = PUNT_TYPE_EXCEPTION;
else
{
error = clib_error_return (0, "parse error: '%U'",
else
{
error = clib_error_return (0, "parse error: '%U'",