FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
tracedump.api
Go to the documentation of this file.
1 /* Hey Emacs use -*- mode: C -*- */
2 /*
3  * tracedump.api - streaming packet trace dump API
4  *
5  * Copyright (c) 2020 Cisco and/or its affiliates
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at:
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 /**
20  * @file tracedump.api
21  * @brief VPP control-plane API messages.
22  *
23  * This file defines VPP control-plane binary API messages which are generally
24  * called through a shared memory interface.
25  */
26 
27 
28 option version = "0.1.0";
29 
31 {
37 };
38 
39 
40 /** \brief trace_set_filters
41  @param client_index - opaque cookie to identify the sender
42  @param context - sender context, to match reply w/ request
43  @param flag - One of the trace_filter_flag values
44  @param node_index = The node-index to include/exclude
45  @param classifier_table_index = The include/exclude classifier table
46  @param count = The number of packets to include/exclude
47 */
48 autoreply define trace_set_filters
49 {
52  vl_api_trace_filter_flag_t flag; /* TRACE_FF_* */
54  u32 node_index [default = 0xffffffff];
55  u32 classifier_table_index [default = 0xffffffff];
56  option vat_help = "trace_set_filters [none] | [(include_node|exclude_node) <node-index>] | [(include_classifier|exclude_classifier) <classifier-index>] [count <count>]";
57 };
58 
59 
60 /** \brief trace_capture_packets
61  @param client_index - opaque cookie to identify the sender
62  @param context - sender context, to match reply w/ request
63  @param node_index - graph input node whose packets are captured
64  @param max_packets - maximum number of packets to capture
65  @param use_filter - if true, apply filters to select/reject packets
66  @param verbose - if true, set verbose packet capture flag
67  @param pre_capture_clear - if true, clear buffer before capture begins
68 */
69 autoreply define trace_capture_packets
70 {
75  bool use_filter;
76  bool verbose;
78  option vat_help = "trace_capture_packets [node_index <index>] [max <max>] [pre_capture_clear] [use_filter] [verbose]";
79 };
80 
81 
82 /** \brief trace_clear_capture
83  @param client_index - opaque cookie to identify the sender
84  @param context - sender context, to match reply w/ request
85 */
86 autoreply define trace_clear_capture
87 {
90  option vat_help = "trace_clear_capture";
91 };
92 
93 
95  rpc trace_dump returns trace_dump_reply
96  stream trace_details;
97 };
98 
99 define trace_dump {
100  /* Client identifier, set from api_main.my_client_index */
102 
103  /* Arbitrary context, so client can match reply to request */
105 
106  /* Dispose of any cached data before we begin */
108 
109  /* iterator positions, both ~0 to just clear the cache */
112 
113  /* Max number of replies per burst */
115 
116  option vat_help = "trace_dump [thread_id <tid>] [position <pos>] [max <max>]";
117 };
118 
119 define trace_dump_reply {
128 };
129 
130 define trace_details {
131  /* Client identifier, set from api_main.my_client_index */
133 
134  /* Arbitrary context, so client can match reply to request */
136 
137  /* Position in the cache of this record */
140 
141  /* More or not */
144  /* Needed when set ends in the middle of a batch */
146 
148  string trace_data[];
149 };
vl_api_trace_dump_reply_t::context
u32 context
Definition: tracedump.api:120
vl_api_trace_capture_packets_t::pre_capture_clear
bool pre_capture_clear
Definition: tracedump.api:77
TRACE_FF_INCLUDE_CLASSIFIER
@ TRACE_FF_INCLUDE_CLASSIFIER
Definition: tracedump.api:35
vl_api_trace_details_t::client_index
u32 client_index
Definition: tracedump.api:132
vl_api_trace_set_filters_t::context
u32 context
Definition: tracedump.api:51
vl_api_trace_details_t::trace_data
string trace_data[]
Definition: tracedump.api:148
vl_api_trace_details_t::packet_number
u32 packet_number
Definition: tracedump.api:147
vl_api_trace_dump_t
Definition: tracedump.api:99
vl_api_trace_set_filters_t::flag
vl_api_trace_filter_flag_t flag
Definition: tracedump.api:52
vl_api_trace_capture_packets_t::node_index
u32 node_index
Definition: tracedump.api:73
TRACE_FF_INCLUDE_NODE
@ TRACE_FF_INCLUDE_NODE
Definition: tracedump.api:33
vl_api_trace_capture_packets_t::verbose
bool verbose
Definition: tracedump.api:76
vl_api_trace_dump_reply_t::retval
i32 retval
Definition: tracedump.api:121
vl_api_trace_capture_packets_t
trace_capture_packets
Definition: tracedump.api:69
vl_api_trace_set_filters_t::count
u32 count
Definition: tracedump.api:53
node_index
node node_index
Definition: interface_output.c:440
vl_api_trace_details_t::thread_id
u32 thread_id
Definition: tracedump.api:138
vl_api_trace_dump_reply_t::more_threads
u8 more_threads
Definition: tracedump.api:125
vl_api_trace_capture_packets_t::max_packets
u32 max_packets
Definition: tracedump.api:74
i32
signed int i32
Definition: types.h:77
vl_api_trace_dump_reply_t
Definition: tracedump.api:119
vl_api_trace_capture_packets_t::context
u32 context
Definition: tracedump.api:72
vl_api_trace_set_filters_t::node_index
u32 node_index[default=0xffffffff]
Definition: tracedump.api:54
vl_api_trace_dump_t::position
u32 position
Definition: tracedump.api:111
vl_api_trace_capture_packets_t::vat_help
option vat_help
Definition: tracedump.api:78
vl_api_trace_dump_t::thread_id
u32 thread_id
Definition: tracedump.api:110
vl_api_trace_dump_t::context
u32 context
Definition: tracedump.api:104
TRACE_FF_EXCLUDE_NODE
@ TRACE_FF_EXCLUDE_NODE
Definition: tracedump.api:34
vl_api_trace_clear_capture_t::client_index
u32 client_index
Definition: tracedump.api:88
vl_api_trace_dump_t::clear_cache
u8 clear_cache
Definition: tracedump.api:107
vl_api_trace_dump_t::client_index
u32 client_index
Definition: tracedump.api:101
vl_api_trace_details_t::more_this_thread
u8 more_this_thread
Definition: tracedump.api:142
vl_api_trace_details_t::done
u8 done
Definition: tracedump.api:145
vl_api_trace_capture_packets_t::use_filter
bool use_filter
Definition: tracedump.api:75
vl_api_trace_dump_t::vat_help
option vat_help
Definition: tracedump.api:116
vl_api_trace_clear_capture_t
trace_clear_capture
Definition: tracedump.api:86
vl_api_trace_set_filters_t::classifier_table_index
u32 classifier_table_index[default=0xffffffff]
Definition: tracedump.api:55
vl_api_trace_dump_reply_t::last_thread_id
u32 last_thread_id
Definition: tracedump.api:122
vl_api_trace_set_filters_t
trace_set_filters
Definition: tracedump.api:48
TRACE_FF_NONE
@ TRACE_FF_NONE
Definition: tracedump.api:32
vl_api_trace_dump_reply_t::last_position
u32 last_position
Definition: tracedump.api:123
TRACE_FF_EXCLUDE_CLASSIFIER
@ TRACE_FF_EXCLUDE_CLASSIFIER
Definition: tracedump.api:36
vl_api_trace_dump_reply_t::done
u8 done
Definition: tracedump.api:127
vl_api_trace_set_filters_t::vat_help
option vat_help
Definition: tracedump.api:56
vl_api_trace_capture_packets_t::client_index
u32 client_index
Definition: tracedump.api:71
vl_api_trace_clear_capture_t::vat_help
option vat_help
Definition: tracedump.api:90
u32
unsigned int u32
Definition: types.h:88
service
service
Definition: tracedump.api:94
vl_api_trace_details_t
Definition: tracedump.api:130
trace_filter_flag
trace_filter_flag
Definition: tracedump.api:30
vl_api_trace_dump_reply_t::flush_only
u8 flush_only
Definition: tracedump.api:126
vl_api_trace_details_t::more_threads
u8 more_threads
Definition: tracedump.api:143
vl_api_trace_set_filters_t::client_index
u32 client_index
Definition: tracedump.api:50
vl_api_trace_clear_capture_t::context
u32 context
Definition: tracedump.api:89
u8
unsigned char u8
Definition: types.h:56
vl_api_trace_details_t::position
u32 position
Definition: tracedump.api:139
version
option version
Definition: tracedump.api:28
vl_api_trace_details_t::context
u32 context
Definition: tracedump.api:135
vl_api_trace_dump_reply_t::more_this_thread
u8 more_this_thread
Definition: tracedump.api:124
vl_api_trace_dump_t::max_records
u32 max_records
Definition: tracedump.api:114