diff options
author | Dave Barach <dave@barachs.net> | 2019-08-29 18:01:30 -0400 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2019-09-09 15:16:03 +0000 |
commit | 4c19bfd93f1daaff181fd072ca24acce5b000705 (patch) | |
tree | 3cc92f80784eaab76181dabcbd5d2c4c5d13338b /src/vlib/main.h | |
parent | 30d28bdfd8aca4d6d3c70482ad9ebfdb753610aa (diff) |
vlib: clean up the "pcap dispatch trace" debug CLI
Separate debug CLI arg parsing from the underlying action
function. Fixes a number of subtle ordering dependencies, and will
allow us to add a binary API to control the feature at some point in
the future.
Type: refactor
Ticket: VPP-1762
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: I1240fe3f61a0acf5ee9faed60d6ad3386e72e569
(cherry picked from commit e5948fb49a6eeaf437323cc1043a350cd33bcd47)
Diffstat (limited to 'src/vlib/main.h')
-rw-r--r-- | src/vlib/main.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/vlib/main.h b/src/vlib/main.h index dd28cb85e22..05687a8c987 100644 --- a/src/vlib/main.h +++ b/src/vlib/main.h @@ -148,6 +148,7 @@ typedef struct vlib_main_t /* Pcap dispatch trace main */ pcap_main_t dispatch_pcap_main; uword dispatch_pcap_enable; + u32 *dispatch_buffer_trace_nodes; u8 *pcap_buffer; /* pcap rx / tx tracing */ @@ -403,6 +404,18 @@ extern void vlib_node_sync_stats (vlib_main_t * vm, vlib_node_t * n); #define VLIB_PCAP_MAJOR_VERSION 1 #define VLIB_PCAP_MINOR_VERSION 0 +typedef struct +{ + u8 *filename; + int enable; + int status; + u32 packets_to_capture; + u32 buffer_trace_node_index; + u32 buffer_traces_to_capture; +} vlib_pcap_dispatch_trace_args_t; + +int vlib_pcap_dispatch_trace_configure (vlib_pcap_dispatch_trace_args_t *); + #endif /* included_vlib_main_h */ /* |