aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/interface.api
diff options
context:
space:
mode:
authorMaxime Peim <mpeim@cisco.com>2023-01-13 08:04:55 +0000
committerOle Tr�an <otroan@employees.org>2023-01-25 11:04:05 +0000
commitddc16cfcf96ed9193522dd006b9e3edef1107e43 (patch)
tree86e043bd444028f425494dd091eb32ac77012d7b /src/vnet/interface.api
parent7cbd3cc41916ececa97af0b3acbb50dee190d656 (diff)
api: pcap capture api update
Allow enabling and disabling pcap capture via the API. A little bug is fixed along the way in vl_api_classify_pcap_set_table_t_handler. Type: improvement Signed-off-by: Maxime Peim <mpeim@cisco.com> Change-Id: I096129c82aecdc82bee5dbfb5e19c76a51d80aab
Diffstat (limited to 'src/vnet/interface.api')
-rw-r--r--src/vnet/interface.api41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/vnet/interface.api b/src/vnet/interface.api
index 172f6afb818..4d28332a639 100644
--- a/src/vnet/interface.api
+++ b/src/vnet/interface.api
@@ -733,6 +733,47 @@ autoreply define collect_detailed_interface_stats
bool enable_disable;
};
+/** \brief pcap_trace_on
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+ @param capture_rx - capture received packets
+ @param capture_tx - capture transmitted packets
+ @param capture_drop - capture dropped packets
+ @param filter - is a filter is being used on this capture
+ @param preallocate_data - preallocate the data buffer
+ @param free_data - free the data buffer
+ @param max_packets - depth of local buffer
+ @param max_bytes_per_packet - maximum number of bytes to capture
+ for each packet
+ @param sw_if_index - specify a given interface, or 0 for any
+ @param error - filter packets based on a specific error.
+ @param filename - output filename, will be placed in /tmp
+*/
+autoreply define pcap_trace_on
+{
+ u32 client_index;
+ u32 context;
+ bool capture_rx;
+ bool capture_tx;
+ bool capture_drop;
+ bool filter;
+ bool preallocate_data;
+ bool free_data;
+ u32 max_packets [default=1000];
+ u32 max_bytes_per_packet [default=512];
+ vl_api_interface_index_t sw_if_index;
+ string error[128];
+ string filename[64];
+
+ option vat_help = "pcap_trace_on [capture_rx] [capture_tx] [capture_drop] [max_packets <nn>] [sw_if_index <sw_if_index>|0 for any] [error <node>.<error>] [filename <name>] [max_bytes_per_packet <nnnn>] [filter] [preallocate_data] [free_data]";
+};
+
+autoreply define pcap_trace_off
+{
+ u32 client_index;
+ u32 context;
+};
+
/*
* Local Variables:
* eval: (c-set-style "gnu")