FD.io VPP
v19.04.4-rc0-5-ge88582fac
Vector Packet Processing
vpe.api
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2015-2016 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
/** \file
17
18
This file defines vpe control-plane API messages which are generally
19
called through a shared memory interface.
20
*/
21
22
option
version
=
"1.1.0"
;
23
24
/*
25
* Note: API placement cleanup in progress
26
* If you're looking for interface APIs, please
27
* see .../src/vnet/{interface.api,interface_api.c}
28
* IP APIs: see .../src/vnet/ip/{ip.api, ip_api.c}
29
* VXLAN APIs: see .../src/vnet/vxlan/{vxlan.api, vxlan_api.c}
30
* GENEVE APIs: see .../src/vnet/geneve/{geneve.api, geneve_api.c}
31
* LLDP APIs: see .../src/vnet/lldp/{lldp.api, lldp_api.c}
32
* AF-PACKET APIs: see ... /vnet/devices/af_packet/{af_packet.api, af_packet_api.c}
33
* NETMAP APIs: see ... /src/vnet/devices/netmap/{netmap.api, netmap_api.c}
34
* VHOST-USER APIs: see .../vnet/devices/virtio/{vhost_user.api, vhost_user_api.c}
35
* VXLAN GPE APIs: see .../src/vnet/vxlan-gpe/{vxlan_gpe.api, vxlan_gpe_api.c}
36
* GRE APIs: see .../src/vnet/gre/{gre.api, gre_api.c}
37
* L2 APIs: see .../src/vnet/l2/{l2.api, l2_api.c}
38
* L2TP APIs: see .../src/vnet/l2tp/{l2tp.api, l2tp_api.c}
39
* BFD APIs: see .../src/vnet/bfd/{bfd.api, bfd_api.c}
40
* IPSEC APIs: see .../src/vnet/ipsec/{ipsec.api, ipsec_api.c}
41
* IPSEC-GRE APIs: see .../src/vnet/ipsec-gre/{ipsec_gre.api, ipsec_gre_api.c}
42
* LISP APIs: see .../src/vnet/lisp/{lisp.api, lisp_api.c}
43
* LISP-GPE APIs: see .../src/vnet/lisp-gpe/{lisp_gpe.api, lisp_gpe_api.c}
44
* SESSION APIs: .../vnet/session/{session.api session_api.c}
45
* MPLS APIs: see .../src/vnet/mpls/{mpls.api, mpls_api.c}
46
* SR APIs: see .../src/vnet/srv6/{sr.api, sr_api.c}
47
* CLASSIFY APIs: see ... /src/vnet/classify/{classify.api, classify_api.c}
48
* FLOW APIs: see ... /src/vnet/flow/{flow.api, flow_api.c}
49
* DHCP APIs: see ... /src/vnet/dhcp/{dhcp.api, dhcp_api.c}
50
* COP APIs: see ... /src/vnet/cop/{cop.api, cop_api.c}
51
* POLICER APIs: see ... /src/vnet/policer/{policer.api, policer_api.c}
52
* BIER APIs: see ... /src/vnet/policer/{bier.api, bier_api.c}
53
*/
54
55
/** \brief Control ping from client to api server request
56
@param client_index - opaque cookie to identify the sender
57
@param context - sender context, to match reply w/ request
58
*/
59
define control_ping
60
{
61
u32
client_index
;
62
u32
context
;
63
};
64
65
/** \brief Control ping from the client to the server response
66
@param client_index - opaque cookie to identify the sender
67
@param context - sender context, to match reply w/ request
68
@param retval - return code for the request
69
@param vpe_pid - the pid of the vpe, returned by the server
70
*/
71
define control_ping_reply
72
{
73
u32
context
;
74
i32
retval
;
75
u32
client_index
;
76
u32
vpe_pid
;
77
};
78
79
/** \brief Process a vpe parser cli string request
80
@param client_index - opaque cookie to identify the sender
81
@param context - sender context, to match reply w/ request
82
@param cmd_in_shmem - pointer to cli command string
83
*/
84
define cli
85
{
86
u32
client_index
;
87
u32
context
;
88
u64
cmd_in_shmem
;
89
};
90
define cli_inband
91
{
92
u32
client_index
;
93
u32
context
;
94
string
cmd
;
95
};
96
97
/** \brief vpe parser cli string response
98
@param context - sender context, to match reply w/ request
99
@param retval - return code for request
100
@param reply_in_shmem - Reply string from cli processing if any
101
*/
102
define cli_reply
103
{
104
u32
context
;
105
i32
retval
;
106
u64
reply_in_shmem
;
107
};
108
define cli_inband_reply
109
{
110
u32
context
;
111
i32
retval
;
112
string
reply
;
113
};
114
115
/** \brief Get node index using name request
116
@param client_index - opaque cookie to identify the sender
117
@param context - sender context, to match reply w/ request
118
@param node_name[] - name of the node
119
*/
120
define get_node_index
121
{
122
u32
client_index
;
123
u32
context
;
124
u8
node_name[64];
125
};
126
127
/** \brief Get node index using name request
128
@param context - sender context, to match reply w/ request
129
@param retval - return code for the request
130
@param node_index - index of the desired node if found, else ~0
131
*/
132
define get_node_index_reply
133
{
134
u32
context
;
135
i32
retval
;
136
u32
node_index
;
137
};
138
139
/** \brief Set the next node for a given node request
140
@param client_index - opaque cookie to identify the sender
141
@param context - sender context, to match reply w/ request
142
@param node_name[] - node to add the next node to
143
@param next_name[] - node to add as the next node
144
*/
145
define add_node_next
146
{
147
u32
client_index
;
148
u32
context
;
149
u8
node_name[64];
150
u8
next_name[64];
151
};
152
153
/** \brief IP Set the next node for a given node response
154
@param context - sender context, to match reply w/ request
155
@param retval - return code for the add next node request
156
@param next_index - the index of the next node if success, else ~0
157
*/
158
define add_node_next_reply
159
{
160
u32
context
;
161
i32
retval
;
162
u32
next_index
;
163
};
164
165
/** \brief show version
166
@param client_index - opaque cookie to identify the sender
167
@param context - sender context, to match reply w/ request
168
*/
169
define show_version
170
{
171
u32
client_index
;
172
u32
context
;
173
};
174
175
/** \brief show version response
176
@param context - sender context, to match reply w/ request
177
@param retval - return code for the request
178
@param program - name of the program (vpe)
179
@param version - version of the program
180
@param build_directory - root of the workspace where the program was built
181
*/
182
define show_version_reply
183
{
184
u32
context
;
185
i32
retval
;
186
string
program
;
187
string
version
;
188
string
build_date
;
189
string
build_directory
;
190
};
191
192
193
/** \brief show_threads display the information about vpp
194
threads running on system along with their process id,
195
cpu id, physical core and cpu socket.
196
*/
197
define show_threads
198
{
199
u32
client_index
;
200
u32
context
;
201
};
202
203
/** \brief thread data
204
@param id - thread index
205
@param name - thread name i.e. vpp_main or vpp_wk_0
206
@param type - thread type i.e. workers or stats
207
@param pid - thread Process Id
208
@param cpu_id - thread pinned to cpu.
209
"CPUs or Logical cores are the number of physical cores times
210
the number of threads that can run on each core through
211
the use of hyperthreading." (from unix.stackexchange.com)
212
@param core - thread pinned to actual physical core.
213
@param cpu_socket - thread is running on which cpu socket.
214
*/
215
typeonly define
thread_data
216
{
217
u32
id
;
218
u8
name
[64];
219
u8
type[64];
220
u32
pid
;
221
u32
cpu_id
;
222
u32
core
;
223
u32
cpu_socket
;
224
};
225
226
/** \brief show_threads_reply
227
@param context - returned sender context, to match reply w/ request
228
@param retval - return code
229
@param count - number of threads in thread_data array
230
@param thread_data - array of thread data
231
*/
232
define show_threads_reply
233
{
234
u32
context
;
235
i32
retval
;
236
u32
count
;
237
vl_api_thread_data_t
thread_data
[
count
];
238
};
239
240
define get_node_graph
241
{
242
u32
client_index
;
243
u32
context
;
244
};
245
246
/** \brief get_node_graph_reply
247
@param context - returned sender context, to match reply w/ request
248
@param retval - return code
249
@param reply_in_shmem - result from vlib_node_serialize, in shared
250
memory. Process with vlib_node_unserialize, remember to switch
251
heaps and free the result.
252
*/
253
254
define get_node_graph_reply
255
{
256
u32
context
;
257
i32
retval
;
258
u64
reply_in_shmem
;
259
};
260
261
/** \brief Query relative index via node names
262
@param client_index - opaque cookie to identify the sender
263
@param context - sender context, to match reply w/ request
264
@param node_name - name of node to find relative index from
265
@param next_name - next node from node_name to find relative index of
266
*/
267
define get_next_index
268
{
269
u32
client_index
;
270
u32
context
;
271
u8
node_name[64];
272
u8
next_name[64];
273
};
274
275
/** \brief Reply for get next node index
276
@param context - sender context which was passed in the request
277
@param retval - return value
278
@param next_index - index of the next_node
279
*/
280
define get_next_index_reply
281
{
282
u32
context
;
283
i32
retval
;
284
u32
next_index
;
285
};
286
287
/*
288
* Local Variables:
289
* eval: (c-set-style "gnu")
290
* End:
291
*/
vl_api_add_node_next_reply_t::retval
i32 retval
Definition:
vpe.api:161
vl_api_cli_reply_t::context
u32 context
Definition:
vpe.api:104
vl_api_show_threads_reply_t::count
u32 count
Definition:
vpe.api:236
vl_api_show_version_reply_t::program
string program
Definition:
vpe.api:186
vl_api_add_node_next_t::client_index
u32 client_index
Definition:
vpe.api:147
vl_api_show_threads_reply_t::context
u32 context
Definition:
vpe.api:234
vl_api_thread_data_t::cpu_id
u32 cpu_id
Definition:
vpe.api:221
vl_api_add_node_next_reply_t::next_index
u32 next_index
Definition:
vpe.api:162
vl_api_get_node_graph_reply_t::context
u32 context
Definition:
vpe.api:256
vl_api_show_version_t::client_index
u32 client_index
Definition:
vpe.api:171
u64
unsigned long u64
Definition:
types.h:89
vl_api_get_node_index_t::client_index
u32 client_index
Definition:
vpe.api:122
vl_api_get_next_index_reply_t::context
u32 context
Definition:
vpe.api:282
vl_api_thread_data_t::core
u32 core
Definition:
vpe.api:222
vl_api_show_version_t::context
u32 context
Definition:
vpe.api:172
thread_data
memif_thread_data_t thread_data[MAX_THREADS]
Definition:
main.c:109
vl_api_control_ping_t::client_index
u32 client_index
Definition:
vpe.api:61
vl_api_get_next_index_t::client_index
u32 client_index
Definition:
vpe.api:269
vl_api_get_next_index_reply_t::retval
i32 retval
Definition:
vpe.api:283
u8
unsigned char u8
Definition:
types.h:56
vl_api_cli_inband_reply_t::context
u32 context
Definition:
vpe.api:110
vl_api_cli_inband_t::client_index
u32 client_index
Definition:
vpe.api:92
vl_api_control_ping_reply_t::retval
i32 retval
Definition:
vpe.api:74
vl_api_control_ping_t::context
u32 context
Definition:
vpe.api:62
vl_api_show_version_reply_t::context
u32 context
Definition:
vpe.api:184
vl_api_thread_data_t::cpu_socket
u32 cpu_socket
Definition:
vpe.api:223
vl_api_cli_t::context
u32 context
Definition:
vpe.api:87
vl_api_control_ping_reply_t::vpe_pid
u32 vpe_pid
Definition:
vpe.api:76
u32
unsigned int u32
Definition:
types.h:88
vl_api_show_threads_t::context
u32 context
Definition:
vpe.api:200
vl_api_get_next_index_reply_t::next_index
u32 next_index
Definition:
vpe.api:284
vl_api_cli_t::cmd_in_shmem
u64 cmd_in_shmem
Definition:
vpe.api:88
vl_api_cli_reply_t::retval
i32 retval
Definition:
vpe.api:105
vl_api_control_ping_reply_t::client_index
u32 client_index
Definition:
vpe.api:75
vl_api_show_version_reply_t::version
string version
Definition:
vpe.api:187
vl_api_get_next_index_t::context
u32 context
Definition:
vpe.api:270
vl_api_get_node_index_reply_t::node_index
u32 node_index
Definition:
vpe.api:136
vl_api_get_node_index_reply_t::context
u32 context
Definition:
vpe.api:134
vl_api_cli_inband_reply_t::reply
string reply
Definition:
vpe.api:112
name
u8 name[64]
Definition:
memclnt.api:152
vl_api_cli_t::client_index
u32 client_index
Definition:
vpe.api:86
vl_api_thread_data_t::id
u32 id
Definition:
vpe.api:217
vl_api_add_node_next_t::context
u32 context
Definition:
vpe.api:148
vl_api_cli_inband_reply_t::retval
i32 retval
Definition:
vpe.api:111
vl_api_show_threads_t::client_index
u32 client_index
Definition:
vpe.api:199
vl_api_get_node_graph_t::client_index
u32 client_index
Definition:
vpe.api:242
vl_api_show_version_reply_t::build_date
string build_date
Definition:
vpe.api:188
vl_api_thread_data_t
thread data
Definition:
vpe.api:215
vl_api_show_threads_reply_t::retval
i32 retval
Definition:
vpe.api:235
i32
signed int i32
Definition:
types.h:77
version
option version
Definition:
vpe.api:22
vl_api_add_node_next_reply_t::context
u32 context
Definition:
vpe.api:160
vl_api_control_ping_reply_t::context
u32 context
Definition:
vpe.api:73
count
size_t count
Definition:
vapi.c:47
vl_api_get_node_graph_reply_t::retval
i32 retval
Definition:
vpe.api:257
vl_api_cli_reply_t::reply_in_shmem
u64 reply_in_shmem
Definition:
vpe.api:106
vl_api_cli_inband_t::context
u32 context
Definition:
vpe.api:93
vl_api_show_version_reply_t::build_directory
string build_directory
Definition:
vpe.api:189
vl_api_get_node_index_t::context
u32 context
Definition:
vpe.api:123
vl_api_get_node_graph_t::context
u32 context
Definition:
vpe.api:243
vl_api_get_node_index_reply_t::retval
i32 retval
Definition:
vpe.api:135
vl_api_show_version_reply_t::retval
i32 retval
Definition:
vpe.api:185
vl_api_thread_data_t::pid
u32 pid
Definition:
vpe.api:220
vl_api_get_node_graph_reply_t::reply_in_shmem
u64 reply_in_shmem
Definition:
vpe.api:258
vl_api_cli_inband_t::cmd
string cmd
Definition:
vpe.api:94
src
vpp
api
vpe.api
Generated on Mon Jun 29 2020 12:03:46 for FD.io VPP by
1.8.13