+#define vl_api_map_stats_segment_t_print vl_noop_handler
+
+static void
+vl_api_map_stats_segment_t_handler (vl_api_map_stats_segment_t * mp)
+{
+ vl_api_map_stats_segment_reply_t *rmp;
+ stats_main_t *sm = &stats_main;
+ ssvm_private_t *ssvmp = &sm->stat_segment;
+ vl_api_registration_t *regp;
+ api_main_t *am = &api_main;
+ clib_file_t *cf;
+ vl_api_shm_elem_config_t *config = 0;
+ vl_shmem_hdr_t *shmem_hdr;
+ int rv = 0;
+
+ regp = vl_api_client_index_to_registration (mp->client_index);
+ if (regp == 0)
+ {
+ clib_warning ("API client disconnected");
+ return;
+ }
+ if (regp->registration_type != REGISTRATION_TYPE_SOCKET_SERVER)
+ rv = VNET_API_ERROR_INVALID_REGISTRATION;
+
+ rmp = vl_msg_api_alloc (sizeof (*rmp));
+ rmp->_vl_msg_id = htons (VL_API_MAP_STATS_SEGMENT_REPLY);
+ rmp->context = mp->context;
+ rmp->retval = htonl (rv);
+
+ vl_api_send_msg (regp, (u8 *) rmp);
+
+ if (rv != 0)
+ return;
+
+ /*
+ * We need the reply message to make it out the back door
+ * before we send the magic fd message so force a flush
+ */
+ cf = vl_api_registration_file (regp);
+ cf->write_function (cf);
+
+ /* Send the magic "here's your sign (aka fd)" socket message */
+ vl_sock_api_send_fd_msg (cf->file_descriptor, ssvmp->fd);
+}