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:
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 option version = "1.0.3";
18 /** \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
23 @param options - segment size, fifo sizes, etc.
24 @param namespace_id_len - length of the namespace id c-string
25 @param namespace_id - 0 terminted c-string
27 define application_attach {
30 u32 initial_segment_size;
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
41 @param segment_size - size of first shm segment
42 @param segment_name_length - length of segment name
43 @param segment_name - name of segment client needs to attach to
45 define application_attach_reply {
48 u64 app_event_queue_address;
50 u8 segment_name_length;
54 /** \brief Application add TLS certificate
55 @param client_index - opaque cookie to identify the sender
56 @param context - sender context, to match reply w/ request
57 @param cert_len - certificate length
58 @param cert - certificate as a string
60 autoreply define application_tls_cert_add {
68 /** \brief Application add TLS key
69 @param client_index - opaque cookie to identify the sender
70 @param context - sender context, to match reply w/ request
71 @param key_len - certificate length
72 @param key - PEM encoded key as a string
74 autoreply define application_tls_key_add {
82 /** \brief client->vpp, attach application to session layer
83 @param client_index - opaque cookie to identify the sender
84 @param context - sender context, to match reply w/ request
86 autoreply define application_detach {
91 /** \brief vpp->client, please map an additional shared memory segment
92 @param client_index - opaque cookie to identify the sender
93 @param context - sender context, to match reply w/ request
96 autoreply define map_another_segment {
100 u8 segment_name[128];
103 /** \brief vpp->client unmap shared memory segment
104 @param client_index - opaque cookie to identify the sender
105 @param context - sender context, to match reply w/ request
106 @param segment_name -
108 autoreply define unmap_segment {
111 u8 segment_name[128];
114 /** \brief Bind to a given URI
115 @param client_index - opaque cookie to identify the sender
116 @param context - sender context, to match reply w/ request
117 @param accept_cookie - sender accept cookie, to identify this bind flavor
118 @param uri - a URI, e.g. "tcp://0.0.0.0/0/80" [ipv4]
119 "tcp://::/0/80" [ipv6] etc.
120 @param options - socket options, fifo sizes, etc.
129 define bind_uri_reply {
141 /** \brief Unbind a given URI
142 @param client_index - opaque cookie to identify the sender
143 @param context - sender context, to match reply w/ request
144 @param uri - a URI, e.g. "tcp://0.0.0.0/0/80" [ipv4]
145 "tcp://::/0/80" [ipv6], etc.
146 @param options - socket options, fifo sizes, etc.
148 autoreply define unbind_uri {
154 /** \brief Connect to a given URI
155 @param client_index - opaque cookie to identify the sender
156 @param context - sender context, to match reply w/ request
157 @param client_queue_address - binary API client queue address. Used by
158 local server when connect was redirected.
159 @param options - socket options, fifo sizes, etc. passed by vpp to the
160 server when redirecting connects
161 @param uri - a URI, e.g. "tcp4://0.0.0.0/0/80"
162 "tcp6://::/0/80" [ipv6], etc.
164 autoreply define connect_uri {
167 u64 client_queue_address;
172 /** \brief vpp->client, accept this session
173 @param context - sender context, to match reply w/ request
174 @param listener_handle - tells client which listener this pertains to
175 @param handle - unique session identifier
176 @param rx_fifo_address - rx (vpp -> vpp-client) fifo address
177 @param tx_fifo_address - tx (vpp-client -> vpp) fifo address
178 @param vpp_event_queue_address - vpp's event queue address or client's
179 event queue for cut through
180 @param server_event_queue_address - server's event queue address for
182 @param port - remote port
183 @param is_ip4 - 1 if the ip is ip4
184 @param ip - remote ip
186 define accept_session {
193 u64 vpp_event_queue_address;
194 u64 server_event_queue_address;
200 /** \brief client->vpp, reply to an accept message
201 @param context - sender context, to match reply w/ request
202 @param retval - return code for the request
203 @param session_index - session index from accept_session / connect_reply
204 @param session_thread_index - thread index from accept_session /
207 define accept_session_reply {
213 /** \brief bidirectional disconnect API
214 @param client_index - opaque cookie to identify the sender
215 client to vpp direction only
216 @param context - sender context, to match reply w/ request
217 @param handle - session handle obtained from accept/connect
219 define disconnect_session {
225 /** \brief bidirectional disconnect reply API
226 @param client_index - opaque cookie to identify the sender
227 client to vpp direction only
228 @param context - sender context, to match reply w/ request
229 @param retval - return code for the request
230 @param handle - session handle
232 define disconnect_session_reply {
238 /** \brief vpp->client reset session API
239 @param client_index - opaque cookie to identify the sender
240 client to vpp direction only
241 @param context - sender context, to match reply w/ request
242 @param handle - session handle obtained via accept/connects
244 define reset_session {
250 /** \brief client->vpp reset session reply
251 @param client_index - opaque cookie to identify the sender
252 client to vpp direction only
253 @param context - sender context, to match reply w/ request
254 @param retval - return code for the request
255 @param handle - session handle obtained via accept/connect
257 define reset_session_reply {
264 /** \brief Bind to an ip:port pair for a given transport protocol
265 @param client_index - opaque cookie to identify the sender
266 @param context - sender context, to match reply w/ request
267 @param vrf - bind namespace
268 @param is_ip4 - flag that is 1 if ip address family is IPv4
269 @param ip - ip address
271 @param proto - protocol 0 - TCP 1 - UDP
272 @param options - socket options, fifo sizes, etc.
286 @param client_index - opaque cookie to identify the sender
287 @param context - sender context, to match reply w/ request
288 @param handle - bind handle obtained from bind reply
290 autoreply define unbind_sock {
296 /** \brief Connect to a remote peer
297 @param client_index - opaque cookie to identify the sender
298 @param context - sender context, to match reply w/ request
299 @param client_queue_address - client's API queue address. Non-zero when
300 used to perform redirects
301 @param options - socket options, fifo sizes, etc. when doing redirects
302 @param vrf - connection namespace
303 @param is_ip4 - flag that is 1 if ip address family is IPv4
304 @param ip - ip address
306 @param proto - protocol 0 - TCP 1 - UDP
307 @param hostname-len - length of hostname
308 @param hostname - destination's hostname. If present, used by protocols
311 autoreply define connect_sock {
314 u64 client_queue_address;
322 u8 hostname[hostname_len];
325 /** \brief Bind reply
326 @param context - sender context, to match reply w/ request
327 @param handle - bind handle
328 @param retval - return code for the request
329 @param lcl_is_ip4 - local ip address type
330 @param lcl_ip6 - local ip address
331 @param lcl_port - local port
332 @param rx_fifo - rx fifo address if allocated (connectionless)
333 @param tx_fifo - tx fifo address if allocated (connectionless)
334 @param vpp_evt_q - vpp event queue address (connectionless)
335 @param segment_name_length - length of segment name
336 @param segment_name - name of segment client needs to attach to
338 define bind_sock_reply {
349 u8 segment_name_length;
350 u8 segment_name[128];
353 /* Dummy connect message -- needed to satisfy api generators
355 * NEVER USED, doxygen tags elided on purpose.
357 define connect_session {
362 /** \brief vpp/server->client, connect reply -- used for all connect_* messages
363 @param context - sender context, to match reply w/ request
364 @param retval - return code for the request
365 @param handle - connection handle
366 @param server_rx_fifo - rx (vpp -> vpp-client) fifo address
367 @param server_tx_fifo - tx (vpp-client -> vpp) fifo address
368 @param vpp_event_queue_address - vpp's event queue address
369 @param client_event_queue_address - client's event queue address
370 @param segment_size - size of segment to be attached. Only for redirects.
371 @param segment_name_length - non-zero if the client needs to attach to
373 @param segment_name - set if the client needs to attach to the segment
374 @param lcl_ip - local ip for connection
375 @param is_ip4 - flag to indicate if ip is v4 or v6
376 @param lcl_port - local port
378 define connect_session_reply {
384 u64 vpp_event_queue_address;
385 u64 client_event_queue_address;
387 u8 segment_name_length;
388 u8 segment_name[128];
394 /** \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
400 autoreply define session_enable_disable {
406 /** \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
410 @param secret - secret shared between app and vpp
411 @param sw_if_index - local interface that "supports" namespace. Set to
413 @param ip4_fib_id - id of ip4 fib that "supports" the namespace. Ignored
415 @param ip6_fib_id - id of ip6 fib that "supports" the namespace. Ignored
417 @param namespace_id_len - length of namespace id lower
418 @param namespace_id - namespace id
420 define app_namespace_add_del {
431 /** \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
436 define app_namespace_add_del_reply
443 /** \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
455 @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
460 @param scope - flag that indicates scope of the rule: global or local.
461 If 0, default is global, 1 is global 2 is local, 3 is
464 autoreply define session_rule_add_del {
482 /** \brief Dump session rules
483 @param client_index - opaque cookie to identify the sender
484 @param context - sender context, to match reply w/ request
486 define session_rules_dump
492 /** \brief Session rules details
493 @param context - sender context, to match reply w/ request
494 @param transport_proto - transport protocol (0 - tcp 1 - udp)
495 @param is_ip4 - flag to indicate if ip addresses are ip4 or 6
496 @param lcl_ip - local ip
497 @param lcl_plen - local prefix length
498 @param rmt_ip - remote ip
499 @param rmt_ple - remote prefix length
500 @param lcl_port - local port
501 @param rmt_port - remote port
502 @param action_index - the only action defined now is forward to
503 application with index action_index
504 @param appns_index - application namespace where rule is to be applied
506 @param scope - flag that indicates scope of the rule: global or local.
507 If 0, default is global, 1 is global 2 is local, 3 is
510 define session_rules_details
529 * eval: (c-set-style "gnu")