blob: 6a108b81b08196a1d7461e946717d77c5fcc1052 [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
17/*
18 *------------------------------------------------------------------
19 * memclnt.api - API message(s) to hook up clients, pass traffic
20 * to client processes on the same system element
21 *
22 * Copyright (c) 2009 Cisco and/or its affiliates.
23 * Licensed under the Apache License, Version 2.0 (the "License");
24 * you may not use this file except in compliance with the License.
25 * You may obtain a copy of the License at:
26 *
27 * http://www.apache.org/licenses/LICENSE-2.0
28 *
29 * Unless required by applicable law or agreed to in writing, software
30 * distributed under the License is distributed on an "AS IS" BASIS,
31 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32 * See the License for the specific language governing permissions and
33 * limitations under the License.
34 *------------------------------------------------------------------
35 */
36
37/*
38 * Create a client registration
39 */
40manual_print
41define memclnt_create {
42 i32 ctx_quota; /* requested punt context quota */
43 u32 context; /* opaque value to be returned in the reply */
44 u64 input_queue; /* client's queue */
45 u8 name[64]; /* for show, find by name, whatever */
46 u32 api_versions[8]; /* client-server pairs use as desired */
47};
48
49define memclnt_create_reply {
50 i32 response; /* Non-negative = success */
51 u64 handle; /* handle by which vlib knows this client */
52 u32 index; /* index, used e.g. by API trace replay */
53 u32 context; /* opaque value from the create request */
54};
55
56/*
57 * Delete a client registration
58 */
59manual_print
60define memclnt_delete {
61 u32 index; /* index, used e.g. by API trace replay */
62 u64 handle; /* handle by which vlib knows this client */
63};
64
65define memclnt_delete_reply {
66 i32 response; /* Non-negative = success */
67 u64 handle; /* in case the client wonders */
68};
69
70/*
71 * Client RX thread exit
72 */
73
74define rx_thread_exit {
75 u8 dummy;
76};
77
78/*
79 * RPC
80 */
81define rpc_call {
82 u32 client_index;
83 u32 context;
84 u64 function;
85 u8 multicast;
86 u8 need_barrier_sync;
87 u8 send_reply;
88 u8 data[0];
89};
90
91define rpc_reply {
92 i32 retval;
93 u32 context;
94};
95
96/*
97 * Lookup message-ID base by name
98 */
99define get_first_msg_id {
100 u32 client_index;
101 u32 context;
102 u8 name[64];
103};
104
105define get_first_msg_id_reply {
106 u32 client_index;
107 u32 context;
108 i32 retval;
109 u16 first_msg_id;
110};