blob: 4f9ae12eeb3f91f74728ecf21593256690664014 [file] [log] [blame]
Dave Barach68b0fb02017-02-28 15:15:56 -05001/*
Florin Coras64424012019-03-02 10:47:47 -08002 * Copyright (c) 2015-2019 Cisco and/or its affiliates.
Dave Barach68b0fb02017-02-28 15:15:56 -05003 * 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 Coras458089b2019-08-21 16:20:44 -070016option version = "1.7.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
Florin Coras458089b2019-08-21 16:20:44 -070019 ### WILL BE DEPRECATED POST 20.01 ###
Florin Coras6cf30ad2017-04-04 23:08:23 -070020 @param client_index - opaque cookie to identify the sender
21 @param context - sender context, to match reply w/ request
Florin Coras458089b2019-08-21 16:20:44 -070022 @param initial_segment_size - size of the initial shm segment to be
Florin Coras6cf30ad2017-04-04 23:08:23 -070023 allocated
24 @param options - segment size, fifo sizes, etc.
Florin Corascea194d2017-10-02 00:18:51 -070025 @param namespace_id_len - length of the namespace id c-string
26 @param namespace_id - 0 terminted c-string
Florin Coras6cf30ad2017-04-04 23:08:23 -070027*/
28 define application_attach {
29 u32 client_index;
30 u32 context;
31 u32 initial_segment_size;
32 u64 options[16];
Florin Corascea194d2017-10-02 00:18:51 -070033 u8 namespace_id_len;
34 u8 namespace_id [64];
Florin Coras6cf30ad2017-04-04 23:08:23 -070035 };
Florin Coras458089b2019-08-21 16:20:44 -070036
Florin Coras6cf30ad2017-04-04 23:08:23 -070037 /** \brief Application attach reply
Florin Coras458089b2019-08-21 16:20:44 -070038 ### WILL BE DEPRECATED POST 20.01 ###
Florin Coras6cf30ad2017-04-04 23:08:23 -070039 @param context - sender context, to match reply w/ request
40 @param retval - return code for the request
Florin Coras458089b2019-08-21 16:20:44 -070041 @param app_event_queue_address - vpp event queue address or 0 if this
Florin Coras6cf30ad2017-04-04 23:08:23 -070042 connection shouldn't send events
Florin Coras99368312018-08-02 10:45:44 -070043 @param n_fds - number of fds exchanged
44 @param fd_flags - set of flags that indicate which fds are to be expected
Florin Coras458089b2019-08-21 16:20:44 -070045 over the socket (set only if socket transport available)
Florin Coras6cf30ad2017-04-04 23:08:23 -070046 @param segment_size - size of first shm segment
Florin Coras458089b2019-08-21 16:20:44 -070047 @param segment_name_length - length of segment name
Florin Coras6cf30ad2017-04-04 23:08:23 -070048 @param segment_name - name of segment client needs to attach to
Florin Corasc1f5a432018-11-20 11:31:26 -080049 @param app_index - index of the newly created app
Florin Corasd85de682018-11-29 17:02:29 -080050 @param segment_handle - handle for segment
Florin Coras6cf30ad2017-04-04 23:08:23 -070051*/
52define application_attach_reply {
53 u32 context;
54 i32 retval;
55 u64 app_event_queue_address;
Florin Coras99368312018-08-02 10:45:44 -070056 u8 n_fds;
57 u8 fd_flags;
Florin Coras6cf30ad2017-04-04 23:08:23 -070058 u32 segment_size;
59 u8 segment_name_length;
60 u8 segment_name[128];
Florin Corasc1f5a432018-11-20 11:31:26 -080061 u32 app_index;
Florin Corasd85de682018-11-29 17:02:29 -080062 u64 segment_handle;
Florin Coras6cf30ad2017-04-04 23:08:23 -070063};
64
Florin Coras458089b2019-08-21 16:20:44 -070065/** \brief Application attach to session layer
66 @param client_index - opaque cookie to identify the sender
67 @param context - sender context, to match reply w/ request
68 @param options - segment size, fifo sizes, etc.
69 @param namespace_id_len - length of the namespace id c-string
70 @param namespace_id - 0 terminted c-string
71*/
72 define app_attach {
73 u32 client_index;
74 u32 context;
75 u64 options[16];
76 u8 namespace_id_len;
77 u8 namespace_id[64];
78 };
79
80 /** \brief Application attach reply
81 @param context - sender context, to match reply w/ request
82 @param retval - return code for the request
83 @param app_mq - app message queue
84 @param vpp_ctrl_mq - vpp message queue for control events that should
85 be handled in main thread, i.e., bind/connect
86 @param vpp_ctrl_mq_thread_index - thread index of the ctrl mq
87 @param app_index - index of the newly created app
88 @param n_fds - number of fds exchanged
89 @param fd_flags - set of flags that indicate which fds are to be expected
90 over the socket (set only if socket transport available)
91 @param segment_size - size of first shm segment
92 @param segment_name_length - length of segment name
93 @param segment_name - name of segment client needs to attach to
94 @param segment_handle - handle for segment
95*/
96define app_attach_reply {
97 u32 context;
98 i32 retval;
99 u64 app_mq;
100 u64 vpp_ctrl_mq;
101 u8 vpp_ctrl_mq_thread;
102 u32 app_index;
103 u8 n_fds;
104 u8 fd_flags;
105 u32 segment_size;
106 u8 segment_name_length;
107 u8 segment_name[128];
108 u64 segment_handle;
109};
110
Nathan Skrzypczak79f89532019-09-13 11:08:13 +0200111/** \brief Add certificate and key
112 @param client_index - opaque cookie to identify the sender
113 @param context - sender context, to match reply w/ request
114 @param engine - crypto engine
115 @param cert_len - cert length (comes first)
116 @param certkey_len - cert and key length
117 @param certkey - cert & key data (due to API limitation)
118*/
119define app_add_cert_key_pair {
120 u32 client_index;
121 u32 context;
122 u16 cert_len;
123 u16 certkey_len;
124 u8 certkey[certkey_len];
125};
126
127/** \brief Add certificate and key
128 @param context - sender context, to match reply w/ request
129 @param retval - return code for the request
130 @param index - index in certificate store
131*/
132define app_add_cert_key_pair_reply {
133 u32 context;
134 i32 retval;
135 u32 index;
136};
137
138/** \brief Delete certificate and key
139 @param client_index - opaque cookie to identify the sender
140 @param context - sender context, to match reply w/ request
141 @param index - index in certificate store
142*/
143autoreply define app_del_cert_key_pair {
144 u32 client_index;
145 u32 context;
146 u32 index;
147};
148
Florin Coras371ca502018-02-21 12:07:41 -0800149/** \brief Application add TLS certificate
Nathan Skrzypczak79f89532019-09-13 11:08:13 +0200150 ### WILL BE DEPRECATED POST 20.01 ###
Florin Coras371ca502018-02-21 12:07:41 -0800151 @param client_index - opaque cookie to identify the sender
152 @param context - sender context, to match reply w/ request
153 @param cert_len - certificate length
154 @param cert - certificate as a string
155*/
156autoreply define application_tls_cert_add {
157 u32 client_index;
158 u32 context;
159 u32 app_index;
160 u16 cert_len;
161 u8 cert[cert_len];
162};
163
164/** \brief Application add TLS key
Nathan Skrzypczak79f89532019-09-13 11:08:13 +0200165 ### WILL BE DEPRECATED POST 20.01 ###
Florin Coras371ca502018-02-21 12:07:41 -0800166 @param client_index - opaque cookie to identify the sender
167 @param context - sender context, to match reply w/ request
168 @param key_len - certificate length
169 @param key - PEM encoded key as a string
170*/
171autoreply define application_tls_key_add {
172 u32 client_index;
173 u32 context;
174 u32 app_index;
175 u16 key_len;
176 u8 key[key_len];
177};
178
Florin Coras6cf30ad2017-04-04 23:08:23 -0700179 /** \brief client->vpp, attach application to session layer
Florin Coras458089b2019-08-21 16:20:44 -0700180 ### WILL BE DEPRECATED POST 20.01 ###
Florin Coras6cf30ad2017-04-04 23:08:23 -0700181 @param client_index - opaque cookie to identify the sender
182 @param context - sender context, to match reply w/ request
183*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400184autoreply define application_detach {
Florin Coras6cf30ad2017-04-04 23:08:23 -0700185 u32 client_index;
186 u32 context;
187 };
Florin Coras458089b2019-08-21 16:20:44 -0700188
Florin Coras6cf30ad2017-04-04 23:08:23 -0700189/** \brief vpp->client, please map an additional shared memory segment
Florin Corasc4c4cf52019-08-24 18:17:34 -0700190 ### WILL BE DEPRECATED POST 20.01 ###
Florin Coras6cf30ad2017-04-04 23:08:23 -0700191 @param client_index - opaque cookie to identify the sender
192 @param context - sender context, to match reply w/ request
Florin Coras458089b2019-08-21 16:20:44 -0700193 @param fd_flags - set of flags that indicate which, if any, fds are
194 to be expected over the socket. This is set only if
Florin Coras99368312018-08-02 10:45:44 -0700195 socket transport available
196 @param segment_size - size of the segment to be mapped
197 @param segment_name - name of the segment to be mapped
Florin Corasfa76a762018-11-29 12:40:10 -0800198 @param segment_handle - unique identifier for segment
Florin Coras6cf30ad2017-04-04 23:08:23 -0700199*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400200autoreply define map_another_segment {
Florin Coras6cf30ad2017-04-04 23:08:23 -0700201 u32 client_index;
202 u32 context;
Florin Coras99368312018-08-02 10:45:44 -0700203 u8 fd_flags;
Florin Coras6cf30ad2017-04-04 23:08:23 -0700204 u32 segment_size;
205 u8 segment_name[128];
Florin Corasfa76a762018-11-29 12:40:10 -0800206 u64 segment_handle;
Florin Coras6cf30ad2017-04-04 23:08:23 -0700207};
208
Florin Corasf8f516a2018-02-08 15:10:09 -0800209/** \brief vpp->client unmap shared memory segment
Florin Corasc4c4cf52019-08-24 18:17:34 -0700210 ### WILL BE DEPRECATED POST 20.01 ###
Florin Corasf8f516a2018-02-08 15:10:09 -0800211 @param client_index - opaque cookie to identify the sender
212 @param context - sender context, to match reply w/ request
Florin Corasfa76a762018-11-29 12:40:10 -0800213 @param segment_name - segment name
Florin Coras458089b2019-08-21 16:20:44 -0700214 @param segment_handle - handle of the segment to be unmapped
Florin Corasf8f516a2018-02-08 15:10:09 -0800215*/
216autoreply define unmap_segment {
217 u32 client_index;
218 u32 context;
Florin Corasfa76a762018-11-29 12:40:10 -0800219 u64 segment_handle;
Florin Corasf8f516a2018-02-08 15:10:09 -0800220};
221
Dave Barach68b0fb02017-02-28 15:15:56 -0500222 /** \brief Bind to a given URI
Florin Coras458089b2019-08-21 16:20:44 -0700223 ### WILL BE DEPRECATED POST 20.01 ###
Dave Barach68b0fb02017-02-28 15:15:56 -0500224 @param client_index - opaque cookie to identify the sender
225 @param context - sender context, to match reply w/ request
226 @param accept_cookie - sender accept cookie, to identify this bind flavor
227 @param uri - a URI, e.g. "tcp://0.0.0.0/0/80" [ipv4]
228 "tcp://::/0/80" [ipv6] etc.
229 @param options - socket options, fifo sizes, etc.
230*/
Florin Coras64424012019-03-02 10:47:47 -0800231autoreply define bind_uri {
Dave Barach68b0fb02017-02-28 15:15:56 -0500232 u32 client_index;
233 u32 context;
234 u32 accept_cookie;
Dave Barach68b0fb02017-02-28 15:15:56 -0500235 u8 uri[128];
Dave Barach68b0fb02017-02-28 15:15:56 -0500236};
Florin Coras7fb0fe12018-04-09 09:24:52 -0700237
Dave Barach68b0fb02017-02-28 15:15:56 -0500238/** \brief Unbind a given URI
Florin Coras458089b2019-08-21 16:20:44 -0700239 ### WILL BE DEPRECATED POST 20.01 ###
Dave Barach68b0fb02017-02-28 15:15:56 -0500240 @param client_index - opaque cookie to identify the sender
241 @param context - sender context, to match reply w/ request
242 @param uri - a URI, e.g. "tcp://0.0.0.0/0/80" [ipv4]
243 "tcp://::/0/80" [ipv6], etc.
244 @param options - socket options, fifo sizes, etc.
245*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400246autoreply define unbind_uri {
Dave Barach68b0fb02017-02-28 15:15:56 -0500247 u32 client_index;
248 u32 context;
249 u8 uri[128];
250};
251
252/** \brief Connect to a given URI
Florin Coras458089b2019-08-21 16:20:44 -0700253 ### WILL BE DEPRECATED POST 20.01 ###
Dave Barach68b0fb02017-02-28 15:15:56 -0500254 @param client_index - opaque cookie to identify the sender
255 @param context - sender context, to match reply w/ request
Florin Coras458089b2019-08-21 16:20:44 -0700256 @param client_queue_address - binary API client queue address. Used by
Florin Coras6cf30ad2017-04-04 23:08:23 -0700257 local server when connect was redirected.
Florin Corascea194d2017-10-02 00:18:51 -0700258 @param options - socket options, fifo sizes, etc. passed by vpp to the
Florin Coras458089b2019-08-21 16:20:44 -0700259 server when redirecting connects
Florin Corascea194d2017-10-02 00:18:51 -0700260 @param uri - a URI, e.g. "tcp4://0.0.0.0/0/80"
261 "tcp6://::/0/80" [ipv6], etc.
Dave Barach68b0fb02017-02-28 15:15:56 -0500262*/
Dave Wallace33e002b2017-09-06 01:20:02 -0400263autoreply define connect_uri {
Dave Barach68b0fb02017-02-28 15:15:56 -0500264 u32 client_index;
265 u32 context;
Dave Barach68b0fb02017-02-28 15:15:56 -0500266 u64 client_queue_address;
267 u64 options[16];
Florin Corascea194d2017-10-02 00:18:51 -0700268 u8 uri[128];
Dave Barach68b0fb02017-02-28 15:15:56 -0500269};
270
Dave Barach68b0fb02017-02-28 15:15:56 -0500271/** \brief bidirectional disconnect API
Florin Coras458089b2019-08-21 16:20:44 -0700272 ### WILL BE DEPRECATED POST 20.01 ###
Dave Barach68b0fb02017-02-28 15:15:56 -0500273 @param client_index - opaque cookie to identify the sender
274 client to vpp direction only
275 @param context - sender context, to match reply w/ request
Florin Coras6cf30ad2017-04-04 23:08:23 -0700276 @param handle - session handle obtained from accept/connect
Dave Barach68b0fb02017-02-28 15:15:56 -0500277*/
278define disconnect_session {
279 u32 client_index;
280 u32 context;
Florin Coras6cf30ad2017-04-04 23:08:23 -0700281 u64 handle;
Dave Barach68b0fb02017-02-28 15:15:56 -0500282};
283
284/** \brief bidirectional disconnect reply API
Florin Coras458089b2019-08-21 16:20:44 -0700285 ### WILL BE DEPRECATED POST 20.01 ###
Dave Barach68b0fb02017-02-28 15:15:56 -0500286 @param client_index - opaque cookie to identify the sender
287 client to vpp direction only
288 @param context - sender context, to match reply w/ request
289 @param retval - return code for the request
Florin Coras6cf30ad2017-04-04 23:08:23 -0700290 @param handle - session handle
Dave Barach68b0fb02017-02-28 15:15:56 -0500291*/
292define disconnect_session_reply {
Dave Barach68b0fb02017-02-28 15:15:56 -0500293 u32 context;
294 i32 retval;
Florin Coras6cf30ad2017-04-04 23:08:23 -0700295 u64 handle;
Dave Barach68b0fb02017-02-28 15:15:56 -0500296};
297
Dave Barach68b0fb02017-02-28 15:15:56 -0500298/** \brief Bind to an ip:port pair for a given transport protocol
Florin Coras458089b2019-08-21 16:20:44 -0700299 ### WILL BE DEPRECATED POST 20.01 ###
Dave Barach68b0fb02017-02-28 15:15:56 -0500300 @param client_index - opaque cookie to identify the sender
301 @param context - sender context, to match reply w/ request
Florin Coras15531972018-08-12 23:50:53 -0700302 @param wrk_index - index of worker requesting the bind
Dave Barach68b0fb02017-02-28 15:15:56 -0500303 @param vrf - bind namespace
304 @param is_ip4 - flag that is 1 if ip address family is IPv4
305 @param ip - ip address
Florin Coras458089b2019-08-21 16:20:44 -0700306 @param port - port
Dave Barach68b0fb02017-02-28 15:15:56 -0500307 @param proto - protocol 0 - TCP 1 - UDP
308 @param options - socket options, fifo sizes, etc.
309*/
Florin Coras64424012019-03-02 10:47:47 -0800310autoreply define bind_sock {
Dave Barach68b0fb02017-02-28 15:15:56 -0500311 u32 client_index;
312 u32 context;
Florin Coras15531972018-08-12 23:50:53 -0700313 u32 wrk_index;
Dave Barach68b0fb02017-02-28 15:15:56 -0500314 u32 vrf;
315 u8 is_ip4;
316 u8 ip[16];
317 u16 port;
318 u8 proto;
319 u64 options[16];
320};
321
Florin Coras458089b2019-08-21 16:20:44 -0700322/** \brief Unbind
323 ### WILL BE DEPRECATED POST 20.01 ###s
Dave Barach68b0fb02017-02-28 15:15:56 -0500324 @param client_index - opaque cookie to identify the sender
325 @param context - sender context, to match reply w/ request
Florin Corasab2f6db2018-08-31 14:31:41 -0700326 @param wrk_index - index of worker requesting the bind
Dave Barach68b0fb02017-02-28 15:15:56 -0500327 @param handle - bind handle obtained from bind reply
328*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400329autoreply define unbind_sock {
Dave Barach68b0fb02017-02-28 15:15:56 -0500330 u32 client_index;
331 u32 context;
Florin Corasab2f6db2018-08-31 14:31:41 -0700332 u32 wrk_index;
Dave Barach68b0fb02017-02-28 15:15:56 -0500333 u64 handle;
334};
335
336/** \brief Connect to a remote peer
Florin Coras458089b2019-08-21 16:20:44 -0700337 ### WILL BE DEPRECATED POST 20.01 ###
Dave Barach68b0fb02017-02-28 15:15:56 -0500338 @param client_index - opaque cookie to identify the sender
339 @param context - sender context, to match reply w/ request
Florin Coras15531972018-08-12 23:50:53 -0700340 @param wrk_index - worker that requests the connect
Florin Coras458089b2019-08-21 16:20:44 -0700341 @param client_queue_address - client's API queue address. Non-zero when
Florin Corascea194d2017-10-02 00:18:51 -0700342 used to perform redirects
343 @param options - socket options, fifo sizes, etc. when doing redirects
Dave Barach68b0fb02017-02-28 15:15:56 -0500344 @param vrf - connection namespace
345 @param is_ip4 - flag that is 1 if ip address family is IPv4
346 @param ip - ip address
Florin Coras458089b2019-08-21 16:20:44 -0700347 @param port - port
Dave Barach68b0fb02017-02-28 15:15:56 -0500348 @param proto - protocol 0 - TCP 1 - UDP
Florin Coras8f89dd02018-03-05 16:53:07 -0800349 @param hostname-len - length of hostname
350 @param hostname - destination's hostname. If present, used by protocols
351 like tls.
Nathan Skrzypczak8ac1d6d2019-07-17 11:02:20 +0200352 @param parent_handle - handle of parent session (e.g. for opening quic streams).
Dave Barach68b0fb02017-02-28 15:15:56 -0500353*/
Dave Wallace33e002b2017-09-06 01:20:02 -0400354autoreply define connect_sock {
Dave Barach68b0fb02017-02-28 15:15:56 -0500355 u32 client_index;
356 u32 context;
Florin Coras15531972018-08-12 23:50:53 -0700357 u32 wrk_index;
Florin Corascea194d2017-10-02 00:18:51 -0700358 u64 client_queue_address;
359 u64 options[16];
Dave Barach68b0fb02017-02-28 15:15:56 -0500360 u32 vrf;
361 u8 is_ip4;
362 u8 ip[16];
363 u16 port;
364 u8 proto;
Ole Troane5ff5a32019-08-23 22:55:18 +0200365 u64 parent_handle;
Florin Coras8f89dd02018-03-05 16:53:07 -0800366 u8 hostname_len;
367 u8 hostname[hostname_len];
Dave Barach68b0fb02017-02-28 15:15:56 -0500368};
369
Florin Coras99368312018-08-02 10:45:44 -0700370/** \brief ask app to add a new cut-through registration
Florin Coras458089b2019-08-21 16:20:44 -0700371 ### WILL BE DEPRECATED POST 20.01 ###
Florin Coras99368312018-08-02 10:45:44 -0700372 @param client_index - opaque cookie to identify the sender
373 client to vpp direction only
374 @param context - sender context, to match reply w/ request
375 @param evt_q_address - address of the mq in ssvm segment
376 @param peer_evt_q_address - address of peer's mq in ssvm segment
Florin Coras134a9962018-08-28 11:32:04 -0700377 @param wrk_index - index of worker to receive the registration
Florin Coras99368312018-08-02 10:45:44 -0700378 @param n_fds - number of fds exchanged
379 @param fd_flags - flag indicating the fds that will be exchanged over
380 api socket
381*/
382autoreply define app_cut_through_registration_add
383{
384 u32 client_index;
385 u32 context;
386 u64 evt_q_address;
387 u64 peer_evt_q_address;
Florin Coras134a9962018-08-28 11:32:04 -0700388 u32 wrk_index;
Florin Coras99368312018-08-02 10:45:44 -0700389 u8 n_fds;
390 u8 fd_flags;
391};
392
Florin Coras15531972018-08-12 23:50:53 -0700393/** \brief add/del application worker
394 @param client_index - opaque cookie to identify the sender
395 client to vpp direction only
396 @param context - sender context, to match reply w/ request
Florin Corasc1f5a432018-11-20 11:31:26 -0800397 @param app_index - application index
Florin Coras15531972018-08-12 23:50:53 -0700398 @param wrk_index - worker index, if a delete
399 @param is_add - set if an add
400*/
401define app_worker_add_del
402{
403 u32 client_index;
404 u32 context;
Florin Corasc1f5a432018-11-20 11:31:26 -0800405 u32 app_index;
Florin Coras15531972018-08-12 23:50:53 -0700406 u32 wrk_index;
407 u8 is_add;
408};
409
410/** \brief Reply for app worker add/del
411 @param context - returned sender context, to match reply w/ request
412 @param retval - return code
413 @param wrk_index - worker index, if add
414 @param app_event_queue_address - vpp event queue address of new worker
415 @param n_fds - number of fds exchanged
416 @param fd_flags - set of flags that indicate which fds are to be expected
Florin Coras458089b2019-08-21 16:20:44 -0700417 over the socket (set only if socket transport available)
418 @param segment_name_length - length of segment name
Florin Coras15531972018-08-12 23:50:53 -0700419 @param segment_name - name of segment client needs to attach to
Florin Corasfa76a762018-11-29 12:40:10 -0800420 @param segment_handle - handle for segment
Florin Coras15531972018-08-12 23:50:53 -0700421*/
422define app_worker_add_del_reply
423{
424 u32 context;
425 i32 retval;
426 u32 wrk_index;
427 u64 app_event_queue_address;
428 u8 n_fds;
429 u8 fd_flags;
430 u8 segment_name_length;
431 u8 segment_name[128];
Florin Corasfa76a762018-11-29 12:40:10 -0800432 u64 segment_handle;
Florin Coras15531972018-08-12 23:50:53 -0700433 u8 is_add;
434};
435
Florin Corase04c2992017-03-01 08:17:34 -0800436/** \brief enable/disable session layer
437 @param client_index - opaque cookie to identify the sender
438 client to vpp direction only
439 @param context - sender context, to match reply w/ request
440 @param is_enable - disable session layer if 0, enable otherwise
441*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400442autoreply define session_enable_disable {
Florin Corase04c2992017-03-01 08:17:34 -0800443 u32 client_index;
444 u32 context;
445 u8 is_enable;
446};
447
Florin Corascea194d2017-10-02 00:18:51 -0700448/** \brief add/del application namespace
449 @param client_index - opaque cookie to identify the sender
450 client to vpp direction only
451 @param context - sender context, to match reply w/ request
Florin Coras64424012019-03-02 10:47:47 -0800452 @param secret - secret shared between app and vpp
Florin Corascea194d2017-10-02 00:18:51 -0700453 @param sw_if_index - local interface that "supports" namespace. Set to
Florin Coras64424012019-03-02 10:47:47 -0800454 ~0 if no preference
455 @param ip4_fib_id - id of ip4 fib that "supports" the namespace. Ignored
456 if sw_if_index set.
457 @param ip6_fib_id - id of ip6 fib that "supports" the namespace. Ignored
458 if sw_if_index set.
Florin Corascea194d2017-10-02 00:18:51 -0700459 @param namespace_id_len - length of namespace id lower
460 @param namespace_id - namespace id
461*/
Florin Coras6e8c6672017-11-10 09:03:54 -0800462define app_namespace_add_del {
Florin Corascea194d2017-10-02 00:18:51 -0700463 u32 client_index;
464 u32 context;
465 u64 secret;
466 u32 sw_if_index;
467 u32 ip4_fib_id;
468 u32 ip6_fib_id;
469 u8 namespace_id_len;
470 u8 namespace_id[64];
471};
472
Florin Coras6e8c6672017-11-10 09:03:54 -0800473/** \brief Reply for app namespace add/del
474 @param context - returned sender context, to match reply w/ request
475 @param retval - return code
476 @param appns_index - app namespace index
477*/
478define app_namespace_add_del_reply
479{
480 u32 context;
481 i32 retval;
482 u32 appns_index;
483};
484
Florin Coras1c710452017-10-17 00:03:13 -0700485/** \brief add/del session rule
486 @param client_index - opaque cookie to identify the sender
487 client to vpp direction only
488 @param context - sender context, to match reply w/ request
489 @param transport_proto - transport protocol (0 - tcp 1 - udp)
490 @param is_ip4 - flag to indicate if ip addresses are ip4 or 6
491 @param lcl_ip - local ip
492 @param lcl_plen - local prefix length
493 @param rmt_ip - remote ip
494 @param rmt_ple - remote prefix length
495 @param lcl_port - local port
496 @param rmt_port - remote port
Florin Coras64424012019-03-02 10:47:47 -0800497 @param action_index - the only action defined now is forward to
498 application with index action_index
499 @param is_add - flag to indicate if add or del
500 @param appns_index - application namespace where rule is to be applied to
501 @param scope - flag that indicates scope of the rule: global or local.
502 If 0, default is global, 1 is global 2 is local, 3 is both
Florin Coras1c710452017-10-17 00:03:13 -0700503*/
504autoreply define session_rule_add_del {
505 u32 client_index;
506 u32 context;
507 u8 transport_proto;
508 u8 is_ip4;
509 u8 lcl_ip[16];
510 u8 lcl_plen;
511 u8 rmt_ip[16];
512 u8 rmt_plen;
513 u16 lcl_port;
514 u16 rmt_port;
515 u32 action_index;
516 u8 is_add;
517 u32 appns_index;
518 u8 scope;
Florin Corasc97a7392017-11-05 23:07:07 -0800519 u8 tag[64];
Florin Coras1c710452017-10-17 00:03:13 -0700520};
521
Florin Coras6c36f532017-11-03 18:32:34 -0700522/** \brief Dump session rules
523 @param client_index - opaque cookie to identify the sender
524 @param context - sender context, to match reply w/ request
525 */
526define session_rules_dump
527{
528 u32 client_index;
529 u32 context;
530};
531
532/** \brief Session rules details
Florin Coras64424012019-03-02 10:47:47 -0800533 @param context - sender context, to match reply w/ request
Florin Coras6c36f532017-11-03 18:32:34 -0700534 @param transport_proto - transport protocol (0 - tcp 1 - udp)
535 @param is_ip4 - flag to indicate if ip addresses are ip4 or 6
536 @param lcl_ip - local ip
537 @param lcl_plen - local prefix length
538 @param rmt_ip - remote ip
539 @param rmt_ple - remote prefix length
540 @param lcl_port - local port
541 @param rmt_port - remote port
542 @param action_index - the only action defined now is forward to
Florin Coras64424012019-03-02 10:47:47 -0800543 application with index action_index
544 @param appns_index - application namespace where rule is to be applied to
545 @param scope - flag that indicates scope of the rule: global or local.
546 If 0, default is global, 1 is global 2 is local, 3 is both
Florin Coras6c36f532017-11-03 18:32:34 -0700547 */
548define session_rules_details
549{
550 u32 context;
551 u8 transport_proto;
552 u8 is_ip4;
553 u8 lcl_ip[16];
554 u8 lcl_plen;
555 u8 rmt_ip[16];
556 u8 rmt_plen;
557 u16 lcl_port;
558 u16 rmt_port;
559 u32 action_index;
560 u32 appns_index;
561 u8 scope;
Florin Corasc97a7392017-11-05 23:07:07 -0800562 u8 tag[64];
Florin Coras6c36f532017-11-03 18:32:34 -0700563};
564
Dave Barach68b0fb02017-02-28 15:15:56 -0500565/*
566 * Local Variables:
567 * eval: (c-set-style "gnu")
568 * End:
Dave Barach11b8dbf2017-04-24 10:46:54 -0400569 */