blob: 32e51407949a4933ee8387d82b7327163e706400 [file] [log] [blame]
Ed Warnickecb9cada2015-12-08 15:45:58 -07001/* 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
Ed Warnickecb9cada2015-12-08 15:45:58 -070017/*
18 * Create a client registration
19 */
20manual_print
21define memclnt_create {
22 i32 ctx_quota; /* requested punt context quota */
23 u32 context; /* opaque value to be returned in the reply */
24 u64 input_queue; /* client's queue */
25 u8 name[64]; /* for show, find by name, whatever */
26 u32 api_versions[8]; /* client-server pairs use as desired */
27};
28
29define memclnt_create_reply {
30 i32 response; /* Non-negative = success */
Dave Barach557d1282016-11-10 14:22:49 -050031 u64 handle; /* handle by which vlib knows this client */
Ed Warnickecb9cada2015-12-08 15:45:58 -070032 u32 index; /* index, used e.g. by API trace replay */
33 u32 context; /* opaque value from the create request */
Dave Barach557d1282016-11-10 14:22:49 -050034 u64 message_table; /* serialized message table in shmem */
Ed Warnickecb9cada2015-12-08 15:45:58 -070035};
36
37/*
38 * Delete a client registration
39 */
40manual_print
41define memclnt_delete {
42 u32 index; /* index, used e.g. by API trace replay */
43 u64 handle; /* handle by which vlib knows this client */
44};
45
46define memclnt_delete_reply {
47 i32 response; /* Non-negative = success */
48 u64 handle; /* in case the client wonders */
49};
50
Ole Troandfc9b7c2017-03-06 23:51:57 +010051/*
Ed Warnickecb9cada2015-12-08 15:45:58 -070052 * Client RX thread exit
53 */
Ed Warnickecb9cada2015-12-08 15:45:58 -070054define rx_thread_exit {
55 u8 dummy;
56};
57
58/*
Ole Troandfc9b7c2017-03-06 23:51:57 +010059 * Client RX thread suspend
60 */
61define memclnt_rx_thread_suspend {
62 u8 dummy;
63};
64
65/*
66 * Client read timeout
67 */
68define memclnt_read_timeout {
69 u8 dummy;
70};
71
72/*
Ed Warnickecb9cada2015-12-08 15:45:58 -070073 * RPC
74 */
Dave Barach11b8dbf2017-04-24 10:46:54 -040075autoreply define rpc_call {
Ed Warnickecb9cada2015-12-08 15:45:58 -070076 u32 client_index;
77 u32 context;
78 u64 function;
79 u8 multicast;
80 u8 need_barrier_sync;
81 u8 send_reply;
82 u8 data[0];
83};
84
Ed Warnickecb9cada2015-12-08 15:45:58 -070085/*
86 * Lookup message-ID base by name
87 */
88define get_first_msg_id {
89 u32 client_index;
90 u32 context;
91 u8 name[64];
92};
93
94define get_first_msg_id_reply {
95 u32 client_index;
96 u32 context;
97 i32 retval;
98 u16 first_msg_id;
99};
Dave Barach987e11d2017-02-27 13:10:27 -0500100
101/*
102 * Trace the plugin message-id allocator
103 * so we stand a chance of dealing with different sets of plugins
104 * at api trace replay time
105 */
106
107manual_print define trace_plugin_msg_ids
108{
109 u32 client_index;
110 u32 context;
111 u8 plugin_name[128];
112 u16 first_msg_id;
113 u16 last_msg_id;
114};