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.0.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
33 define memclnt_create {
34 u32 context; /* opaque value to be returned in the reply */
35 i32 ctx_quota; /* requested punt context quota */
36 u64 input_queue; /* client's queue */
37 u8 name[64]; /* for show, find by name, whatever */
38 u32 api_versions[8]; /* client-server pairs use as desired */
41 define memclnt_create_reply {
42 u32 context; /* opaque value from the create request */
43 i32 response; /* Non-negative = success */
44 u64 handle; /* handle by which vlib knows this client */
45 u32 index; /* index, used e.g. by API trace replay */
46 u64 message_table; /* serialized message table in shmem */
50 * Delete a client registration
53 define memclnt_delete {
54 u32 index; /* index, used e.g. by API trace replay */
55 u64 handle; /* handle by which vlib knows this client */
58 define memclnt_delete_reply {
59 i32 response; /* Non-negative = success */
60 u64 handle; /* in case the client wonders */
64 * Client RX thread exit
66 define rx_thread_exit {
71 * Client RX thread suspend
73 define memclnt_rx_thread_suspend {
80 define memclnt_read_timeout {
87 autoreply define rpc_call {
99 * Lookup message-ID base by name
101 define get_first_msg_id {
107 define get_first_msg_id_reply {
114 * Get API version table (includes built-in and plugins)
116 typeonly define module_version {
122 define api_versions {
126 define api_versions_reply {
130 vl_api_module_version_t api_versions[count];
134 * Trace the plugin message-id allocator
135 * so we stand a chance of dealing with different sets of plugins
136 * at api trace replay time
139 manual_print define trace_plugin_msg_ids
148 typedef message_table_entry
155 * Create a socket client registration.
157 define sockclnt_create {
158 u32 context; /* opaque value to be returned in the reply */
159 u8 name[64]; /* for show, find by name, whatever */
162 define sockclnt_create_reply {
164 u32 context; /* opaque value from the create request */
165 i32 response; /* Non-negative = success */
166 u32 index; /* index, used e.g. by API trace replay */
168 vl_api_message_table_entry_t message_table[count];
172 * Delete a client registration
174 define sockclnt_delete {
177 u32 index; /* index, used e.g. by API trace replay */
180 define sockclnt_delete_reply {
182 i32 response; /* Non-negative = success */
186 * Initialize shm api over socket api
188 autoreply define sock_init_shm {
196 /* define sock_init_shm_reply {
203 * Memory client ping / response
204 * Only sent on inactive connections
206 autoreply define memclnt_keepalive