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.4.0";
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 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)
44 @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
47 @param app_index - index of the newly created app
49 define application_attach_reply {
52 u64 app_event_queue_address;
56 u8 segment_name_length;
61 /** \brief Application add TLS certificate
62 @param client_index - opaque cookie to identify the sender
63 @param context - sender context, to match reply w/ request
64 @param cert_len - certificate length
65 @param cert - certificate as a string
67 autoreply define application_tls_cert_add {
75 /** \brief Application add TLS key
76 @param client_index - opaque cookie to identify the sender
77 @param context - sender context, to match reply w/ request
78 @param key_len - certificate length
79 @param key - PEM encoded key as a string
81 autoreply define application_tls_key_add {
89 /** \brief client->vpp, attach application to session layer
90 @param client_index - opaque cookie to identify the sender
91 @param context - sender context, to match reply w/ request
93 autoreply define application_detach {
98 /** \brief vpp->client, please map an additional shared memory segment
99 @param client_index - opaque cookie to identify the sender
100 @param context - sender context, to match reply w/ request
101 @param fd_flags - set of flags that indicate which, if any, fds are
102 to be expected over the socket. This is set only if
103 socket transport available
104 @param segment_size - size of the segment to be mapped
105 @param segment_name - name of the segment to be mapped
106 @param segment_handle - unique identifier for segment
108 autoreply define map_another_segment {
113 u8 segment_name[128];
117 /** \brief vpp->client unmap shared memory segment
118 @param client_index - opaque cookie to identify the sender
119 @param context - sender context, to match reply w/ request
120 @param segment_name - segment name
121 @param segment_handle - handle of the segment to be unmapped
123 autoreply define unmap_segment {
129 /** \brief Bind to a given URI
130 @param client_index - opaque cookie to identify the sender
131 @param context - sender context, to match reply w/ request
132 @param accept_cookie - sender accept cookie, to identify this bind flavor
133 @param uri - a URI, e.g. "tcp://0.0.0.0/0/80" [ipv4]
134 "tcp://::/0/80" [ipv6] etc.
135 @param options - socket options, fifo sizes, etc.
143 /** *** Will be DEPRECATED. Use message queue instead. *** */
144 define bind_uri_reply {
156 /** \brief Unbind a given URI
157 @param client_index - opaque cookie to identify the sender
158 @param context - sender context, to match reply w/ request
159 @param uri - a URI, e.g. "tcp://0.0.0.0/0/80" [ipv4]
160 "tcp://::/0/80" [ipv6], etc.
161 @param options - socket options, fifo sizes, etc.
163 autoreply define unbind_uri {
169 /** \brief Connect to a given URI
170 @param client_index - opaque cookie to identify the sender
171 @param context - sender context, to match reply w/ request
172 @param client_queue_address - binary API client queue address. Used by
173 local server when connect was redirected.
174 @param options - socket options, fifo sizes, etc. passed by vpp to the
175 server when redirecting connects
176 @param uri - a URI, e.g. "tcp4://0.0.0.0/0/80"
177 "tcp6://::/0/80" [ipv6], etc.
179 autoreply define connect_uri {
182 u64 client_queue_address;
187 /** \brief vpp->client, accept this session
188 *** Will be DEPRECATED. Use message queue instead. ***
189 @param context - sender context, to match reply w/ request
190 @param listener_handle - tells client which listener this pertains to
191 @param handle - unique session identifier
192 @param rx_fifo_address - rx (vpp -> vpp-client) fifo address
193 @param tx_fifo_address - tx (vpp-client -> vpp) fifo address
194 @param vpp_event_queue_address - vpp's event queue address or client's
195 event queue for cut through
196 @param server_event_queue_address - server's event queue address for
198 @param port - remote port
199 @param is_ip4 - 1 if the ip is ip4
200 @param ip - remote ip
202 define accept_session {
209 u64 vpp_event_queue_address;
210 u64 server_event_queue_address;
216 /** \brief client->vpp, reply to an accept message
217 *** Will be DEPRECATED. Use message queue instead. ***
218 @param context - sender context, to match reply w/ request
219 @param retval - return code for the request
220 @param session_index - session index from accept_session / connect_reply
221 @param session_thread_index - thread index from accept_session /
224 define accept_session_reply {
230 /** \brief bidirectional disconnect API
231 @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
234 @param handle - session handle obtained from accept/connect
236 define disconnect_session {
242 /** \brief bidirectional disconnect reply API
243 *** Will be DEPRECATED. Use message queue instead. ***
244 @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
248 @param handle - session handle
250 define disconnect_session_reply {
256 /** \brief vpp->client reset session API
257 *** Will be DEPRECATED. Use message queue instead. ***
258 @param client_index - opaque cookie to identify the sender
259 client to vpp direction only
260 @param context - sender context, to match reply w/ request
261 @param handle - session handle obtained via accept/connects
263 define reset_session {
269 /** \brief client->vpp reset session reply
270 *** Will be DEPRECATED. Use message queue instead. ***
271 @param context - sender context, to match reply w/ request
272 @param retval - return code for the request
273 @param handle - session handle obtained via accept/connect
275 define reset_session_reply {
281 /** \brief Bind to an ip:port pair for a given transport protocol
282 @param client_index - opaque cookie to identify the sender
283 @param context - sender context, to match reply w/ request
284 @param wrk_index - index of worker requesting the bind
285 @param vrf - bind namespace
286 @param is_ip4 - flag that is 1 if ip address family is IPv4
287 @param ip - ip address
289 @param proto - protocol 0 - TCP 1 - UDP
290 @param options - socket options, fifo sizes, etc.
305 @param client_index - opaque cookie to identify the sender
306 @param context - sender context, to match reply w/ request
307 @param wrk_index - index of worker requesting the bind
308 @param handle - bind handle obtained from bind reply
310 autoreply define unbind_sock {
317 /** \brief Connect to a remote peer
318 @param client_index - opaque cookie to identify the sender
319 @param context - sender context, to match reply w/ request
320 @param wrk_index - worker that requests the connect
321 @param client_queue_address - client's API queue address. Non-zero when
322 used to perform redirects
323 @param options - socket options, fifo sizes, etc. when doing redirects
324 @param vrf - connection namespace
325 @param is_ip4 - flag that is 1 if ip address family is IPv4
326 @param ip - ip address
328 @param proto - protocol 0 - TCP 1 - UDP
329 @param hostname-len - length of hostname
330 @param hostname - destination's hostname. If present, used by protocols
333 autoreply define connect_sock {
337 u64 client_queue_address;
345 u8 hostname[hostname_len];
348 /** \brief Bind reply
349 *** Will be DEPRECATED. Use message queue instead. ***
350 @param context - sender context, to match reply w/ request
351 @param handle - bind handle
352 @param retval - return code for the request
353 @param lcl_is_ip4 - local ip address type
354 @param lcl_ip6 - local ip address
355 @param lcl_port - local port
356 @param rx_fifo - rx fifo address if allocated (connectionless)
357 @param tx_fifo - tx fifo address if allocated (connectionless)
358 @param vpp_evt_q - vpp event queue address (connectionless)
359 @param segment_name_length - length of segment name
360 @param segment_name - name of segment client needs to attach to
362 define bind_sock_reply {
373 u8 segment_name_length;
374 u8 segment_name[128];
377 /* Dummy connect message -- needed to satisfy api generators
379 * NEVER USED, doxygen tags elided on purpose.
381 define connect_session {
386 /** \brief vpp/server->client, connect reply -- used for all connect_* messages
387 *** Will be DEPRECATED. Use message queue instead. ***
388 @param context - sender context, to match reply w/ request
389 @param retval - return code for the request
390 @param handle - connection handle
391 @param server_rx_fifo - rx (vpp -> vpp-client) fifo address
392 @param server_tx_fifo - tx (vpp-client -> vpp) fifo address
393 @param vpp_event_queue_address - vpp's event queue address
394 @param client_event_queue_address - client's event queue address
395 @param segment_size - size of segment to be attached. Only for redirects.
396 @param segment_name_length - non-zero if the client needs to attach to
398 @param segment_name - set if the client needs to attach to the segment
399 @param lcl_ip - local ip for connection
400 @param is_ip4 - flag to indicate if ip is v4 or v6
401 @param lcl_port - local port
403 define connect_session_reply {
409 u64 vpp_event_queue_address;
410 u64 client_event_queue_address;
412 u8 segment_name_length;
413 u8 segment_name[128];
419 /** \brief ask app to add a new cut-through registration
420 @param client_index - opaque cookie to identify the sender
421 client to vpp direction only
422 @param context - sender context, to match reply w/ request
423 @param evt_q_address - address of the mq in ssvm segment
424 @param peer_evt_q_address - address of peer's mq in ssvm segment
425 @param wrk_index - index of worker to receive the registration
426 @param n_fds - number of fds exchanged
427 @param fd_flags - flag indicating the fds that will be exchanged over
430 autoreply define app_cut_through_registration_add
435 u64 peer_evt_q_address;
441 /** \brief add/del application worker
442 @param client_index - opaque cookie to identify the sender
443 client to vpp direction only
444 @param context - sender context, to match reply w/ request
445 @param app_index - application index
446 @param wrk_index - worker index, if a delete
447 @param is_add - set if an add
449 define app_worker_add_del
458 /** \brief Reply for app worker add/del
459 @param context - returned sender context, to match reply w/ request
460 @param retval - return code
461 @param wrk_index - worker index, if add
462 @param app_event_queue_address - vpp event queue address of new worker
463 @param n_fds - number of fds exchanged
464 @param fd_flags - set of flags that indicate which fds are to be expected
465 over the socket (set only if socket transport available)
466 @param segment_name_length - length of segment name
467 @param segment_name - name of segment client needs to attach to
468 @param segment_handle - handle for segment
470 define app_worker_add_del_reply
475 u64 app_event_queue_address;
478 u8 segment_name_length;
479 u8 segment_name[128];
484 /** \brief enable/disable session layer
485 @param client_index - opaque cookie to identify the sender
486 client to vpp direction only
487 @param context - sender context, to match reply w/ request
488 @param is_enable - disable session layer if 0, enable otherwise
490 autoreply define session_enable_disable {
496 /** \brief add/del application namespace
497 @param client_index - opaque cookie to identify the sender
498 client to vpp direction only
499 @param context - sender context, to match reply w/ request
500 @param secret - secret shared between app and vpp
501 @param sw_if_index - local interface that "supports" namespace. Set to
503 @param ip4_fib_id - id of ip4 fib that "supports" the namespace. Ignored
505 @param ip6_fib_id - id of ip6 fib that "supports" the namespace. Ignored
507 @param namespace_id_len - length of namespace id lower
508 @param namespace_id - namespace id
510 define app_namespace_add_del {
521 /** \brief Reply for app namespace add/del
522 @param context - returned sender context, to match reply w/ request
523 @param retval - return code
524 @param appns_index - app namespace index
526 define app_namespace_add_del_reply
533 /** \brief add/del session rule
534 @param client_index - opaque cookie to identify the sender
535 client to vpp direction only
536 @param context - sender context, to match reply w/ request
537 @param transport_proto - transport protocol (0 - tcp 1 - udp)
538 @param is_ip4 - flag to indicate if ip addresses are ip4 or 6
539 @param lcl_ip - local ip
540 @param lcl_plen - local prefix length
541 @param rmt_ip - remote ip
542 @param rmt_ple - remote prefix length
543 @param lcl_port - local port
544 @param rmt_port - remote port
545 @param action_index - the only action defined now is forward to
546 application with index action_index
547 @param is_add - flag to indicate if add or del
548 @param appns_index - application namespace where rule is to be applied
550 @param scope - flag that indicates scope of the rule: global or local.
551 If 0, default is global, 1 is global 2 is local, 3 is
554 autoreply define session_rule_add_del {
572 /** \brief Dump session rules
573 @param client_index - opaque cookie to identify the sender
574 @param context - sender context, to match reply w/ request
576 define session_rules_dump
582 /** \brief Session rules details
583 @param context - sender context, to match reply w/ request
584 @param transport_proto - transport protocol (0 - tcp 1 - udp)
585 @param is_ip4 - flag to indicate if ip addresses are ip4 or 6
586 @param lcl_ip - local ip
587 @param lcl_plen - local prefix length
588 @param rmt_ip - remote ip
589 @param rmt_ple - remote prefix length
590 @param lcl_port - local port
591 @param rmt_port - remote port
592 @param action_index - the only action defined now is forward to
593 application with index action_index
594 @param appns_index - application namespace where rule is to be applied
596 @param scope - flag that indicates scope of the rule: global or local.
597 If 0, default is global, 1 is global 2 is local, 3 is
600 define session_rules_details
619 * eval: (c-set-style "gnu")