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.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 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 client->vpp, attach application to session layer
55 @param client_index - opaque cookie to identify the sender
56 @param context - sender context, to match reply w/ request
58 autoreply define application_detach {
63 /** \brief vpp->client, please map an additional shared memory segment
64 @param client_index - opaque cookie to identify the sender
65 @param context - sender context, to match reply w/ request
68 autoreply define map_another_segment {
75 /** \brief vpp->client unmap shared memory segment
76 @param client_index - opaque cookie to identify the sender
77 @param context - sender context, to match reply w/ request
80 autoreply define unmap_segment {
86 /** \brief Bind to a given URI
87 @param client_index - opaque cookie to identify the sender
88 @param context - sender context, to match reply w/ request
89 @param accept_cookie - sender accept cookie, to identify this bind flavor
90 @param uri - a URI, e.g. "tcp://0.0.0.0/0/80" [ipv4]
91 "tcp://::/0/80" [ipv6] etc.
92 @param options - socket options, fifo sizes, etc.
94 autoreply define bind_uri {
101 /** \brief Unbind a given URI
102 @param client_index - opaque cookie to identify the sender
103 @param context - sender context, to match reply w/ request
104 @param uri - a URI, e.g. "tcp://0.0.0.0/0/80" [ipv4]
105 "tcp://::/0/80" [ipv6], etc.
106 @param options - socket options, fifo sizes, etc.
108 autoreply define unbind_uri {
114 /** \brief Connect 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 client_queue_address - binary API client queue address. Used by
118 local server when connect was redirected.
119 @param options - socket options, fifo sizes, etc. passed by vpp to the
120 server when redirecting connects
121 @param uri - a URI, e.g. "tcp4://0.0.0.0/0/80"
122 "tcp6://::/0/80" [ipv6], etc.
124 autoreply define connect_uri {
127 u64 client_queue_address;
132 /** \brief vpp->client, accept this session
133 @param context - sender context, to match reply w/ request
134 @param listener_handle - tells client which listener this pertains to
135 @param handle - unique session identifier
136 @param rx_fifo_address - rx (vpp -> vpp-client) fifo address
137 @param tx_fifo_address - tx (vpp-client -> vpp) fifo address
138 @param vpp_event_queue_address - vpp's event queue address or client's
139 event queue for cut through
140 @param server_event_queue_address - server's event queue address for
142 @param port - remote port
143 @param is_ip4 - 1 if the ip is ip4
144 @param ip - remote ip
146 define accept_session {
153 u64 vpp_event_queue_address;
154 u64 server_event_queue_address;
160 /** \brief client->vpp, reply to an accept message
161 @param context - sender context, to match reply w/ request
162 @param retval - return code for the request
163 @param session_index - session index from accept_session / connect_reply
164 @param session_thread_index - thread index from accept_session /
167 define accept_session_reply {
173 /** \brief bidirectional disconnect API
174 @param client_index - opaque cookie to identify the sender
175 client to vpp direction only
176 @param context - sender context, to match reply w/ request
177 @param handle - session handle obtained from accept/connect
179 define disconnect_session {
185 /** \brief bidirectional disconnect reply API
186 @param client_index - opaque cookie to identify the sender
187 client to vpp direction only
188 @param context - sender context, to match reply w/ request
189 @param retval - return code for the request
190 @param handle - session handle
192 define disconnect_session_reply {
198 /** \brief vpp->client reset session API
199 @param client_index - opaque cookie to identify the sender
200 client to vpp direction only
201 @param context - sender context, to match reply w/ request
202 @param handle - session handle obtained via accept/connects
204 define reset_session {
210 /** \brief client->vpp reset session reply
211 @param client_index - opaque cookie to identify the sender
212 client to vpp direction only
213 @param context - sender context, to match reply w/ request
214 @param retval - return code for the request
215 @param handle - session handle obtained via accept/connect
217 define reset_session_reply {
224 /** \brief Bind to an ip:port pair for a given transport protocol
225 @param client_index - opaque cookie to identify the sender
226 @param context - sender context, to match reply w/ request
227 @param vrf - bind namespace
228 @param is_ip4 - flag that is 1 if ip address family is IPv4
229 @param ip - ip address
231 @param proto - protocol 0 - TCP 1 - UDP
232 @param options - socket options, fifo sizes, etc.
246 @param client_index - opaque cookie to identify the sender
247 @param context - sender context, to match reply w/ request
248 @param handle - bind handle obtained from bind reply
250 autoreply define unbind_sock {
256 /** \brief Connect to a remote peer
257 @param client_index - opaque cookie to identify the sender
258 @param context - sender context, to match reply w/ request
259 @param client_queue_address - client's API queue address. Non-zero when
260 used to perform redirects
261 @param options - socket options, fifo sizes, etc. when doing redirects
262 @param vrf - connection namespace
263 @param is_ip4 - flag that is 1 if ip address family is IPv4
264 @param ip - ip address
266 @param proto - protocol 0 - TCP 1 - UDP
268 autoreply define connect_sock {
271 u64 client_queue_address;
280 /** \brief Bind reply
281 @param context - sender context, to match reply w/ request
282 @param handle - bind handle
283 @param retval - return code for the request
284 @param event_queue_address - vpp event queue address or 0 if this
285 connection shouldn't send events
286 @param segment_name_length - length of segment name
287 @param segment_name - name of segment client needs to attach to
289 define bind_sock_reply {
293 u64 server_event_queue_address;
298 u8 segment_name_length;
299 u8 segment_name[128];
302 /* Dummy connect message -- needed to satisfy api generators
304 * NEVER USED, doxygen tags elided on purpose.
306 define connect_session {
311 /** \brief vpp/server->client, connect reply -- used for all connect_* messages
312 @param context - sender context, to match reply w/ request
313 @param retval - return code for the request
314 @param handle - connection handle
315 @param server_rx_fifo - rx (vpp -> vpp-client) fifo address
316 @param server_tx_fifo - tx (vpp-client -> vpp) fifo address
317 @param vpp_event_queue_address - vpp's event queue address
318 @param client_event_queue_address - client's event queue address
319 @param segment_size - size of segment to be attached. Only for redirects.
320 @param segment_name_length - non-zero if the client needs to attach to
322 @param segment_name - set if the client needs to attach to the segment
323 @param lcl_ip - local ip for connection
324 @param is_ip4 - flag to indicate if ip is v4 or v6
325 @param lcl_port - local port
327 define connect_session_reply {
333 u64 vpp_event_queue_address;
334 u64 client_event_queue_address;
336 u8 segment_name_length;
337 u8 segment_name[128];
343 /** \brief enable/disable session layer
344 @param client_index - opaque cookie to identify the sender
345 client to vpp direction only
346 @param context - sender context, to match reply w/ request
347 @param is_enable - disable session layer if 0, enable otherwise
349 autoreply define session_enable_disable {
355 /** \brief add/del application namespace
356 @param client_index - opaque cookie to identify the sender
357 client to vpp direction only
358 @param context - sender context, to match reply w/ request
359 @param secret - secret shared between app and vpp
360 @param sw_if_index - local interface that "supports" namespace. Set to
362 @param ip4_fib_id - id of ip4 fib that "supports" the namespace. Ignored
364 @param ip6_fib_id - id of ip6 fib that "supports" the namespace. Ignored
366 @param namespace_id_len - length of namespace id lower
367 @param namespace_id - namespace id
369 define app_namespace_add_del {
380 /** \brief Reply for app namespace add/del
381 @param context - returned sender context, to match reply w/ request
382 @param retval - return code
383 @param appns_index - app namespace index
385 define app_namespace_add_del_reply
392 /** \brief add/del session rule
393 @param client_index - opaque cookie to identify the sender
394 client to vpp direction only
395 @param context - sender context, to match reply w/ request
396 @param transport_proto - transport protocol (0 - tcp 1 - udp)
397 @param is_ip4 - flag to indicate if ip addresses are ip4 or 6
398 @param lcl_ip - local ip
399 @param lcl_plen - local prefix length
400 @param rmt_ip - remote ip
401 @param rmt_ple - remote prefix length
402 @param lcl_port - local port
403 @param rmt_port - remote port
404 @param action_index - the only action defined now is forward to
405 application with index action_index
406 @param is_add - flag to indicate if add or del
407 @param appns_index - application namespace where rule is to be applied
409 @param scope - flag that indicates scope of the rule: global or local.
410 If 0, default is global, 1 is global 2 is local, 3 is
413 autoreply define session_rule_add_del {
431 /** \brief Dump session rules
432 @param client_index - opaque cookie to identify the sender
433 @param context - sender context, to match reply w/ request
435 define session_rules_dump
441 /** \brief Session rules details
442 @param context - sender context, to match reply w/ request
443 @param transport_proto - transport protocol (0 - tcp 1 - udp)
444 @param is_ip4 - flag to indicate if ip addresses are ip4 or 6
445 @param lcl_ip - local ip
446 @param lcl_plen - local prefix length
447 @param rmt_ip - remote ip
448 @param rmt_ple - remote prefix length
449 @param lcl_port - local port
450 @param rmt_port - remote port
451 @param action_index - the only action defined now is forward to
452 application with index action_index
453 @param appns_index - application namespace where rule is to be applied
455 @param scope - flag that indicates scope of the rule: global or local.
456 If 0, default is global, 1 is global 2 is local, 3 is
459 define session_rules_details
478 * eval: (c-set-style "gnu")