X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fsession%2Fapplication_interface.h;h=4b7a2dfa66c2f1835764980b3fa1f98cf057c3e9;hb=refs%2Fchanges%2F75%2F10475%2F17;hp=5e1fe8ee528e3c55f267f7b1d6966413975936ad;hpb=cea194d8f973a2f2b5ef72d212533057174cc70a;p=vpp.git diff --git a/src/vnet/session/application_interface.h b/src/vnet/session/application_interface.h index 5e1fe8ee528..4b7a2dfa66c 100644 --- a/src/vnet/session/application_interface.h +++ b/src/vnet/session/application_interface.h @@ -39,9 +39,7 @@ typedef struct _vnet_app_attach_args_t /* * Results */ - u8 *segment_name; - u32 segment_name_length; - u32 segment_size; + ssvm_private_t *segment; u64 app_event_queue_address; u32 app_index; } vnet_app_attach_args_t; @@ -56,11 +54,7 @@ typedef struct _vnet_bind_args_t union { char *uri; - struct - { - session_endpoint_t sep; - transport_proto_t proto; - }; + session_endpoint_t sep; }; u32 app_index; @@ -86,54 +80,44 @@ typedef struct _vnet_unbind_args_t typedef struct _vnet_connect_args { - union - { - char *uri; - struct - { - session_endpoint_t sep; - transport_proto_t proto; - }; - }; + char *uri; + session_endpoint_t sep; u32 app_index; u32 api_context; /* Used for redirects */ void *mp; - - /* used for proxy connections */ - u64 server_handle; + session_handle_t session_handle; } vnet_connect_args_t; typedef struct _vnet_disconnect_args_t { - u64 handle; + session_handle_t handle; u32 app_index; } vnet_disconnect_args_t; /* Application attach options */ typedef enum { - APP_EVT_QUEUE_SIZE, APP_OPTIONS_FLAGS, - APP_OPTIONS_PREALLOC_FIFO_PAIRS, + APP_OPTIONS_EVT_QUEUE_SIZE, + APP_OPTIONS_SEGMENT_SIZE, + APP_OPTIONS_ADD_SEGMENT_SIZE, APP_OPTIONS_PRIVATE_SEGMENT_COUNT, - APP_OPTIONS_PRIVATE_SEGMENT_SIZE, + APP_OPTIONS_RX_FIFO_SIZE, + APP_OPTIONS_TX_FIFO_SIZE, + APP_OPTIONS_PREALLOC_FIFO_PAIRS, APP_OPTIONS_NAMESPACE, APP_OPTIONS_NAMESPACE_SECRET, - SESSION_OPTIONS_SEGMENT_SIZE, - SESSION_OPTIONS_ADD_SEGMENT_SIZE, - SESSION_OPTIONS_RX_FIFO_SIZE, - SESSION_OPTIONS_TX_FIFO_SIZE, - SESSION_OPTIONS_PREALLOCATED_FIFO_PAIRS, - SESSION_OPTIONS_ACCEPT_COOKIE, - SESSION_OPTIONS_N_OPTIONS + APP_OPTIONS_PROXY_TRANSPORT, + APP_OPTIONS_ACCEPT_COOKIE, + APP_OPTIONS_N_OPTIONS } app_attach_options_index_t; #define foreach_app_options_flags \ _(ACCEPT_REDIRECT, "Use FIFO with redirects") \ _(ADD_SEGMENT, "Add segment and signal app if needed") \ - _(BUILTIN_APP, "Application is builtin") \ + _(IS_BUILTIN, "Application is builtin") \ _(IS_PROXY, "Application is proxying") \ _(USE_GLOBAL_SCOPE, "App can use global session scope") \ _(USE_LOCAL_SCOPE, "App can use local session scope") @@ -168,6 +152,9 @@ int api_parse_session_handle (u64 handle, u32 * session_index, u32 * thread_index); +void send_local_session_disconnect_callback (u32 app_index, + local_session_t * ls); + #endif /* __included_uri_h__ */ /*