blob: 084678f25185eb1effaab6b5e0d66a84ab8cfc5e [file] [log] [blame]
Dave Barach68b0fb02017-02-28 15:15:56 -05001/*
2 * Copyright (c) 2015-2016 Cisco and/or its affiliates.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
Dave Barach0d056e52017-09-28 15:11:16 -040015
Florin Corasd85de682018-11-29 17:02:29 -080016option version = "1.5.0";
Dave Barach0d056e52017-09-28 15:11:16 -040017
Florin Coras6cf30ad2017-04-04 23:08:23 -070018/** \brief client->vpp, attach application to session layer
19 @param client_index - opaque cookie to identify the sender
20 @param context - sender context, to match reply w/ request
21 @param initial_segment_size - size of the initial shm segment to be
22 allocated
23 @param options - segment size, fifo sizes, etc.
Florin Corascea194d2017-10-02 00:18:51 -070024 @param namespace_id_len - length of the namespace id c-string
25 @param namespace_id - 0 terminted c-string
Florin Coras6cf30ad2017-04-04 23:08:23 -070026*/
27 define application_attach {
28 u32 client_index;
29 u32 context;
30 u32 initial_segment_size;
31 u64 options[16];
Florin Corascea194d2017-10-02 00:18:51 -070032 u8 namespace_id_len;
33 u8 namespace_id [64];
Florin Coras6cf30ad2017-04-04 23:08:23 -070034 };
35
36 /** \brief Application attach reply
37 @param context - sender context, to match reply w/ request
38 @param retval - return code for the request
39 @param app_event_queue_address - vpp event queue address or 0 if this
40 connection shouldn't send events
Florin Coras99368312018-08-02 10:45:44 -070041 @param n_fds - number of fds exchanged
42 @param fd_flags - set of flags that indicate which fds are to be expected
43 over the socket (set only if socket transport available)
Florin Coras6cf30ad2017-04-04 23:08:23 -070044 @param segment_size - size of first shm segment
45 @param segment_name_length - length of segment name
46 @param segment_name - name of segment client needs to attach to
Florin Corasc1f5a432018-11-20 11:31:26 -080047 @param app_index - index of the newly created app
Florin Corasd85de682018-11-29 17:02:29 -080048 @param segment_handle - handle for segment
Florin Coras6cf30ad2017-04-04 23:08:23 -070049*/
50define application_attach_reply {
51 u32 context;
52 i32 retval;
53 u64 app_event_queue_address;
Florin Coras99368312018-08-02 10:45:44 -070054 u8 n_fds;
55 u8 fd_flags;
Florin Coras6cf30ad2017-04-04 23:08:23 -070056 u32 segment_size;
57 u8 segment_name_length;
58 u8 segment_name[128];
Florin Corasc1f5a432018-11-20 11:31:26 -080059 u32 app_index;
Florin Corasd85de682018-11-29 17:02:29 -080060 u64 segment_handle;
Florin Coras6cf30ad2017-04-04 23:08:23 -070061};
62
Florin Coras371ca502018-02-21 12:07:41 -080063/** \brief Application add TLS certificate
64 @param client_index - opaque cookie to identify the sender
65 @param context - sender context, to match reply w/ request
66 @param cert_len - certificate length
67 @param cert - certificate as a string
68*/
69autoreply define application_tls_cert_add {
70 u32 client_index;
71 u32 context;
72 u32 app_index;
73 u16 cert_len;
74 u8 cert[cert_len];
75};
76
77/** \brief Application add TLS key
78 @param client_index - opaque cookie to identify the sender
79 @param context - sender context, to match reply w/ request
80 @param key_len - certificate length
81 @param key - PEM encoded key as a string
82*/
83autoreply define application_tls_key_add {
84 u32 client_index;
85 u32 context;
86 u32 app_index;
87 u16 key_len;
88 u8 key[key_len];
89};
90
Florin Coras6cf30ad2017-04-04 23:08:23 -070091 /** \brief client->vpp, attach application to session layer
92 @param client_index - opaque cookie to identify the sender
93 @param context - sender context, to match reply w/ request
94*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040095autoreply define application_detach {
Florin Coras6cf30ad2017-04-04 23:08:23 -070096 u32 client_index;
97 u32 context;
98 };
99
Florin Coras6cf30ad2017-04-04 23:08:23 -0700100/** \brief vpp->client, please map an additional shared memory segment
101 @param client_index - opaque cookie to identify the sender
102 @param context - sender context, to match reply w/ request
Florin Coras99368312018-08-02 10:45:44 -0700103 @param fd_flags - set of flags that indicate which, if any, fds are
104 to be expected over the socket. This is set only if
105 socket transport available
106 @param segment_size - size of the segment to be mapped
107 @param segment_name - name of the segment to be mapped
Florin Corasfa76a762018-11-29 12:40:10 -0800108 @param segment_handle - unique identifier for segment
Florin Coras6cf30ad2017-04-04 23:08:23 -0700109*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400110autoreply define map_another_segment {
Florin Coras6cf30ad2017-04-04 23:08:23 -0700111 u32 client_index;
112 u32 context;
Florin Coras99368312018-08-02 10:45:44 -0700113 u8 fd_flags;
Florin Coras6cf30ad2017-04-04 23:08:23 -0700114 u32 segment_size;
115 u8 segment_name[128];
Florin Corasfa76a762018-11-29 12:40:10 -0800116 u64 segment_handle;
Florin Coras6cf30ad2017-04-04 23:08:23 -0700117};
118
Florin Corasf8f516a2018-02-08 15:10:09 -0800119/** \brief vpp->client unmap shared memory segment
120 @param client_index - opaque cookie to identify the sender
121 @param context - sender context, to match reply w/ request
Florin Corasfa76a762018-11-29 12:40:10 -0800122 @param segment_name - segment name
123 @param segment_handle - handle of the segment to be unmapped
Florin Corasf8f516a2018-02-08 15:10:09 -0800124*/
125autoreply define unmap_segment {
126 u32 client_index;
127 u32 context;
Florin Corasfa76a762018-11-29 12:40:10 -0800128 u64 segment_handle;
Florin Corasf8f516a2018-02-08 15:10:09 -0800129};
130
Dave Barach68b0fb02017-02-28 15:15:56 -0500131 /** \brief Bind to a given URI
132 @param client_index - opaque cookie to identify the sender
133 @param context - sender context, to match reply w/ request
134 @param accept_cookie - sender accept cookie, to identify this bind flavor
135 @param uri - a URI, e.g. "tcp://0.0.0.0/0/80" [ipv4]
136 "tcp://::/0/80" [ipv6] etc.
137 @param options - socket options, fifo sizes, etc.
138*/
Florin Coras7fb0fe12018-04-09 09:24:52 -0700139define bind_uri {
Dave Barach68b0fb02017-02-28 15:15:56 -0500140 u32 client_index;
141 u32 context;
142 u32 accept_cookie;
Dave Barach68b0fb02017-02-28 15:15:56 -0500143 u8 uri[128];
Dave Barach68b0fb02017-02-28 15:15:56 -0500144};
Florin Corasc0d532d2018-10-12 08:36:20 -0700145/** *** Will be DEPRECATED. Use message queue instead. *** */
Florin Coras7fb0fe12018-04-09 09:24:52 -0700146define bind_uri_reply {
147 u32 context;
148 u64 handle;
149 i32 retval;
150 u64 rx_fifo;
151 u64 tx_fifo;
152 u8 lcl_is_ip4;
153 u8 lcl_ip[16];
154 u16 lcl_port;
155 u64 vpp_evt_q;
156};
157
Dave Barach68b0fb02017-02-28 15:15:56 -0500158/** \brief Unbind a given URI
159 @param client_index - opaque cookie to identify the sender
160 @param context - sender context, to match reply w/ request
161 @param uri - a URI, e.g. "tcp://0.0.0.0/0/80" [ipv4]
162 "tcp://::/0/80" [ipv6], etc.
163 @param options - socket options, fifo sizes, etc.
164*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400165autoreply define unbind_uri {
Dave Barach68b0fb02017-02-28 15:15:56 -0500166 u32 client_index;
167 u32 context;
168 u8 uri[128];
169};
170
171/** \brief Connect to a given URI
172 @param client_index - opaque cookie to identify the sender
173 @param context - sender context, to match reply w/ request
Florin Coras6cf30ad2017-04-04 23:08:23 -0700174 @param client_queue_address - binary API client queue address. Used by
175 local server when connect was redirected.
Florin Corascea194d2017-10-02 00:18:51 -0700176 @param options - socket options, fifo sizes, etc. passed by vpp to the
177 server when redirecting connects
178 @param uri - a URI, e.g. "tcp4://0.0.0.0/0/80"
179 "tcp6://::/0/80" [ipv6], etc.
Dave Barach68b0fb02017-02-28 15:15:56 -0500180*/
Dave Wallace33e002b2017-09-06 01:20:02 -0400181autoreply define connect_uri {
Dave Barach68b0fb02017-02-28 15:15:56 -0500182 u32 client_index;
183 u32 context;
Dave Barach68b0fb02017-02-28 15:15:56 -0500184 u64 client_queue_address;
185 u64 options[16];
Florin Corascea194d2017-10-02 00:18:51 -0700186 u8 uri[128];
Dave Barach68b0fb02017-02-28 15:15:56 -0500187};
188
Dave Barach68b0fb02017-02-28 15:15:56 -0500189/** \brief vpp->client, accept this session
Florin Corasc0d532d2018-10-12 08:36:20 -0700190 *** Will be DEPRECATED. Use message queue instead. ***
Dave Barach68b0fb02017-02-28 15:15:56 -0500191 @param context - sender context, to match reply w/ request
Florin Coras6cf30ad2017-04-04 23:08:23 -0700192 @param listener_handle - tells client which listener this pertains to
193 @param handle - unique session identifier
Dave Barach68b0fb02017-02-28 15:15:56 -0500194 @param rx_fifo_address - rx (vpp -> vpp-client) fifo address
195 @param tx_fifo_address - tx (vpp-client -> vpp) fifo address
Florin Corasf8f516a2018-02-08 15:10:09 -0800196 @param vpp_event_queue_address - vpp's event queue address or client's
197 event queue for cut through
198 @param server_event_queue_address - server's event queue address for
199 cut through sessions
Florin Coras6cf30ad2017-04-04 23:08:23 -0700200 @param port - remote port
201 @param is_ip4 - 1 if the ip is ip4
202 @param ip - remote ip
Dave Barach68b0fb02017-02-28 15:15:56 -0500203*/
204define accept_session {
205 u32 client_index;
206 u32 context;
Florin Coras6cf30ad2017-04-04 23:08:23 -0700207 u64 listener_handle;
208 u64 handle;
Dave Barach68b0fb02017-02-28 15:15:56 -0500209 u64 server_rx_fifo;
210 u64 server_tx_fifo;
Dave Barach68b0fb02017-02-28 15:15:56 -0500211 u64 vpp_event_queue_address;
Florin Corasf8f516a2018-02-08 15:10:09 -0800212 u64 server_event_queue_address;
Florin Coras6cf30ad2017-04-04 23:08:23 -0700213 u16 port;
214 u8 is_ip4;
215 u8 ip[16];
Dave Barach68b0fb02017-02-28 15:15:56 -0500216};
217
218/** \brief client->vpp, reply to an accept message
Florin Corasc0d532d2018-10-12 08:36:20 -0700219 *** Will be DEPRECATED. Use message queue instead. ***
Dave Barach68b0fb02017-02-28 15:15:56 -0500220 @param context - sender context, to match reply w/ request
221 @param retval - return code for the request
222 @param session_index - session index from accept_session / connect_reply
223 @param session_thread_index - thread index from accept_session /
224 connect_reply
225*/
226define accept_session_reply {
227 u32 context;
228 i32 retval;
Florin Coras6cf30ad2017-04-04 23:08:23 -0700229 u64 handle;
Dave Barach68b0fb02017-02-28 15:15:56 -0500230};
231
232/** \brief bidirectional disconnect API
233 @param client_index - opaque cookie to identify the sender
234 client to vpp direction only
235 @param context - sender context, to match reply w/ request
Florin Coras6cf30ad2017-04-04 23:08:23 -0700236 @param handle - session handle obtained from accept/connect
Dave Barach68b0fb02017-02-28 15:15:56 -0500237*/
238define disconnect_session {
239 u32 client_index;
240 u32 context;
Florin Coras6cf30ad2017-04-04 23:08:23 -0700241 u64 handle;
Dave Barach68b0fb02017-02-28 15:15:56 -0500242};
243
244/** \brief bidirectional disconnect reply API
Florin Corasc0d532d2018-10-12 08:36:20 -0700245 *** Will be DEPRECATED. Use message queue instead. ***
Dave Barach68b0fb02017-02-28 15:15:56 -0500246 @param client_index - opaque cookie to identify the sender
247 client to vpp direction only
248 @param context - sender context, to match reply w/ request
249 @param retval - return code for the request
Florin Coras6cf30ad2017-04-04 23:08:23 -0700250 @param handle - session handle
Dave Barach68b0fb02017-02-28 15:15:56 -0500251*/
252define disconnect_session_reply {
Dave Barach68b0fb02017-02-28 15:15:56 -0500253 u32 context;
254 i32 retval;
Florin Coras6cf30ad2017-04-04 23:08:23 -0700255 u64 handle;
Dave Barach68b0fb02017-02-28 15:15:56 -0500256};
257
258/** \brief vpp->client reset session API
Florin Corasc0d532d2018-10-12 08:36:20 -0700259 *** Will be DEPRECATED. Use message queue instead. ***
Dave Barach68b0fb02017-02-28 15:15:56 -0500260 @param client_index - opaque cookie to identify the sender
261 client to vpp direction only
262 @param context - sender context, to match reply w/ request
Florin Coras6cf30ad2017-04-04 23:08:23 -0700263 @param handle - session handle obtained via accept/connects
Dave Barach68b0fb02017-02-28 15:15:56 -0500264*/
265define reset_session {
266 u32 client_index;
267 u32 context;
Florin Coras6cf30ad2017-04-04 23:08:23 -0700268 u64 handle;
Dave Barach68b0fb02017-02-28 15:15:56 -0500269};
270
271/** \brief client->vpp reset session reply
Florin Corasc0d532d2018-10-12 08:36:20 -0700272 *** Will be DEPRECATED. Use message queue instead. ***
Dave Barach68b0fb02017-02-28 15:15:56 -0500273 @param context - sender context, to match reply w/ request
274 @param retval - return code for the request
Florin Coras6cf30ad2017-04-04 23:08:23 -0700275 @param handle - session handle obtained via accept/connect
Dave Barach68b0fb02017-02-28 15:15:56 -0500276*/
277define reset_session_reply {
Dave Barach68b0fb02017-02-28 15:15:56 -0500278 u32 context;
279 i32 retval;
Florin Coras6cf30ad2017-04-04 23:08:23 -0700280 u64 handle;
Dave Barach68b0fb02017-02-28 15:15:56 -0500281};
282
283/** \brief Bind to an ip:port pair for a given transport protocol
284 @param client_index - opaque cookie to identify the sender
285 @param context - sender context, to match reply w/ request
Florin Coras15531972018-08-12 23:50:53 -0700286 @param wrk_index - index of worker requesting the bind
Dave Barach68b0fb02017-02-28 15:15:56 -0500287 @param vrf - bind namespace
288 @param is_ip4 - flag that is 1 if ip address family is IPv4
289 @param ip - ip address
290 @param port - port
291 @param proto - protocol 0 - TCP 1 - UDP
292 @param options - socket options, fifo sizes, etc.
293*/
294define bind_sock {
295 u32 client_index;
296 u32 context;
Florin Coras15531972018-08-12 23:50:53 -0700297 u32 wrk_index;
Dave Barach68b0fb02017-02-28 15:15:56 -0500298 u32 vrf;
299 u8 is_ip4;
300 u8 ip[16];
301 u16 port;
302 u8 proto;
303 u64 options[16];
304};
305
306/** \brief Unbind
307 @param client_index - opaque cookie to identify the sender
308 @param context - sender context, to match reply w/ request
Florin Corasab2f6db2018-08-31 14:31:41 -0700309 @param wrk_index - index of worker requesting the bind
Dave Barach68b0fb02017-02-28 15:15:56 -0500310 @param handle - bind handle obtained from bind reply
311*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400312autoreply define unbind_sock {
Dave Barach68b0fb02017-02-28 15:15:56 -0500313 u32 client_index;
314 u32 context;
Florin Corasab2f6db2018-08-31 14:31:41 -0700315 u32 wrk_index;
Dave Barach68b0fb02017-02-28 15:15:56 -0500316 u64 handle;
317};
318
319/** \brief Connect to a remote peer
320 @param client_index - opaque cookie to identify the sender
321 @param context - sender context, to match reply w/ request
Florin Coras15531972018-08-12 23:50:53 -0700322 @param wrk_index - worker that requests the connect
Florin Corascea194d2017-10-02 00:18:51 -0700323 @param client_queue_address - client's API queue address. Non-zero when
324 used to perform redirects
325 @param options - socket options, fifo sizes, etc. when doing redirects
Dave Barach68b0fb02017-02-28 15:15:56 -0500326 @param vrf - connection namespace
327 @param is_ip4 - flag that is 1 if ip address family is IPv4
328 @param ip - ip address
329 @param port - port
330 @param proto - protocol 0 - TCP 1 - UDP
Florin Coras8f89dd02018-03-05 16:53:07 -0800331 @param hostname-len - length of hostname
332 @param hostname - destination's hostname. If present, used by protocols
333 like tls.
Dave Barach68b0fb02017-02-28 15:15:56 -0500334*/
Dave Wallace33e002b2017-09-06 01:20:02 -0400335autoreply define connect_sock {
Dave Barach68b0fb02017-02-28 15:15:56 -0500336 u32 client_index;
337 u32 context;
Florin Coras15531972018-08-12 23:50:53 -0700338 u32 wrk_index;
Florin Corascea194d2017-10-02 00:18:51 -0700339 u64 client_queue_address;
340 u64 options[16];
Dave Barach68b0fb02017-02-28 15:15:56 -0500341 u32 vrf;
342 u8 is_ip4;
343 u8 ip[16];
344 u16 port;
345 u8 proto;
Florin Coras8f89dd02018-03-05 16:53:07 -0800346 u8 hostname_len;
347 u8 hostname[hostname_len];
Dave Barach68b0fb02017-02-28 15:15:56 -0500348};
349
350/** \brief Bind reply
Florin Corasc0d532d2018-10-12 08:36:20 -0700351 *** Will be DEPRECATED. Use message queue instead. ***
Dave Barach68b0fb02017-02-28 15:15:56 -0500352 @param context - sender context, to match reply w/ request
353 @param handle - bind handle
354 @param retval - return code for the request
Florin Coras7fb0fe12018-04-09 09:24:52 -0700355 @param lcl_is_ip4 - local ip address type
356 @param lcl_ip6 - local ip address
357 @param lcl_port - local port
358 @param rx_fifo - rx fifo address if allocated (connectionless)
359 @param tx_fifo - tx fifo address if allocated (connectionless)
360 @param vpp_evt_q - vpp event queue address (connectionless)
Dave Barach68b0fb02017-02-28 15:15:56 -0500361 @param segment_name_length - length of segment name
362 @param segment_name - name of segment client needs to attach to
363*/
364define bind_sock_reply {
365 u32 context;
366 u64 handle;
367 i32 retval;
Florin Corasdcf55ce2017-11-16 15:32:50 -0800368 u8 lcl_is_ip4;
369 u8 lcl_ip[16];
370 u16 lcl_port;
Florin Coras7fb0fe12018-04-09 09:24:52 -0700371 u64 rx_fifo;
372 u64 tx_fifo;
373 u64 vpp_evt_q;
Dave Barach68b0fb02017-02-28 15:15:56 -0500374 u32 segment_size;
375 u8 segment_name_length;
376 u8 segment_name[128];
377};
378
Dave Wallace33e002b2017-09-06 01:20:02 -0400379/* Dummy connect message -- needed to satisfy api generators
380*
381* NEVER USED, doxygen tags elided on purpose.
382*/
383define connect_session {
384 u32 client_index;
385 u32 context;
386};
387
388/** \brief vpp/server->client, connect reply -- used for all connect_* messages
Florin Corasc0d532d2018-10-12 08:36:20 -0700389 *** Will be DEPRECATED. Use message queue instead. ***
Dave Barach68b0fb02017-02-28 15:15:56 -0500390 @param context - sender context, to match reply w/ request
391 @param retval - return code for the request
392 @param handle - connection handle
393 @param server_rx_fifo - rx (vpp -> vpp-client) fifo address
394 @param server_tx_fifo - tx (vpp-client -> vpp) fifo address
395 @param vpp_event_queue_address - vpp's event queue address
Florin Corasf8f516a2018-02-08 15:10:09 -0800396 @param client_event_queue_address - client's event queue address
Florin Coras6cf30ad2017-04-04 23:08:23 -0700397 @param segment_size - size of segment to be attached. Only for redirects.
Dave Barach68b0fb02017-02-28 15:15:56 -0500398 @param segment_name_length - non-zero if the client needs to attach to
399 the fifo segment
400 @param segment_name - set if the client needs to attach to the segment
Florin Corasade70e42017-10-14 18:56:41 -0700401 @param lcl_ip - local ip for connection
402 @param is_ip4 - flag to indicate if ip is v4 or v6
403 @param lcl_port - local port
Dave Barach68b0fb02017-02-28 15:15:56 -0500404*/
Dave Wallace33e002b2017-09-06 01:20:02 -0400405define connect_session_reply {
Dave Barach68b0fb02017-02-28 15:15:56 -0500406 u32 context;
407 i32 retval;
408 u64 handle;
409 u64 server_rx_fifo;
410 u64 server_tx_fifo;
Dave Barach68b0fb02017-02-28 15:15:56 -0500411 u64 vpp_event_queue_address;
Florin Corasf8f516a2018-02-08 15:10:09 -0800412 u64 client_event_queue_address;
Dave Barach68b0fb02017-02-28 15:15:56 -0500413 u32 segment_size;
414 u8 segment_name_length;
415 u8 segment_name[128];
Florin Corasade70e42017-10-14 18:56:41 -0700416 u8 lcl_ip[16];
417 u8 is_ip4;
418 u16 lcl_port;
Dave Barach68b0fb02017-02-28 15:15:56 -0500419};
420
Florin Coras99368312018-08-02 10:45:44 -0700421/** \brief ask app to add a new cut-through registration
422 @param client_index - opaque cookie to identify the sender
423 client to vpp direction only
424 @param context - sender context, to match reply w/ request
425 @param evt_q_address - address of the mq in ssvm segment
426 @param peer_evt_q_address - address of peer's mq in ssvm segment
Florin Coras134a9962018-08-28 11:32:04 -0700427 @param wrk_index - index of worker to receive the registration
Florin Coras99368312018-08-02 10:45:44 -0700428 @param n_fds - number of fds exchanged
429 @param fd_flags - flag indicating the fds that will be exchanged over
430 api socket
431*/
432autoreply define app_cut_through_registration_add
433{
434 u32 client_index;
435 u32 context;
436 u64 evt_q_address;
437 u64 peer_evt_q_address;
Florin Coras134a9962018-08-28 11:32:04 -0700438 u32 wrk_index;
Florin Coras99368312018-08-02 10:45:44 -0700439 u8 n_fds;
440 u8 fd_flags;
441};
442
Florin Coras15531972018-08-12 23:50:53 -0700443/** \brief add/del application worker
444 @param client_index - opaque cookie to identify the sender
445 client to vpp direction only
446 @param context - sender context, to match reply w/ request
Florin Corasc1f5a432018-11-20 11:31:26 -0800447 @param app_index - application index
Florin Coras15531972018-08-12 23:50:53 -0700448 @param wrk_index - worker index, if a delete
449 @param is_add - set if an add
450*/
451define app_worker_add_del
452{
453 u32 client_index;
454 u32 context;
Florin Corasc1f5a432018-11-20 11:31:26 -0800455 u32 app_index;
Florin Coras15531972018-08-12 23:50:53 -0700456 u32 wrk_index;
457 u8 is_add;
458};
459
460/** \brief Reply for app worker add/del
461 @param context - returned sender context, to match reply w/ request
462 @param retval - return code
463 @param wrk_index - worker index, if add
464 @param app_event_queue_address - vpp event queue address of new worker
465 @param n_fds - number of fds exchanged
466 @param fd_flags - set of flags that indicate which fds are to be expected
467 over the socket (set only if socket transport available)
468 @param segment_name_length - length of segment name
469 @param segment_name - name of segment client needs to attach to
Florin Corasfa76a762018-11-29 12:40:10 -0800470 @param segment_handle - handle for segment
Florin Coras15531972018-08-12 23:50:53 -0700471*/
472define app_worker_add_del_reply
473{
474 u32 context;
475 i32 retval;
476 u32 wrk_index;
477 u64 app_event_queue_address;
478 u8 n_fds;
479 u8 fd_flags;
480 u8 segment_name_length;
481 u8 segment_name[128];
Florin Corasfa76a762018-11-29 12:40:10 -0800482 u64 segment_handle;
Florin Coras15531972018-08-12 23:50:53 -0700483 u8 is_add;
484};
485
Florin Corase04c2992017-03-01 08:17:34 -0800486/** \brief enable/disable session layer
487 @param client_index - opaque cookie to identify the sender
488 client to vpp direction only
489 @param context - sender context, to match reply w/ request
490 @param is_enable - disable session layer if 0, enable otherwise
491*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400492autoreply define session_enable_disable {
Florin Corase04c2992017-03-01 08:17:34 -0800493 u32 client_index;
494 u32 context;
495 u8 is_enable;
496};
497
Florin Corascea194d2017-10-02 00:18:51 -0700498/** \brief add/del application namespace
499 @param client_index - opaque cookie to identify the sender
500 client to vpp direction only
501 @param context - sender context, to match reply w/ request
502 @param secret - secret shared between app and vpp
503 @param sw_if_index - local interface that "supports" namespace. Set to
504 ~0 if no preference
505 @param ip4_fib_id - id of ip4 fib that "supports" the namespace. Ignored
506 if sw_if_index set.
507 @param ip6_fib_id - id of ip6 fib that "supports" the namespace. Ignored
508 if sw_if_index set.
509 @param namespace_id_len - length of namespace id lower
510 @param namespace_id - namespace id
511*/
Florin Coras6e8c6672017-11-10 09:03:54 -0800512define app_namespace_add_del {
Florin Corascea194d2017-10-02 00:18:51 -0700513 u32 client_index;
514 u32 context;
515 u64 secret;
516 u32 sw_if_index;
517 u32 ip4_fib_id;
518 u32 ip6_fib_id;
519 u8 namespace_id_len;
520 u8 namespace_id[64];
521};
522
Florin Coras6e8c6672017-11-10 09:03:54 -0800523/** \brief Reply for app namespace add/del
524 @param context - returned sender context, to match reply w/ request
525 @param retval - return code
526 @param appns_index - app namespace index
527*/
528define app_namespace_add_del_reply
529{
530 u32 context;
531 i32 retval;
532 u32 appns_index;
533};
534
Florin Coras1c710452017-10-17 00:03:13 -0700535/** \brief add/del session rule
536 @param client_index - opaque cookie to identify the sender
537 client to vpp direction only
538 @param context - sender context, to match reply w/ request
539 @param transport_proto - transport protocol (0 - tcp 1 - udp)
540 @param is_ip4 - flag to indicate if ip addresses are ip4 or 6
541 @param lcl_ip - local ip
542 @param lcl_plen - local prefix length
543 @param rmt_ip - remote ip
544 @param rmt_ple - remote prefix length
545 @param lcl_port - local port
546 @param rmt_port - remote port
547 @param action_index - the only action defined now is forward to
548 application with index action_index
549 @param is_add - flag to indicate if add or del
550 @param appns_index - application namespace where rule is to be applied
551 to
552 @param scope - flag that indicates scope of the rule: global or local.
553 If 0, default is global, 1 is global 2 is local, 3 is
554 both
555*/
556autoreply define session_rule_add_del {
557 u32 client_index;
558 u32 context;
559 u8 transport_proto;
560 u8 is_ip4;
561 u8 lcl_ip[16];
562 u8 lcl_plen;
563 u8 rmt_ip[16];
564 u8 rmt_plen;
565 u16 lcl_port;
566 u16 rmt_port;
567 u32 action_index;
568 u8 is_add;
569 u32 appns_index;
570 u8 scope;
Florin Corasc97a7392017-11-05 23:07:07 -0800571 u8 tag[64];
Florin Coras1c710452017-10-17 00:03:13 -0700572};
573
Florin Coras6c36f532017-11-03 18:32:34 -0700574/** \brief Dump session rules
575 @param client_index - opaque cookie to identify the sender
576 @param context - sender context, to match reply w/ request
577 */
578define session_rules_dump
579{
580 u32 client_index;
581 u32 context;
582};
583
584/** \brief Session rules details
585 @param context - sender context, to match reply w/ request
586 @param transport_proto - transport protocol (0 - tcp 1 - udp)
587 @param is_ip4 - flag to indicate if ip addresses are ip4 or 6
588 @param lcl_ip - local ip
589 @param lcl_plen - local prefix length
590 @param rmt_ip - remote ip
591 @param rmt_ple - remote prefix length
592 @param lcl_port - local port
593 @param rmt_port - remote port
594 @param action_index - the only action defined now is forward to
595 application with index action_index
596 @param appns_index - application namespace where rule is to be applied
597 to
598 @param scope - flag that indicates scope of the rule: global or local.
599 If 0, default is global, 1 is global 2 is local, 3 is
600 both
601 */
602define session_rules_details
603{
604 u32 context;
605 u8 transport_proto;
606 u8 is_ip4;
607 u8 lcl_ip[16];
608 u8 lcl_plen;
609 u8 rmt_ip[16];
610 u8 rmt_plen;
611 u16 lcl_port;
612 u16 rmt_port;
613 u32 action_index;
614 u32 appns_index;
615 u8 scope;
Florin Corasc97a7392017-11-05 23:07:07 -0800616 u8 tag[64];
Florin Coras6c36f532017-11-03 18:32:34 -0700617};
618
Dave Barach68b0fb02017-02-28 15:15:56 -0500619/*
620 * Local Variables:
621 * eval: (c-set-style "gnu")
622 * End:
Dave Barach11b8dbf2017-04-24 10:46:54 -0400623 */