1 /* Hey Emacs use -*- mode: C -*- */
3 * Copyright (c) 2015 Cisco and/or its affiliates.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 option version = "2.1.0";
20 * Define services not following the normal conventions here
23 rpc memclnt_rx_thread_suspend returns null;
24 rpc memclnt_read_timeout returns null;
25 rpc rx_thread_exit returns null;
26 rpc trace_plugin_msg_ids returns null;
30 * Create a client registration
32 define memclnt_create {
33 u32 context; /* opaque value to be returned in the reply */
34 i32 ctx_quota; /* requested punt context quota */
35 u64 input_queue; /* client's queue */
36 string name[64]; /* for show, find by name, whatever */
37 u32 api_versions[8]; /* client-server pairs use as desired */
40 define memclnt_create_reply {
41 u32 context; /* opaque value from the create request */
42 i32 response; /* Non-negative = success */
43 u64 handle; /* handle by which vlib knows this client */
44 u32 index; /* index, used e.g. by API trace replay */
45 u64 message_table; /* serialized message table in shmem */
49 * Delete a client registration
51 define memclnt_delete {
52 u32 index; /* index, used e.g. by API trace replay */
53 u64 handle; /* handle by which vlib knows this client */
54 bool do_cleanup; /* vlib to cleanup the registration */
57 define memclnt_delete_reply {
58 i32 response; /* Non-negative = success */
59 u64 handle; /* in case the client wonders */
63 * Client RX thread exit
65 define rx_thread_exit {
70 * Client RX thread suspend
72 define memclnt_rx_thread_suspend {
79 define memclnt_read_timeout {
86 autoreply define rpc_call {
98 * Lookup message-ID base by name
100 define get_first_msg_id {
106 define get_first_msg_id_reply {
113 * Get API version table (includes built-in and plugins)
115 typedef module_version {
121 define api_versions {
125 define api_versions_reply {
129 vl_api_module_version_t api_versions[count];
133 * Trace the plugin message-id allocator
134 * so we stand a chance of dealing with different sets of plugins
135 * at api trace replay time
138 define trace_plugin_msg_ids
142 string plugin_name[128];
147 typedef message_table_entry
154 * Create a socket client registration.
156 define sockclnt_create {
157 u32 context; /* opaque value to be returned in the reply */
158 string name[64]; /* for show, find by name, whatever */
161 define sockclnt_create_reply {
163 u32 context; /* opaque value from the create request */
164 i32 response; /* Non-negative = success */
165 u32 index; /* index, used e.g. by API trace replay */
167 vl_api_message_table_entry_t message_table[count];
171 * Delete a client registration
173 define sockclnt_delete {
176 u32 index; /* index, used e.g. by API trace replay */
179 define sockclnt_delete_reply {
181 i32 response; /* Non-negative = success */
185 * Initialize shm api over socket api
187 autoreply define sock_init_shm {
195 /* define sock_init_shm_reply {
202 * Memory client ping / response
203 * Only sent on inactive connections
205 autoreply define memclnt_keepalive
211 /** \brief Control ping from client to api server request
212 @param client_index - opaque cookie to identify the sender
213 @param context - sender context, to match reply w/ request
221 /** \brief Control ping from the client to the server response
222 @param client_index - opaque cookie to identify the sender
223 @param context - sender context, to match reply w/ request
224 @param retval - return code for the request
225 @param vpe_pid - the pid of the vpe, returned by the server
227 define control_ping_reply