blob: 6f208ff5b0ea97d04476a0227e43b4c67afdc76c [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
Florin Coras371ca502018-02-21 12:07:41 -0800111/** \brief Application add TLS certificate
112 @param client_index - opaque cookie to identify the sender
113 @param context - sender context, to match reply w/ request
114 @param cert_len - certificate length
115 @param cert - certificate as a string
116*/
117autoreply define application_tls_cert_add {
118 u32 client_index;
119 u32 context;
120 u32 app_index;
121 u16 cert_len;
122 u8 cert[cert_len];
123};
124
125/** \brief Application add TLS key
126 @param client_index - opaque cookie to identify the sender
127 @param context - sender context, to match reply w/ request
128 @param key_len - certificate length
129 @param key - PEM encoded key as a string
130*/
131autoreply define application_tls_key_add {
132 u32 client_index;
133 u32 context;
134 u32 app_index;
135 u16 key_len;
136 u8 key[key_len];
137};
138
Florin Coras6cf30ad2017-04-04 23:08:23 -0700139 /** \brief client->vpp, attach application to session layer
Florin Coras458089b2019-08-21 16:20:44 -0700140 ### WILL BE DEPRECATED POST 20.01 ###
Florin Coras6cf30ad2017-04-04 23:08:23 -0700141 @param client_index - opaque cookie to identify the sender
142 @param context - sender context, to match reply w/ request
143*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400144autoreply define application_detach {
Florin Coras6cf30ad2017-04-04 23:08:23 -0700145 u32 client_index;
146 u32 context;
147 };
Florin Coras458089b2019-08-21 16:20:44 -0700148
Florin Coras6cf30ad2017-04-04 23:08:23 -0700149/** \brief vpp->client, please map an additional shared memory segment
150 @param client_index - opaque cookie to identify the sender
151 @param context - sender context, to match reply w/ request
Florin Coras458089b2019-08-21 16:20:44 -0700152 @param fd_flags - set of flags that indicate which, if any, fds are
153 to be expected over the socket. This is set only if
Florin Coras99368312018-08-02 10:45:44 -0700154 socket transport available
155 @param segment_size - size of the segment to be mapped
156 @param segment_name - name of the segment to be mapped
Florin Corasfa76a762018-11-29 12:40:10 -0800157 @param segment_handle - unique identifier for segment
Florin Coras6cf30ad2017-04-04 23:08:23 -0700158*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400159autoreply define map_another_segment {
Florin Coras6cf30ad2017-04-04 23:08:23 -0700160 u32 client_index;
161 u32 context;
Florin Coras99368312018-08-02 10:45:44 -0700162 u8 fd_flags;
Florin Coras6cf30ad2017-04-04 23:08:23 -0700163 u32 segment_size;
164 u8 segment_name[128];
Florin Corasfa76a762018-11-29 12:40:10 -0800165 u64 segment_handle;
Florin Coras6cf30ad2017-04-04 23:08:23 -0700166};
167
Florin Corasf8f516a2018-02-08 15:10:09 -0800168/** \brief vpp->client unmap shared memory segment
169 @param client_index - opaque cookie to identify the sender
170 @param context - sender context, to match reply w/ request
Florin Corasfa76a762018-11-29 12:40:10 -0800171 @param segment_name - segment name
Florin Coras458089b2019-08-21 16:20:44 -0700172 @param segment_handle - handle of the segment to be unmapped
Florin Corasf8f516a2018-02-08 15:10:09 -0800173*/
174autoreply define unmap_segment {
175 u32 client_index;
176 u32 context;
Florin Corasfa76a762018-11-29 12:40:10 -0800177 u64 segment_handle;
Florin Corasf8f516a2018-02-08 15:10:09 -0800178};
179
Dave Barach68b0fb02017-02-28 15:15:56 -0500180 /** \brief Bind to a given URI
Florin Coras458089b2019-08-21 16:20:44 -0700181 ### WILL BE DEPRECATED POST 20.01 ###
Dave Barach68b0fb02017-02-28 15:15:56 -0500182 @param client_index - opaque cookie to identify the sender
183 @param context - sender context, to match reply w/ request
184 @param accept_cookie - sender accept cookie, to identify this bind flavor
185 @param uri - a URI, e.g. "tcp://0.0.0.0/0/80" [ipv4]
186 "tcp://::/0/80" [ipv6] etc.
187 @param options - socket options, fifo sizes, etc.
188*/
Florin Coras64424012019-03-02 10:47:47 -0800189autoreply define bind_uri {
Dave Barach68b0fb02017-02-28 15:15:56 -0500190 u32 client_index;
191 u32 context;
192 u32 accept_cookie;
Dave Barach68b0fb02017-02-28 15:15:56 -0500193 u8 uri[128];
Dave Barach68b0fb02017-02-28 15:15:56 -0500194};
Florin Coras7fb0fe12018-04-09 09:24:52 -0700195
Dave Barach68b0fb02017-02-28 15:15:56 -0500196/** \brief Unbind a given URI
Florin Coras458089b2019-08-21 16:20:44 -0700197 ### WILL BE DEPRECATED POST 20.01 ###
Dave Barach68b0fb02017-02-28 15:15:56 -0500198 @param client_index - opaque cookie to identify the sender
199 @param context - sender context, to match reply w/ request
200 @param uri - a URI, e.g. "tcp://0.0.0.0/0/80" [ipv4]
201 "tcp://::/0/80" [ipv6], etc.
202 @param options - socket options, fifo sizes, etc.
203*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400204autoreply define unbind_uri {
Dave Barach68b0fb02017-02-28 15:15:56 -0500205 u32 client_index;
206 u32 context;
207 u8 uri[128];
208};
209
210/** \brief Connect to a given URI
Florin Coras458089b2019-08-21 16:20:44 -0700211 ### WILL BE DEPRECATED POST 20.01 ###
Dave Barach68b0fb02017-02-28 15:15:56 -0500212 @param client_index - opaque cookie to identify the sender
213 @param context - sender context, to match reply w/ request
Florin Coras458089b2019-08-21 16:20:44 -0700214 @param client_queue_address - binary API client queue address. Used by
Florin Coras6cf30ad2017-04-04 23:08:23 -0700215 local server when connect was redirected.
Florin Corascea194d2017-10-02 00:18:51 -0700216 @param options - socket options, fifo sizes, etc. passed by vpp to the
Florin Coras458089b2019-08-21 16:20:44 -0700217 server when redirecting connects
Florin Corascea194d2017-10-02 00:18:51 -0700218 @param uri - a URI, e.g. "tcp4://0.0.0.0/0/80"
219 "tcp6://::/0/80" [ipv6], etc.
Dave Barach68b0fb02017-02-28 15:15:56 -0500220*/
Dave Wallace33e002b2017-09-06 01:20:02 -0400221autoreply define connect_uri {
Dave Barach68b0fb02017-02-28 15:15:56 -0500222 u32 client_index;
223 u32 context;
Dave Barach68b0fb02017-02-28 15:15:56 -0500224 u64 client_queue_address;
225 u64 options[16];
Florin Corascea194d2017-10-02 00:18:51 -0700226 u8 uri[128];
Dave Barach68b0fb02017-02-28 15:15:56 -0500227};
228
Dave Barach68b0fb02017-02-28 15:15:56 -0500229/** \brief bidirectional disconnect API
Florin Coras458089b2019-08-21 16:20:44 -0700230 ### WILL BE DEPRECATED POST 20.01 ###
Dave Barach68b0fb02017-02-28 15:15:56 -0500231 @param client_index - opaque cookie to identify the sender
232 client to vpp direction only
233 @param context - sender context, to match reply w/ request
Florin Coras6cf30ad2017-04-04 23:08:23 -0700234 @param handle - session handle obtained from accept/connect
Dave Barach68b0fb02017-02-28 15:15:56 -0500235*/
236define disconnect_session {
237 u32 client_index;
238 u32 context;
Florin Coras6cf30ad2017-04-04 23:08:23 -0700239 u64 handle;
Dave Barach68b0fb02017-02-28 15:15:56 -0500240};
241
242/** \brief bidirectional disconnect reply API
Florin Coras458089b2019-08-21 16:20:44 -0700243 ### WILL BE DEPRECATED POST 20.01 ###
Dave Barach68b0fb02017-02-28 15:15:56 -0500244 @param client_index - opaque cookie to identify the sender
245 client to vpp direction only
246 @param context - sender context, to match reply w/ request
247 @param retval - return code for the request
Florin Coras6cf30ad2017-04-04 23:08:23 -0700248 @param handle - session handle
Dave Barach68b0fb02017-02-28 15:15:56 -0500249*/
250define disconnect_session_reply {
Dave Barach68b0fb02017-02-28 15:15:56 -0500251 u32 context;
252 i32 retval;
Florin Coras6cf30ad2017-04-04 23:08:23 -0700253 u64 handle;
Dave Barach68b0fb02017-02-28 15:15:56 -0500254};
255
Dave Barach68b0fb02017-02-28 15:15:56 -0500256/** \brief Bind to an ip:port pair for a given transport protocol
Florin Coras458089b2019-08-21 16:20:44 -0700257 ### WILL BE DEPRECATED POST 20.01 ###
Dave Barach68b0fb02017-02-28 15:15:56 -0500258 @param client_index - opaque cookie to identify the sender
259 @param context - sender context, to match reply w/ request
Florin Coras15531972018-08-12 23:50:53 -0700260 @param wrk_index - index of worker requesting the bind
Dave Barach68b0fb02017-02-28 15:15:56 -0500261 @param vrf - bind namespace
262 @param is_ip4 - flag that is 1 if ip address family is IPv4
263 @param ip - ip address
Florin Coras458089b2019-08-21 16:20:44 -0700264 @param port - port
Dave Barach68b0fb02017-02-28 15:15:56 -0500265 @param proto - protocol 0 - TCP 1 - UDP
266 @param options - socket options, fifo sizes, etc.
267*/
Florin Coras64424012019-03-02 10:47:47 -0800268autoreply define bind_sock {
Dave Barach68b0fb02017-02-28 15:15:56 -0500269 u32 client_index;
270 u32 context;
Florin Coras15531972018-08-12 23:50:53 -0700271 u32 wrk_index;
Dave Barach68b0fb02017-02-28 15:15:56 -0500272 u32 vrf;
273 u8 is_ip4;
274 u8 ip[16];
275 u16 port;
276 u8 proto;
277 u64 options[16];
278};
279
Florin Coras458089b2019-08-21 16:20:44 -0700280/** \brief Unbind
281 ### WILL BE DEPRECATED POST 20.01 ###s
Dave Barach68b0fb02017-02-28 15:15:56 -0500282 @param client_index - opaque cookie to identify the sender
283 @param context - sender context, to match reply w/ request
Florin Corasab2f6db2018-08-31 14:31:41 -0700284 @param wrk_index - index of worker requesting the bind
Dave Barach68b0fb02017-02-28 15:15:56 -0500285 @param handle - bind handle obtained from bind reply
286*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400287autoreply define unbind_sock {
Dave Barach68b0fb02017-02-28 15:15:56 -0500288 u32 client_index;
289 u32 context;
Florin Corasab2f6db2018-08-31 14:31:41 -0700290 u32 wrk_index;
Dave Barach68b0fb02017-02-28 15:15:56 -0500291 u64 handle;
292};
293
294/** \brief Connect to a remote peer
Florin Coras458089b2019-08-21 16:20:44 -0700295 ### WILL BE DEPRECATED POST 20.01 ###
Dave Barach68b0fb02017-02-28 15:15:56 -0500296 @param client_index - opaque cookie to identify the sender
297 @param context - sender context, to match reply w/ request
Florin Coras15531972018-08-12 23:50:53 -0700298 @param wrk_index - worker that requests the connect
Florin Coras458089b2019-08-21 16:20:44 -0700299 @param client_queue_address - client's API queue address. Non-zero when
Florin Corascea194d2017-10-02 00:18:51 -0700300 used to perform redirects
301 @param options - socket options, fifo sizes, etc. when doing redirects
Dave Barach68b0fb02017-02-28 15:15:56 -0500302 @param vrf - connection namespace
303 @param is_ip4 - flag that is 1 if ip address family is IPv4
304 @param ip - ip address
Florin Coras458089b2019-08-21 16:20:44 -0700305 @param port - port
Dave Barach68b0fb02017-02-28 15:15:56 -0500306 @param proto - protocol 0 - TCP 1 - UDP
Florin Coras8f89dd02018-03-05 16:53:07 -0800307 @param hostname-len - length of hostname
308 @param hostname - destination's hostname. If present, used by protocols
309 like tls.
Nathan Skrzypczak8ac1d6d2019-07-17 11:02:20 +0200310 @param parent_handle - handle of parent session (e.g. for opening quic streams).
Dave Barach68b0fb02017-02-28 15:15:56 -0500311*/
Dave Wallace33e002b2017-09-06 01:20:02 -0400312autoreply define connect_sock {
Dave Barach68b0fb02017-02-28 15:15:56 -0500313 u32 client_index;
314 u32 context;
Florin Coras15531972018-08-12 23:50:53 -0700315 u32 wrk_index;
Florin Corascea194d2017-10-02 00:18:51 -0700316 u64 client_queue_address;
317 u64 options[16];
Dave Barach68b0fb02017-02-28 15:15:56 -0500318 u32 vrf;
319 u8 is_ip4;
320 u8 ip[16];
321 u16 port;
322 u8 proto;
Ole Troane5ff5a32019-08-23 22:55:18 +0200323 u64 parent_handle;
Florin Coras8f89dd02018-03-05 16:53:07 -0800324 u8 hostname_len;
325 u8 hostname[hostname_len];
Dave Barach68b0fb02017-02-28 15:15:56 -0500326};
327
Florin Coras99368312018-08-02 10:45:44 -0700328/** \brief ask app to add a new cut-through registration
Florin Coras458089b2019-08-21 16:20:44 -0700329 ### WILL BE DEPRECATED POST 20.01 ###
Florin Coras99368312018-08-02 10:45:44 -0700330 @param client_index - opaque cookie to identify the sender
331 client to vpp direction only
332 @param context - sender context, to match reply w/ request
333 @param evt_q_address - address of the mq in ssvm segment
334 @param peer_evt_q_address - address of peer's mq in ssvm segment
Florin Coras134a9962018-08-28 11:32:04 -0700335 @param wrk_index - index of worker to receive the registration
Florin Coras99368312018-08-02 10:45:44 -0700336 @param n_fds - number of fds exchanged
337 @param fd_flags - flag indicating the fds that will be exchanged over
338 api socket
339*/
340autoreply define app_cut_through_registration_add
341{
342 u32 client_index;
343 u32 context;
344 u64 evt_q_address;
345 u64 peer_evt_q_address;
Florin Coras134a9962018-08-28 11:32:04 -0700346 u32 wrk_index;
Florin Coras99368312018-08-02 10:45:44 -0700347 u8 n_fds;
348 u8 fd_flags;
349};
350
Florin Coras15531972018-08-12 23:50:53 -0700351/** \brief add/del application worker
352 @param client_index - opaque cookie to identify the sender
353 client to vpp direction only
354 @param context - sender context, to match reply w/ request
Florin Corasc1f5a432018-11-20 11:31:26 -0800355 @param app_index - application index
Florin Coras15531972018-08-12 23:50:53 -0700356 @param wrk_index - worker index, if a delete
357 @param is_add - set if an add
358*/
359define app_worker_add_del
360{
361 u32 client_index;
362 u32 context;
Florin Corasc1f5a432018-11-20 11:31:26 -0800363 u32 app_index;
Florin Coras15531972018-08-12 23:50:53 -0700364 u32 wrk_index;
365 u8 is_add;
366};
367
368/** \brief Reply for app worker add/del
369 @param context - returned sender context, to match reply w/ request
370 @param retval - return code
371 @param wrk_index - worker index, if add
372 @param app_event_queue_address - vpp event queue address of new worker
373 @param n_fds - number of fds exchanged
374 @param fd_flags - set of flags that indicate which fds are to be expected
Florin Coras458089b2019-08-21 16:20:44 -0700375 over the socket (set only if socket transport available)
376 @param segment_name_length - length of segment name
Florin Coras15531972018-08-12 23:50:53 -0700377 @param segment_name - name of segment client needs to attach to
Florin Corasfa76a762018-11-29 12:40:10 -0800378 @param segment_handle - handle for segment
Florin Coras15531972018-08-12 23:50:53 -0700379*/
380define app_worker_add_del_reply
381{
382 u32 context;
383 i32 retval;
384 u32 wrk_index;
385 u64 app_event_queue_address;
386 u8 n_fds;
387 u8 fd_flags;
388 u8 segment_name_length;
389 u8 segment_name[128];
Florin Corasfa76a762018-11-29 12:40:10 -0800390 u64 segment_handle;
Florin Coras15531972018-08-12 23:50:53 -0700391 u8 is_add;
392};
393
Florin Corase04c2992017-03-01 08:17:34 -0800394/** \brief enable/disable session layer
395 @param client_index - opaque cookie to identify the sender
396 client to vpp direction only
397 @param context - sender context, to match reply w/ request
398 @param is_enable - disable session layer if 0, enable otherwise
399*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400400autoreply define session_enable_disable {
Florin Corase04c2992017-03-01 08:17:34 -0800401 u32 client_index;
402 u32 context;
403 u8 is_enable;
404};
405
Florin Corascea194d2017-10-02 00:18:51 -0700406/** \brief add/del application namespace
407 @param client_index - opaque cookie to identify the sender
408 client to vpp direction only
409 @param context - sender context, to match reply w/ request
Florin Coras64424012019-03-02 10:47:47 -0800410 @param secret - secret shared between app and vpp
Florin Corascea194d2017-10-02 00:18:51 -0700411 @param sw_if_index - local interface that "supports" namespace. Set to
Florin Coras64424012019-03-02 10:47:47 -0800412 ~0 if no preference
413 @param ip4_fib_id - id of ip4 fib that "supports" the namespace. Ignored
414 if sw_if_index set.
415 @param ip6_fib_id - id of ip6 fib that "supports" the namespace. Ignored
416 if sw_if_index set.
Florin Corascea194d2017-10-02 00:18:51 -0700417 @param namespace_id_len - length of namespace id lower
418 @param namespace_id - namespace id
419*/
Florin Coras6e8c6672017-11-10 09:03:54 -0800420define app_namespace_add_del {
Florin Corascea194d2017-10-02 00:18:51 -0700421 u32 client_index;
422 u32 context;
423 u64 secret;
424 u32 sw_if_index;
425 u32 ip4_fib_id;
426 u32 ip6_fib_id;
427 u8 namespace_id_len;
428 u8 namespace_id[64];
429};
430
Florin Coras6e8c6672017-11-10 09:03:54 -0800431/** \brief Reply for app namespace add/del
432 @param context - returned sender context, to match reply w/ request
433 @param retval - return code
434 @param appns_index - app namespace index
435*/
436define app_namespace_add_del_reply
437{
438 u32 context;
439 i32 retval;
440 u32 appns_index;
441};
442
Florin Coras1c710452017-10-17 00:03:13 -0700443/** \brief add/del session rule
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
447 @param transport_proto - transport protocol (0 - tcp 1 - udp)
448 @param is_ip4 - flag to indicate if ip addresses are ip4 or 6
449 @param lcl_ip - local ip
450 @param lcl_plen - local prefix length
451 @param rmt_ip - remote ip
452 @param rmt_ple - remote prefix length
453 @param lcl_port - local port
454 @param rmt_port - remote port
Florin Coras64424012019-03-02 10:47:47 -0800455 @param action_index - the only action defined now is forward to
456 application with index action_index
457 @param is_add - flag to indicate if add or del
458 @param appns_index - application namespace where rule is to be applied to
459 @param scope - flag that indicates scope of the rule: global or local.
460 If 0, default is global, 1 is global 2 is local, 3 is both
Florin Coras1c710452017-10-17 00:03:13 -0700461*/
462autoreply define session_rule_add_del {
463 u32 client_index;
464 u32 context;
465 u8 transport_proto;
466 u8 is_ip4;
467 u8 lcl_ip[16];
468 u8 lcl_plen;
469 u8 rmt_ip[16];
470 u8 rmt_plen;
471 u16 lcl_port;
472 u16 rmt_port;
473 u32 action_index;
474 u8 is_add;
475 u32 appns_index;
476 u8 scope;
Florin Corasc97a7392017-11-05 23:07:07 -0800477 u8 tag[64];
Florin Coras1c710452017-10-17 00:03:13 -0700478};
479
Florin Coras6c36f532017-11-03 18:32:34 -0700480/** \brief Dump session rules
481 @param client_index - opaque cookie to identify the sender
482 @param context - sender context, to match reply w/ request
483 */
484define session_rules_dump
485{
486 u32 client_index;
487 u32 context;
488};
489
490/** \brief Session rules details
Florin Coras64424012019-03-02 10:47:47 -0800491 @param context - sender context, to match reply w/ request
Florin Coras6c36f532017-11-03 18:32:34 -0700492 @param transport_proto - transport protocol (0 - tcp 1 - udp)
493 @param is_ip4 - flag to indicate if ip addresses are ip4 or 6
494 @param lcl_ip - local ip
495 @param lcl_plen - local prefix length
496 @param rmt_ip - remote ip
497 @param rmt_ple - remote prefix length
498 @param lcl_port - local port
499 @param rmt_port - remote port
500 @param action_index - the only action defined now is forward to
Florin Coras64424012019-03-02 10:47:47 -0800501 application with index action_index
502 @param appns_index - application namespace where rule is to be applied to
503 @param scope - flag that indicates scope of the rule: global or local.
504 If 0, default is global, 1 is global 2 is local, 3 is both
Florin Coras6c36f532017-11-03 18:32:34 -0700505 */
506define session_rules_details
507{
508 u32 context;
509 u8 transport_proto;
510 u8 is_ip4;
511 u8 lcl_ip[16];
512 u8 lcl_plen;
513 u8 rmt_ip[16];
514 u8 rmt_plen;
515 u16 lcl_port;
516 u16 rmt_port;
517 u32 action_index;
518 u32 appns_index;
519 u8 scope;
Florin Corasc97a7392017-11-05 23:07:07 -0800520 u8 tag[64];
Florin Coras6c36f532017-11-03 18:32:34 -0700521};
522
Dave Barach68b0fb02017-02-28 15:15:56 -0500523/*
524 * Local Variables:
525 * eval: (c-set-style "gnu")
526 * End:
Dave Barach11b8dbf2017-04-24 10:46:54 -0400527 */