[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT/LWIP PATCH 3/5] sockets: Add recvmsg() function
Reviewed-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx> On 04.09.2019 22:09, Costin Lupu wrote: > Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx> > --- > exportsyms.uk | 1 + > include/sys/socket.h | 1 + > sockets.c | 19 +++++++++++++++++++ > 3 files changed, 21 insertions(+) > > diff --git a/exportsyms.uk b/exportsyms.uk > index 1ca43f8..2f9f4f6 100644 > --- a/exportsyms.uk > +++ b/exportsyms.uk > @@ -38,6 +38,7 @@ pbuf_ref > poll > recv > recvfrom > +recvmsg > select > send > sendmsg > diff --git a/include/sys/socket.h b/include/sys/socket.h > index aff064e..7e027b9 100644 > --- a/include/sys/socket.h > +++ b/include/sys/socket.h > @@ -70,6 +70,7 @@ int listen(int s, int backlog); > int recv(int s, void *mem, size_t len, int flags); > int recvfrom(int s, void *mem, size_t len, int flags, > struct sockaddr *from, socklen_t *fromlen); > +int recvmsg(int s, struct msghdr *msg, int flags); > int send(int s, const void *dataptr, size_t size, int flags); > int sendmsg(int s, const struct msghdr *message, int flags); > int sendto(int s, const void *dataptr, size_t size, int flags, > diff --git a/sockets.c b/sockets.c > index aa772da..1806846 100644 > --- a/sockets.c > +++ b/sockets.c > @@ -755,6 +755,25 @@ EXIT: > return ret; > } > > +int recvmsg(int s, struct msghdr *msg, int flags) > +{ > + int ret = 0; > + struct sock_net_file *file = NULL; > + > + file = sock_net_file_get(s); > + if (PTRISERR(file)) { > + LWIP_DEBUGF(SOCKETS_DEBUG, > + ("failed to identify socket descriptor\n")); > + ret = -1; > + SOCK_NET_SET_ERRNO(PTR2ERR(file)); > + goto EXIT; > + } > + ret = lwip_recvmsg(file->sock_fd, msg, flags); > + vfscore_put_file(file->vfscore_file); /* release refcount */ > +EXIT: > + return ret; > +} > + > int send(int s, const void *dataptr, size_t size, int flags) > { > int ret = 0; _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |