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.2.1";
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
48 define application_attach_reply {
51 u64 app_event_queue_address;
55 u8 segment_name_length;
59 /** \brief Application add TLS certificate
60 @param client_index - opaque cookie to identify the sender
61 @param context - sender context, to match reply w/ request
62 @param cert_len - certificate length
63 @param cert - certificate as a string
65 autoreply define application_tls_cert_add {
73 /** \brief Application add TLS key
74 @param client_index - opaque cookie to identify the sender
75 @param context - sender context, to match reply w/ request
76 @param key_len - certificate length
77 @param key - PEM encoded key as a string
79 autoreply define application_tls_key_add {
87 /** \brief client->vpp, attach application to session layer
88 @param client_index - opaque cookie to identify the sender
89 @param context - sender context, to match reply w/ request
91 autoreply define application_detach {
96 /** \brief vpp->client, please map an additional shared memory segment
97 @param client_index - opaque cookie to identify the sender
98 @param context - sender context, to match reply w/ request
99 @param fd_flags - set of flags that indicate which, if any, fds are
100 to be expected over the socket. This is set only if
101 socket transport available
102 @param segment_size - size of the segment to be mapped
103 @param segment_name - name of the segment to be mapped
105 autoreply define map_another_segment {
110 u8 segment_name[128];
113 /** \brief vpp->client unmap shared memory segment
114 @param client_index - opaque cookie to identify the sender
115 @param context - sender context, to match reply w/ request
116 @param segment_name -
118 autoreply define unmap_segment {
121 u8 segment_name[128];
124 /** \brief Bind to a given URI
125 @param client_index - opaque cookie to identify the sender
126 @param context - sender context, to match reply w/ request
127 @param accept_cookie - sender accept cookie, to identify this bind flavor
128 @param uri - a URI, e.g. "tcp://0.0.0.0/0/80" [ipv4]
129 "tcp://::/0/80" [ipv6] etc.
130 @param options - socket options, fifo sizes, etc.
138 /** *** Will be DEPRECATED. Use message queue instead. *** */
139 define bind_uri_reply {
151 /** \brief Unbind a given URI
152 @param client_index - opaque cookie to identify the sender
153 @param context - sender context, to match reply w/ request
154 @param uri - a URI, e.g. "tcp://0.0.0.0/0/80" [ipv4]
155 "tcp://::/0/80" [ipv6], etc.
156 @param options - socket options, fifo sizes, etc.
158 autoreply define unbind_uri {
164 /** \brief Connect to a given URI
165 @param client_index - opaque cookie to identify the sender
166 @param context - sender context, to match reply w/ request
167 @param client_queue_address - binary API client queue address. Used by
168 local server when connect was redirected.
169 @param options - socket options, fifo sizes, etc. passed by vpp to the
170 server when redirecting connects
171 @param uri - a URI, e.g. "tcp4://0.0.0.0/0/80"
172 "tcp6://::/0/80" [ipv6], etc.
174 autoreply define connect_uri {
177 u64 client_queue_address;
182 /** \brief vpp->client, accept this session
183 *** Will be DEPRECATED. Use message queue instead. ***
184 @param context - sender context, to match reply w/ request
185 @param listener_handle - tells client which listener this pertains to
186 @param handle - unique session identifier
187 @param rx_fifo_address - rx (vpp -> vpp-client) fifo address
188 @param tx_fifo_address - tx (vpp-client -> vpp) fifo address
189 @param vpp_event_queue_address - vpp's event queue address or client's
190 event queue for cut through
191 @param server_event_queue_address - server's event queue address for
193 @param port - remote port
194 @param is_ip4 - 1 if the ip is ip4
195 @param ip - remote ip
197 define accept_session {
204 u64 vpp_event_queue_address;
205 u64 server_event_queue_address;
211 /** \brief client->vpp, reply to an accept message
212 *** Will be DEPRECATED. Use message queue instead. ***
213 @param context - sender context, to match reply w/ request
214 @param retval - return code for the request
215 @param session_index - session index from accept_session / connect_reply
216 @param session_thread_index - thread index from accept_session /
219 define accept_session_reply {
225 /** \brief bidirectional disconnect 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 handle - session handle obtained from accept/connect
231 define disconnect_session {
237 /** \brief bidirectional disconnect reply API
238 *** Will be DEPRECATED. Use message queue instead. ***
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 retval - return code for the request
243 @param handle - session handle
245 define disconnect_session_reply {
251 /** \brief vpp->client reset session API
252 *** Will be DEPRECATED. Use message queue instead. ***
253 @param client_index - opaque cookie to identify the sender
254 client to vpp direction only
255 @param context - sender context, to match reply w/ request
256 @param handle - session handle obtained via accept/connects
258 define reset_session {
264 /** \brief client->vpp reset session reply
265 *** Will be DEPRECATED. Use message queue instead. ***
266 @param context - sender context, to match reply w/ request
267 @param retval - return code for the request
268 @param handle - session handle obtained via accept/connect
270 define reset_session_reply {
276 /** \brief Bind to an ip:port pair for a given transport protocol
277 @param client_index - opaque cookie to identify the sender
278 @param context - sender context, to match reply w/ request
279 @param wrk_index - index of worker requesting the bind
280 @param vrf - bind namespace
281 @param is_ip4 - flag that is 1 if ip address family is IPv4
282 @param ip - ip address
284 @param proto - protocol 0 - TCP 1 - UDP
285 @param options - socket options, fifo sizes, etc.
300 @param client_index - opaque cookie to identify the sender
301 @param context - sender context, to match reply w/ request
302 @param wrk_index - index of worker requesting the bind
303 @param handle - bind handle obtained from bind reply
305 autoreply define unbind_sock {
312 /** \brief Connect to a remote peer
313 @param client_index - opaque cookie to identify the sender
314 @param context - sender context, to match reply w/ request
315 @param wrk_index - worker that requests the connect
316 @param client_queue_address - client's API queue address. Non-zero when
317 used to perform redirects
318 @param options - socket options, fifo sizes, etc. when doing redirects
319 @param vrf - connection namespace
320 @param is_ip4 - flag that is 1 if ip address family is IPv4
321 @param ip - ip address
323 @param proto - protocol 0 - TCP 1 - UDP
324 @param hostname-len - length of hostname
325 @param hostname - destination's hostname. If present, used by protocols
328 autoreply define connect_sock {
332 u64 client_queue_address;
340 u8 hostname[hostname_len];
343 /** \brief Bind reply
344 *** Will be DEPRECATED. Use message queue instead. ***
345 @param context - sender context, to match reply w/ request
346 @param handle - bind handle
347 @param retval - return code for the request
348 @param lcl_is_ip4 - local ip address type
349 @param lcl_ip6 - local ip address
350 @param lcl_port - local port
351 @param rx_fifo - rx fifo address if allocated (connectionless)
352 @param tx_fifo - tx fifo address if allocated (connectionless)
353 @param vpp_evt_q - vpp event queue address (connectionless)
354 @param segment_name_length - length of segment name
355 @param segment_name - name of segment client needs to attach to
357 define bind_sock_reply {
368 u8 segment_name_length;
369 u8 segment_name[128];
372 /* Dummy connect message -- needed to satisfy api generators
374 * NEVER USED, doxygen tags elided on purpose.
376 define connect_session {
381 /** \brief vpp/server->client, connect reply -- used for all connect_* messages
382 *** Will be DEPRECATED. Use message queue instead. ***
383 @param context - sender context, to match reply w/ request
384 @param retval - return code for the request
385 @param handle - connection handle
386 @param server_rx_fifo - rx (vpp -> vpp-client) fifo address
387 @param server_tx_fifo - tx (vpp-client -> vpp) fifo address
388 @param vpp_event_queue_address - vpp's event queue address
389 @param client_event_queue_address - client's event queue address
390 @param segment_size - size of segment to be attached. Only for redirects.
391 @param segment_name_length - non-zero if the client needs to attach to
393 @param segment_name - set if the client needs to attach to the segment
394 @param lcl_ip - local ip for connection
395 @param is_ip4 - flag to indicate if ip is v4 or v6
396 @param lcl_port - local port
398 define connect_session_reply {
404 u64 vpp_event_queue_address;
405 u64 client_event_queue_address;
407 u8 segment_name_length;
408 u8 segment_name[128];
414 /** \brief ask app to add a new cut-through registration
415 @param client_index - opaque cookie to identify the sender
416 client to vpp direction only
417 @param context - sender context, to match reply w/ request
418 @param evt_q_address - address of the mq in ssvm segment
419 @param peer_evt_q_address - address of peer's mq in ssvm segment
420 @param wrk_index - index of worker to receive the registration
421 @param n_fds - number of fds exchanged
422 @param fd_flags - flag indicating the fds that will be exchanged over
425 autoreply define app_cut_through_registration_add
430 u64 peer_evt_q_address;
436 /** \brief add/del application worker
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 app_api_index - explicit client api index
441 @param wrk_index - worker index, if a delete
442 @param is_add - set if an add
444 define app_worker_add_del
453 /** \brief Reply for app worker add/del
454 @param context - returned sender context, to match reply w/ request
455 @param retval - return code
456 @param wrk_index - worker index, if add
457 @param app_event_queue_address - vpp event queue address of new worker
458 @param n_fds - number of fds exchanged
459 @param fd_flags - set of flags that indicate which fds are to be expected
460 over the socket (set only if socket transport available)
461 @param segment_name_length - length of segment name
462 @param segment_name - name of segment client needs to attach to
464 define app_worker_add_del_reply
469 u64 app_event_queue_address;
472 u8 segment_name_length;
473 u8 segment_name[128];
477 /** \brief enable/disable session layer
478 @param client_index - opaque cookie to identify the sender
479 client to vpp direction only
480 @param context - sender context, to match reply w/ request
481 @param is_enable - disable session layer if 0, enable otherwise
483 autoreply define session_enable_disable {
489 /** \brief add/del application namespace
490 @param client_index - opaque cookie to identify the sender
491 client to vpp direction only
492 @param context - sender context, to match reply w/ request
493 @param secret - secret shared between app and vpp
494 @param sw_if_index - local interface that "supports" namespace. Set to
496 @param ip4_fib_id - id of ip4 fib that "supports" the namespace. Ignored
498 @param ip6_fib_id - id of ip6 fib that "supports" the namespace. Ignored
500 @param namespace_id_len - length of namespace id lower
501 @param namespace_id - namespace id
503 define app_namespace_add_del {
514 /** \brief Reply for app namespace add/del
515 @param context - returned sender context, to match reply w/ request
516 @param retval - return code
517 @param appns_index - app namespace index
519 define app_namespace_add_del_reply
526 /** \brief add/del session rule
527 @param client_index - opaque cookie to identify the sender
528 client to vpp direction only
529 @param context - sender context, to match reply w/ request
530 @param transport_proto - transport protocol (0 - tcp 1 - udp)
531 @param is_ip4 - flag to indicate if ip addresses are ip4 or 6
532 @param lcl_ip - local ip
533 @param lcl_plen - local prefix length
534 @param rmt_ip - remote ip
535 @param rmt_ple - remote prefix length
536 @param lcl_port - local port
537 @param rmt_port - remote port
538 @param action_index - the only action defined now is forward to
539 application with index action_index
540 @param is_add - flag to indicate if add or del
541 @param appns_index - application namespace where rule is to be applied
543 @param scope - flag that indicates scope of the rule: global or local.
544 If 0, default is global, 1 is global 2 is local, 3 is
547 autoreply define session_rule_add_del {
565 /** \brief Dump session rules
566 @param client_index - opaque cookie to identify the sender
567 @param context - sender context, to match reply w/ request
569 define session_rules_dump
575 /** \brief Session rules details
576 @param context - sender context, to match reply w/ request
577 @param transport_proto - transport protocol (0 - tcp 1 - udp)
578 @param is_ip4 - flag to indicate if ip addresses are ip4 or 6
579 @param lcl_ip - local ip
580 @param lcl_plen - local prefix length
581 @param rmt_ip - remote ip
582 @param rmt_ple - remote prefix length
583 @param lcl_port - local port
584 @param rmt_port - remote port
585 @param action_index - the only action defined now is forward to
586 application with index action_index
587 @param appns_index - application namespace where rule is to be applied
589 @param scope - flag that indicates scope of the rule: global or local.
590 If 0, default is global, 1 is global 2 is local, 3 is
593 define session_rules_details
612 * eval: (c-set-style "gnu")