FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
memclnt.api
Go to the documentation of this file.
1 /* Hey Emacs use -*- mode: C -*- */
2 /*
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:
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16 
17 option version = "2.1.0";
18 
19 /*
20  * Define services not following the normal conventions here
21  */
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;
27 };
28 
29 /*
30  * Create a client registration
31  */
32 manual_print
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  string name[64]; /* for show, find by name, whatever */
38  u32 api_versions[8]; /* client-server pairs use as desired */
39 };
40 
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 */
47 };
48 
49 /*
50  * Delete a client registration
51  */
52 manual_print
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 */
56  bool do_cleanup; /* vlib to cleanup the registration */
57 };
58 
59 define memclnt_delete_reply {
60  i32 response; /* Non-negative = success */
61  u64 handle; /* in case the client wonders */
62 };
63 
64 /*
65  * Client RX thread exit
66  */
67 define rx_thread_exit {
69 };
70 
71 /*
72  * Client RX thread suspend
73  */
74 define memclnt_rx_thread_suspend {
76 };
77 
78 /*
79  * Client read timeout
80  */
81 define memclnt_read_timeout {
83 };
84 
85 /*
86  * RPC
87  */
88 autoreply define rpc_call {
91  u64 function;
97 };
98 
99 /*
100  * Lookup message-ID base by name
101  */
102 define get_first_msg_id {
105  string name[64];
106 };
107 
108 define get_first_msg_id_reply {
112 };
113 
114 /*
115  * Get API version table (includes built-in and plugins)
116  */
117 typedef module_version {
118  u32 major;
121  string name[64];
122 };
123 define api_versions {
126 };
127 define api_versions_reply {
131  vl_api_module_version_t api_versions[count];
132 };
133 
134 /*
135  * Trace the plugin message-id allocator
136  * so we stand a chance of dealing with different sets of plugins
137  * at api trace replay time
138  */
139 
140 manual_print define trace_plugin_msg_ids
141 {
144  string plugin_name[128];
147 };
148 
149 typedef message_table_entry
150 {
151  u16 index;
152  string name[64];
153 };
154 
155 /*
156  * Create a socket client registration.
157  */
158 define sockclnt_create {
159  u32 context; /* opaque value to be returned in the reply */
160  string name[64]; /* for show, find by name, whatever */
161 };
162 
163 define sockclnt_create_reply {
165  u32 context; /* opaque value from the create request */
166  i32 response; /* Non-negative = success */
167  u32 index; /* index, used e.g. by API trace replay */
169  vl_api_message_table_entry_t message_table[count];
170 };
171 
172 /*
173  * Delete a client registration
174  */
175 define sockclnt_delete {
178  u32 index; /* index, used e.g. by API trace replay */
179 };
180 
181 define sockclnt_delete_reply {
183  i32 response; /* Non-negative = success */
184 };
185 
186 /*
187  * Initialize shm api over socket api
188  */
189 autoreply define sock_init_shm {
194  u64 configs[nitems];
195 };
196 
197 /* define sock_init_shm_reply {
198  u32 client_index;
199  u32 context;
200  i32 retval;
201 }; */
202 
203 /*
204  * Memory client ping / response
205  * Only sent on inactive connections
206  */
207 autoreply define memclnt_keepalive
208 {
211 };
vl_api_sockclnt_create_reply_t::response
i32 response
Definition: memclnt.api:166
vl_api_api_versions_reply_t::api_versions
vl_api_module_version_t api_versions[count]
Definition: memclnt.api:131
vl_api_sock_init_shm_t
Definition: memclnt.api:189
vl_api_rpc_call_t::multicast
u8 multicast
Definition: memclnt.api:92
vl_api_trace_plugin_msg_ids_t::client_index
u32 client_index
Definition: memclnt.api:142
vl_api_sockclnt_create_reply_t::message_table
vl_api_message_table_entry_t message_table[count]
Definition: memclnt.api:169
vl_api_sock_init_shm_reply_t
Definition: memclnt.api:197
vl_api_memclnt_create_t::ctx_quota
i32 ctx_quota
Definition: memclnt.api:35
vl_api_memclnt_create_reply_t::index
u32 index
Definition: memclnt.api:45
vl_api_sock_init_shm_reply_t::retval
i32 retval
Definition: memclnt.api:200
vl_api_sock_init_shm_t::configs
u64 configs[nitems]
Definition: memclnt.api:194
vl_api_api_versions_t::context
u32 context
Definition: memclnt.api:125
vl_api_memclnt_delete_t
Definition: memclnt.api:53
vl_api_rpc_call_t::data
u8 data[data_len]
Definition: memclnt.api:96
vl_api_trace_plugin_msg_ids_t
Definition: memclnt.api:140
vl_api_rx_thread_exit_t::dummy
u8 dummy
Definition: memclnt.api:68
message_table_entry
typedef message_table_entry
Definition: memclnt.api:150
u16
unsigned short u16
Definition: types.h:57
vl_api_sock_init_shm_t::nitems
u8 nitems
Definition: memclnt.api:193
vl_api_memclnt_rx_thread_suspend_t
Definition: memclnt.api:74
vl_api_memclnt_create_t::name
string name[64]
Definition: memclnt.api:37
vl_api_rx_thread_exit_t
Definition: memclnt.api:67
vl_api_memclnt_create_reply_t::context
u32 context
Definition: memclnt.api:42
vl_api_get_first_msg_id_t::client_index
u32 client_index
Definition: memclnt.api:103
vl_api_memclnt_create_reply_t
Definition: memclnt.api:41
i32
signed int i32
Definition: types.h:77
vl_api_trace_plugin_msg_ids_t::last_msg_id
u16 last_msg_id
Definition: memclnt.api:146
vl_api_memclnt_create_reply_t::message_table
u64 message_table
Definition: memclnt.api:46
vl_api_rpc_call_t::context
u32 context
Definition: memclnt.api:90
vl_api_memclnt_create_t
Definition: memclnt.api:33
vl_api_memclnt_delete_reply_t
Definition: memclnt.api:59
vl_api_sock_init_shm_t::context
u32 context
Definition: memclnt.api:191
vl_api_sockclnt_delete_reply_t::response
i32 response
Definition: memclnt.api:183
vl_api_memclnt_create_t::context
u32 context
Definition: memclnt.api:34
vl_api_sockclnt_delete_t::context
u32 context
Definition: memclnt.api:177
count
u8 count
Definition: dhcp.api:208
vl_api_trace_plugin_msg_ids_t::plugin_name
string plugin_name[128]
Definition: memclnt.api:144
vl_api_sock_init_shm_reply_t::client_index
u32 client_index
Definition: memclnt.api:198
vl_api_rpc_call_t::data_len
u32 data_len
Definition: memclnt.api:95
vl_api_memclnt_read_timeout_t::dummy
u8 dummy
Definition: memclnt.api:82
vl_api_memclnt_rx_thread_suspend_t::dummy
u8 dummy
Definition: memclnt.api:75
patch
u32 patch
Definition: memclnt.api:120
vl_api_get_first_msg_id_reply_t::retval
i32 retval
Definition: memclnt.api:110
vl_api_memclnt_delete_reply_t::handle
u64 handle
Definition: memclnt.api:61
vl_api_sockclnt_create_reply_t::count
u16 count
Definition: memclnt.api:168
vl_api_get_first_msg_id_t::name
string name[64]
Definition: memclnt.api:105
vl_api_rpc_call_t::client_index
u32 client_index
Definition: memclnt.api:89
vl_api_memclnt_create_reply_t::handle
u64 handle
Definition: memclnt.api:44
vl_api_memclnt_keepalive_t::client_index
u32 client_index
Definition: memclnt.api:209
vl_api_trace_plugin_msg_ids_t::first_msg_id
u16 first_msg_id
Definition: memclnt.api:145
vl_api_trace_plugin_msg_ids_t::context
u32 context
Definition: memclnt.api:143
data
u8 data[128]
Definition: ipsec_types.api:95
vl_api_rpc_call_t::send_reply
u8 send_reply
Definition: memclnt.api:94
vl_api_sock_init_shm_t::requested_size
u32 requested_size
Definition: memclnt.api:192
vl_api_memclnt_keepalive_t::context
u32 context
Definition: memclnt.api:210
vl_api_get_first_msg_id_t::context
u32 context
Definition: memclnt.api:104
index
u32 index
Definition: flow_types.api:221
vl_api_memclnt_delete_reply_t::response
i32 response
Definition: memclnt.api:60
minor
u32 minor
Definition: memclnt.api:119
vl_api_memclnt_create_t::api_versions
u32 api_versions[8]
Definition: memclnt.api:38
vl_api_memclnt_delete_t::do_cleanup
bool do_cleanup
Definition: memclnt.api:56
vl_api_sock_init_shm_t::client_index
u32 client_index
Definition: memclnt.api:190
u64
unsigned long u64
Definition: types.h:89
vl_api_get_first_msg_id_reply_t::first_msg_id
u16 first_msg_id
Definition: memclnt.api:111
vl_api_get_first_msg_id_reply_t
Definition: memclnt.api:108
vl_api_sockclnt_create_reply_t
Definition: memclnt.api:163
vl_api_memclnt_delete_t::index
u32 index
Definition: memclnt.api:54
data_len
u8 data_len
Definition: ikev2_types.api:24
vl_api_api_versions_reply_t
Definition: memclnt.api:127
u32
unsigned int u32
Definition: types.h:88
vl_api_sockclnt_create_t::context
u32 context
Definition: memclnt.api:159
vl_api_sockclnt_delete_reply_t
Definition: memclnt.api:181
vl_api_get_first_msg_id_t
Definition: memclnt.api:102
vl_api_api_versions_t::client_index
u32 client_index
Definition: memclnt.api:124
vl_api_get_first_msg_id_reply_t::context
u32 context
Definition: memclnt.api:109
vl_api_memclnt_keepalive_t
Definition: memclnt.api:207
vl_api_sockclnt_delete_t::client_index
u32 client_index
Definition: memclnt.api:176
version
option version
Definition: memclnt.api:17
vl_api_api_versions_t
Definition: memclnt.api:123
name
string name[64]
Definition: memclnt.api:121
vl_api_sock_init_shm_reply_t::context
u32 context
Definition: memclnt.api:199
vl_api_rpc_call_t
Definition: memclnt.api:88
u8
unsigned char u8
Definition: types.h:56
vl_api_sockclnt_delete_t
Definition: memclnt.api:175
vl_api_memclnt_create_t::input_queue
u64 input_queue
Definition: memclnt.api:36
vl_api_sockclnt_create_reply_t::context
u32 context
Definition: memclnt.api:165
vl_api_sockclnt_delete_t::index
u32 index
Definition: memclnt.api:178
vl_api_memclnt_delete_t::handle
u64 handle
Definition: memclnt.api:55
vl_api_sockclnt_create_reply_t::client_index
u32 client_index
Definition: memclnt.api:164
vl_api_api_versions_reply_t::count
u32 count
Definition: memclnt.api:130
vl_api_rpc_call_t::need_barrier_sync
u8 need_barrier_sync
Definition: memclnt.api:93
vl_api_memclnt_read_timeout_t
Definition: memclnt.api:81
vl_api_sockclnt_create_reply_t::index
u32 index
Definition: memclnt.api:167
vl_api_api_versions_reply_t::context
u32 context
Definition: memclnt.api:128
vl_api_memclnt_create_reply_t::response
i32 response
Definition: memclnt.api:43
vl_api_sockclnt_create_t::name
string name[64]
Definition: memclnt.api:160
vl_api_sockclnt_delete_reply_t::context
u32 context
Definition: memclnt.api:182
vl_api_api_versions_reply_t::retval
i32 retval
Definition: memclnt.api:129
module_version
typedef module_version
Definition: memclnt.api:117
vl_api_sockclnt_create_t
Definition: memclnt.api:158
service
service
Definition: memclnt.api:22