+ rv = vcom_socket_copy_ep_to_sockaddr (__addr, __len, &ep);
+
+ return rv;
+}
+
+ssize_t
+vcom_socket_send (int __fd, const void *__buf, size_t __n, int __flags)
+{
+ return vcom_socket_sendto (__fd, __buf, __n, __flags, NULL, 0);
+}
+
+/* NOTE: this function is not thread safe or 32-bit friendly */
+ssize_t
+vcom_socket_sendfile (int __out_fd, int __in_fd, off_t * __offset,
+ size_t __len)
+{
+ vcom_socket_main_t *vsm = &vcom_socket_main;
+ uword *p;
+ vcom_socket_t *vsock;
+ size_t n_bytes_left = __len;
+ u32 out_sockidx, out_sid = ~0;
+ size_t bytes_to_read;
+ int nbytes;
+ int rv, errno_val;
+ ssize_t results = 0;
+ u8 eagain = 0;
+
+ if (VCOM_DEBUG > 2)
+ clib_warning ("[%d] __out_fd %d, __in_fd %d, __offset %p, __len %lu",
+ getpid (), __out_fd, __in_fd, __offset, __len);
+
+ p = hash_get (vsm->sockidx_by_fd, __out_fd);
+ if (!p)
+ {
+ clib_warning ("[%d] ERROR: invalid __out_fd (%d), fd lookup failed!",
+ getpid (), __len);
+ return -EBADF;
+ }
+ out_sockidx = p[0];
+ vsock = pool_elt_at_index (vsm->vsockets, out_sockidx);
+ if (!vsock)
+ {
+ clib_warning ("[%d] ERROR: invalid __out_fd (%d) / out_sockidx %u, "
+ "missing vsock pool element!",
+ getpid (), __len, out_sockidx);
+ return -ENOTSOCK;
+ }
+ out_sid = vsock->sid;
+ if (vsock->type != SOCKET_TYPE_VPPCOM_BOUND)