typedef struct _vnet_app_attach_args_t
{
- /** Binary API client index */
- u32 api_client_index;
-
- /** Application name. Used by builtin apps */
- u8 *name;
-
- /** Application and segment manager options */
- u64 *options;
-
- /** ID of the namespace the app has access to */
- u8 *namespace_id;
-
- /** Session to application callback functions */
- session_cb_vft_t *session_cb_vft;
-
- /*
- * Results
- */
- ssvm_private_t *segment;
+#define _(_type, _name) _type _name;
+ foreach_app_init_args
+#undef _
+ ssvm_private_t * segment;
svm_msg_q_t *app_evt_q;
- u32 app_index;
} vnet_app_attach_args_t;
typedef struct _vnet_app_detach_args_t
{
union
{
- char *uri;
+ session_endpoint_cfg_t sep_ext;
session_endpoint_t sep;
+ char *uri;
};
u32 app_index;
+ u32 wrk_map_index;
/*
* Results
union
{
char *uri;
- u64 handle;
+ u64 handle; /**< Session handle */
};
- u32 app_index;
+ u32 app_index; /**< Owning application index */
+ u32 wrk_map_index; /**< App's local pool worker index */
} vnet_unbind_args_t;
typedef struct _vnet_connect_args
{
union
{
+ session_endpoint_cfg_t sep_ext;
+ session_endpoint_t sep;
char *uri;
- session_endpoint_extended_t sep;
};
u32 app_index;
+ u32 wrk_map_index;
u32 api_context;
session_handle_t session_handle;
_(ACCEPT_REDIRECT, "Use FIFO with redirects") \
_(ADD_SEGMENT, "Add segment and signal app if needed") \
_(IS_BUILTIN, "Application is builtin") \
+ _(IS_TRANSPORT_APP, "Application is a transport proto") \
_(IS_PROXY, "Application is proxying") \
_(USE_GLOBAL_SCOPE, "App can use global session scope") \
_(USE_LOCAL_SCOPE, "App can use local session scope") \
#undef _
} app_session_t;
+typedef struct session_bound_msg_
+{
+ u32 context;
+ u64 handle;
+ i32 retval;
+ u8 lcl_is_ip4;
+ u8 lcl_ip[16];
+ u16 lcl_port;
+ u64 rx_fifo;
+ u64 tx_fifo;
+ u64 vpp_evt_q;
+ u32 segment_size;
+ u8 segment_name_length;
+ u8 segment_name[128];
+} __clib_packed session_bound_msg_t;
+
typedef struct session_accepted_msg_
{
u32 context;
SVM_Q_WAIT, &app_evt->msg);
svm_msg_q_unlock (mq);
app_evt->evt = svm_msg_q_msg_data (mq, &app_evt->msg);
- memset (app_evt->evt, 0, sizeof (*app_evt->evt));
+ clib_memset (app_evt->evt, 0, sizeof (*app_evt->evt));
app_evt->evt->event_type = evt_type;
}
actual_write = clib_min (len, max_enqueue);
hdr.data_length = actual_write;
hdr.data_offset = 0;
- clib_memcpy (&hdr.rmt_ip, &at->rmt_ip, sizeof (ip46_address_t));
+ clib_memcpy_fast (&hdr.rmt_ip, &at->rmt_ip, sizeof (ip46_address_t));
hdr.is_ip4 = at->is_ip4;
hdr.rmt_port = at->rmt_port;
- clib_memcpy (&hdr.lcl_ip, &at->lcl_ip, sizeof (ip46_address_t));
+ clib_memcpy_fast (&hdr.lcl_ip, &at->lcl_ip, sizeof (ip46_address_t));
hdr.lcl_port = at->lcl_port;
rv = svm_fifo_enqueue_nowait (f, sizeof (hdr), (u8 *) & hdr);
ASSERT (rv == sizeof (hdr));