Fix session connect_* api message handling.
[vpp.git] / src / vnet / session / session.api
index e207e46..30d2ae9 100644 (file)
@@ -49,26 +49,17 @@ define application_attach_reply {
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
 */
- define application_detach {
+autoreply define application_detach {
     u32 client_index;
     u32 context;
  };
  
- /** \brief detach reply
-    @param context - sender context, to match reply w/ request
-    @param retval - return code for the request
-*/
-define application_detach_reply {
-    u32 context;
-    i32 retval;
-};
 /** \brief vpp->client, please map an additional shared memory segment
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
     @param segment_name - 
 */
-define map_another_segment {
+autoreply define map_another_segment {
     u32 client_index;
     u32 context;
     u32 segment_size;
@@ -83,7 +74,7 @@ define map_another_segment {
                  "tcp://::/0/80" [ipv6] etc.
     @param options - socket options, fifo sizes, etc.
 */
-define bind_uri {
+autoreply define bind_uri {
   u32 client_index;
   u32 context;
   u32 accept_cookie;
@@ -97,7 +88,7 @@ define bind_uri {
                  "tcp://::/0/80" [ipv6], etc.
     @param options - socket options, fifo sizes, etc.
 */
-define unbind_uri {
+autoreply define unbind_uri {
   u32 client_index;
   u32 context;
   u8 uri[128];
@@ -114,7 +105,7 @@ define unbind_uri {
     @param client_queue_address - binary API client queue address. Used by 
                                                          local server when connect was redirected.
 */
-define connect_uri {
+autoreply define connect_uri {
   u32 client_index;
   u32 context;
   u8 uri[128];
@@ -122,58 +113,6 @@ define connect_uri {
   u64 options[16];
 };
 
-/** \brief Bind reply
-    @param context - sender context, to match reply w/ request
-    @param retval - return code for the request
-*/
-define bind_uri_reply {
-    u32 context;
-    i32 retval;
-};
-
-/** \brief unbind reply
-    @param context - sender context, to match reply w/ request
-    @param retval - return code for the request
-*/
-define unbind_uri_reply {
-    u32 context;
-    i32 retval;
-};
-
-/** \brief vpp->client, connect reply
-    @param context - sender context, to match reply w/ request
-    @param retval - return code for the request
-    @param handle - session handle
-    @param server_rx_fifo - rx (vpp -> vpp-client) fifo address 
-    @param server_tx_fifo - tx (vpp-client -> vpp) fifo address 
-    @param vpp_event_queue_address - vpp's event queue address
-    @param segment_size - size of segment to be attached. Only for redirects.
-    @param segment_name_length - non-zero if the client needs to attach to 
-                                 the fifo segment. This should only happen 
-                                 if session was redirected.
-    @param segment_name - set if the client needs to attach to the segment
-*/
-define connect_uri_reply {
-  u32 context;
-  i32 retval;
-  u64 handle;
-  u64 server_rx_fifo;
-  u64 server_tx_fifo;
-  u64 vpp_event_queue_address;
-  u32 segment_size;
-  u8 segment_name_length;
-  u8 segment_name[128];
-};
-
-/** \brief client->vpp
-    @param context - sender context, to match reply w/ request
-    @param retval - return code for the request
-*/
-define map_another_segment_reply {
-    u32 context;
-    i32 retval;
-};
-
 /** \brief vpp->client, accept this session
     @param context - sender context, to match reply w/ request
     @param listener_handle - tells client which listener this pertains to
@@ -290,7 +229,7 @@ define bind_sock {
     @param context - sender context, to match reply w/ request
     @param handle - bind handle obtained from bind reply
 */
-define unbind_sock {
+autoreply define unbind_sock {
   u32 client_index;
   u32 context;
   u64 handle;
@@ -299,6 +238,7 @@ define unbind_sock {
 /** \brief Connect to a remote peer
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
+    @param app_connect - application connection id to be returned in reply
     @param vrf - connection namespace
     @param is_ip4 - flag that is 1 if ip address family is IPv4
     @param ip - ip address
@@ -308,7 +248,7 @@ define unbind_sock {
                                   used to perform redirects
     @param options - socket options, fifo sizes, etc. when doing redirects
 */
-define connect_sock {
+autoreply define connect_sock {
   u32 client_index;
   u32 context;
   u32 vrf;
@@ -339,16 +279,16 @@ define bind_sock_reply {
   u8 segment_name[128];
 };
 
-/** \brief unbind reply
-    @param context - sender context, to match reply w/ request
-    @param retval - return code for the request
+/* Dummy connect message -- needed to satisfy api generators
+*
+*  NEVER USED, doxygen tags elided on purpose.
 */
-define unbind_sock_reply {
+define connect_session {
+  u32 client_index;
   u32 context;
-  i32 retval;
 };
 
-/** \brief vpp/server->client, connect reply
+/** \brief vpp/server->client, connect reply -- used for all connect_* messages
     @param context - sender context, to match reply w/ request
     @param retval - return code for the request
     @param handle - connection handle
@@ -360,7 +300,7 @@ define unbind_sock_reply {
                                  the fifo segment
     @param segment_name - set if the client needs to attach to the segment
 */
-define connect_sock_reply {
+define connect_session_reply {
   u32 context;
   i32 retval;
   u64 handle;
@@ -378,23 +318,14 @@ define connect_sock_reply {
     @param context - sender context, to match reply w/ request
     @param is_enable - disable session layer if 0, enable otherwise
 */
-define session_enable_disable {
+autoreply define session_enable_disable {
   u32 client_index;
   u32 context;
   u8 is_enable;
 };
 
-/** \brief Reply for session enable/disable
-    @param context - returned sender context, to match reply w/ request
-    @param retval - return code
-*/
-define session_enable_disable_reply {
-  u32 context;
-  i32 retval;
-};
-
 /*
  * Local Variables:
  * eval: (c-set-style "gnu")
  * End:
- */
\ No newline at end of file
+ */