[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT/LWIP PATCH 3/5] sockets: Add recvmsg() function


  • To: Costin Lupu <costin.lupu@xxxxxxxxx>, "minios-devel@xxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxx>
  • From: Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
  • Date: Mon, 9 Sep 2019 14:40:27 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=stud.acs.upb.ro; dmarc=pass action=none header.from=stud.acs.upb.ro; dkim=pass header.d=stud.acs.upb.ro; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8T9WDYz5WUYozUfwQ5yEiut7zkJOr1v2dBCfc0lFbDk=; b=JiUBfKfwbZW2F0A+PBr1ApAYVeMU1TSgThWFeYGqOLrXSHs/hbL1cgePebmpClVQN9+5qD7twiTI2NSaaV/mayO4/NXstPaVtbhxRVzpzcWcqFhzSzuPXGdCJK2aN+c06ekV0OwLJ73fKpg0omKeG19EdgKbpGa4sG+4Q7+CqjG7Z1h+e+wBwE7QQltdG43Aze0f7NH+UaG+4pSx3niEa1cEXLkYvE98faaXqxTs4Vc+NWwUP1EIdnSkvb1Zh4udzZed8CsFNTzwqa2Nt0/mlISKoVioEU7RU7L/dLdp1CYWAD+1BK/Bvf1nUDkBU1Kvw9Yy6+Yz8doSAiMjQOhRKg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H0PP/PrcLvFMAZGVWGwvc6SQfmqABorFFQqy7n/yAgw9vDVl9YJ8D/vE/2VKhIzg8P5PifcPRwKsDLpNOQ5WO4AeWpCG2T1uJGJCmQ3nQ21gGtWlUzVtbdQVoIkk5z/Tnt73rOIHHcpJDPdEI6vRlodeMsGv0tl4Ld17LxXwSiPgqqQ1GVf8pthRZhCukFRPz6H8MmfLBQXremgPqBLl5eF+lcmpGaiSEkGxSPXHLI4o8j49Qguyszz18aBtf4r8JPi2iAljso67KFcGLupFcBsQdTY+wMGnTL2AGd1PqqUrtiaxUtuVinO20kaYunC9HeJ6roiYD5RDvkJ6wyFTOg==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=vlad_andrei.badoiu@xxxxxxxxxxxxxxx;
  • Cc: "felipe.huici@xxxxxxxxx" <felipe.huici@xxxxxxxxx>, "simon.kuenzer@xxxxxxxxx" <simon.kuenzer@xxxxxxxxx>
  • Delivery-date: Mon, 09 Sep 2019 14:40:34 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Thread-index: AQHVY1RC4bI3a8kXOUqEnTXiHVnO86cjcmAA
  • Thread-topic: [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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.