+static int
+mq_send_session_accepted_cb (stream_session_t * s)
+{
+ app_worker_t *app_wrk = app_worker_get (s->app_wrk_index);
+ svm_msg_q_msg_t _msg, *msg = &_msg;
+ svm_msg_q_t *vpp_queue, *app_mq;
+ transport_proto_vft_t *tp_vft;
+ transport_connection_t *tc;
+ stream_session_t *listener;
+ session_accepted_msg_t *mp;
+ session_event_t *evt;
+ application_t *app;
+
+ app = application_get (app_wrk->app_index);
+ app_mq = app_wrk->event_queue;
+ svm_msg_q_lock_and_alloc_msg_w_ring (app_mq, SESSION_MQ_CTRL_EVT_RING,
+ SVM_Q_WAIT, msg);
+
+ evt = svm_msg_q_msg_data (app_mq, msg);
+ memset (evt, 0, sizeof (*evt));
+ evt->event_type = SESSION_CTRL_EVT_ACCEPTED;
+ mp = (session_accepted_msg_t *) evt->data;
+ mp->context = app->app_index;
+ mp->server_rx_fifo = pointer_to_uword (s->server_rx_fifo);
+ mp->server_tx_fifo = pointer_to_uword (s->server_tx_fifo);
+
+ if (session_has_transport (s))
+ {
+ listener = listen_session_get (s->listener_index);
+ mp->listener_handle = listen_session_get_handle (listener);
+ if (application_is_proxy (app))
+ {
+ listener =
+ app_worker_first_listener (app_wrk, session_get_fib_proto (s),
+ session_get_transport_proto (s));
+ if (listener)
+ mp->listener_handle = listen_session_get_handle (listener);
+ }
+ vpp_queue = session_manager_get_vpp_event_queue (s->thread_index);
+ mp->vpp_event_queue_address = pointer_to_uword (vpp_queue);
+ mp->handle = session_handle (s);
+ tp_vft = transport_protocol_get_vft (session_get_transport_proto (s));
+ tc = tp_vft->get_connection (s->connection_index, s->thread_index);
+ mp->port = tc->rmt_port;
+ mp->is_ip4 = tc->is_ip4;
+ clib_memcpy (&mp->ip, &tc->rmt_ip, sizeof (tc->rmt_ip));
+ }
+ else