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.
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.
25 define application_attach {
28 u32 initial_segment_size;
32 /** \brief Application attach reply
33 @param context - sender context, to match reply w/ request
34 @param retval - return code for the request
35 @param app_event_queue_address - vpp event queue address or 0 if this
36 connection shouldn't send events
37 @param segment_size - size of first shm segment
38 @param segment_name_length - length of segment name
39 @param segment_name - name of segment client needs to attach to
41 define application_attach_reply {
44 u64 app_event_queue_address;
46 u8 segment_name_length;
50 /** \brief client->vpp, attach application to session layer
51 @param client_index - opaque cookie to identify the sender
52 @param context - sender context, to match reply w/ request
54 autoreply define application_detach {
59 /** \brief vpp->client, please map an additional shared memory segment
60 @param client_index - opaque cookie to identify the sender
61 @param context - sender context, to match reply w/ request
64 autoreply define map_another_segment {
71 /** \brief Bind to a given URI
72 @param client_index - opaque cookie to identify the sender
73 @param context - sender context, to match reply w/ request
74 @param accept_cookie - sender accept cookie, to identify this bind flavor
75 @param uri - a URI, e.g. "tcp://0.0.0.0/0/80" [ipv4]
76 "tcp://::/0/80" [ipv6] etc.
77 @param options - socket options, fifo sizes, etc.
79 autoreply define bind_uri {
86 /** \brief Unbind 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 uri - a URI, e.g. "tcp://0.0.0.0/0/80" [ipv4]
90 "tcp://::/0/80" [ipv6], etc.
91 @param options - socket options, fifo sizes, etc.
93 autoreply define unbind_uri {
99 /** \brief Connect to a given URI
100 @param client_index - opaque cookie to identify the sender
101 @param context - sender context, to match reply w/ request
102 @param accept_cookie - sender accept cookie, to identify this bind flavor
103 @param uri - a URI, e.g. "tcp4://0.0.0.0/0/80"
104 "tcp6://::/0/80" [ipv6], etc.
105 @param options - socket options, fifo sizes, etc. passed by vpp to the
106 server when redirecting connects
107 @param client_queue_address - binary API client queue address. Used by
108 local server when connect was redirected.
110 autoreply define connect_uri {
114 u64 client_queue_address;
118 /** \brief vpp->client, accept this session
119 @param context - sender context, to match reply w/ request
120 @param listener_handle - tells client which listener this pertains to
121 @param handle - unique session identifier
122 @param session_thread_index - thread index of new session
123 @param rx_fifo_address - rx (vpp -> vpp-client) fifo address
124 @param tx_fifo_address - tx (vpp-client -> vpp) fifo address
125 @param vpp_event_queue_address - vpp's event queue address
126 @param port - remote port
127 @param is_ip4 - 1 if the ip is ip4
128 @param ip - remote ip
130 define accept_session {
137 u64 vpp_event_queue_address;
143 /** \brief client->vpp, reply to an accept message
144 @param context - sender context, to match reply w/ request
145 @param retval - return code for the request
146 @param session_index - session index from accept_session / connect_reply
147 @param session_thread_index - thread index from accept_session /
150 define accept_session_reply {
156 /** \brief bidirectional disconnect API
157 @param client_index - opaque cookie to identify the sender
158 client to vpp direction only
159 @param context - sender context, to match reply w/ request
160 @param handle - session handle obtained from accept/connect
162 define disconnect_session {
168 /** \brief bidirectional disconnect reply API
169 @param client_index - opaque cookie to identify the sender
170 client to vpp direction only
171 @param context - sender context, to match reply w/ request
172 @param retval - return code for the request
173 @param handle - session handle
175 define disconnect_session_reply {
182 /** \brief vpp->client reset session API
183 @param client_index - opaque cookie to identify the sender
184 client to vpp direction only
185 @param context - sender context, to match reply w/ request
186 @param handle - session handle obtained via accept/connects
188 define reset_session {
194 /** \brief client->vpp reset session reply
195 @param client_index - opaque cookie to identify the sender
196 client to vpp direction only
197 @param context - sender context, to match reply w/ request
198 @param retval - return code for the request
199 @param handle - session handle obtained via accept/connect
201 define reset_session_reply {
208 /** \brief Bind to an ip:port pair for a given transport protocol
209 @param client_index - opaque cookie to identify the sender
210 @param context - sender context, to match reply w/ request
211 @param vrf - bind namespace
212 @param is_ip4 - flag that is 1 if ip address family is IPv4
213 @param ip - ip address
215 @param proto - protocol 0 - TCP 1 - UDP
216 @param options - socket options, fifo sizes, etc.
230 @param client_index - opaque cookie to identify the sender
231 @param context - sender context, to match reply w/ request
232 @param handle - bind handle obtained from bind reply
234 autoreply define unbind_sock {
240 /** \brief Connect to a remote peer
241 @param client_index - opaque cookie to identify the sender
242 @param context - sender context, to match reply w/ request
243 @param app_connect - application connection id to be returned in reply
244 @param vrf - connection namespace
245 @param is_ip4 - flag that is 1 if ip address family is IPv4
246 @param ip - ip address
248 @param proto - protocol 0 - TCP 1 - UDP
249 @param client_queue_address - client's API queue address. Non-zero when
250 used to perform redirects
251 @param options - socket options, fifo sizes, etc. when doing redirects
253 autoreply define connect_sock {
261 u64 client_queue_address;
265 /** \brief Bind reply
266 @param context - sender context, to match reply w/ request
267 @param handle - bind handle
268 @param retval - return code for the request
269 @param event_queue_address - vpp event queue address or 0 if this
270 connection shouldn't send events
271 @param segment_name_length - length of segment name
272 @param segment_name - name of segment client needs to attach to
274 define bind_sock_reply {
278 u64 server_event_queue_address;
280 u8 segment_name_length;
281 u8 segment_name[128];
284 /* Dummy connect message -- needed to satisfy api generators
286 * NEVER USED, doxygen tags elided on purpose.
288 define connect_session {
293 /** \brief vpp/server->client, connect reply -- used for all connect_* messages
294 @param context - sender context, to match reply w/ request
295 @param retval - return code for the request
296 @param handle - connection handle
297 @param server_rx_fifo - rx (vpp -> vpp-client) fifo address
298 @param server_tx_fifo - tx (vpp-client -> vpp) fifo address
299 @param vpp_event_queue_address - vpp's event queue address
300 @param segment_size - size of segment to be attached. Only for redirects.
301 @param segment_name_length - non-zero if the client needs to attach to
303 @param segment_name - set if the client needs to attach to the segment
305 define connect_session_reply {
311 u64 vpp_event_queue_address;
313 u8 segment_name_length;
314 u8 segment_name[128];
317 /** \brief enable/disable session layer
318 @param client_index - opaque cookie to identify the sender
319 client to vpp direction only
320 @param context - sender context, to match reply w/ request
321 @param is_enable - disable session layer if 0, enable otherwise
323 autoreply define session_enable_disable {
331 * eval: (c-set-style "gnu")