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

Re: [Minios-devel] [UNIKRAFT/LIBLWIP PATCH 1/2] Add IPv6 macro definitions


  • To: "minios-devel@xxxxxxxxxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
  • Date: Mon, 21 Oct 2019 11:52:11 +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=xE8R90VkdGxDuLAOyV5sKwJD7u/XCjdnMzJDI/sTR10=; b=lz9TWdQTdxe2z9CndPfFcuLAu6iQi7XZ+PMHhiCZJfkLhsbdIkt7SsIkeqrNcIQLknG2hzR5VKhQLx7jrDbfotWZsvIsUiw5kv2bKv1hVvMg3GTSB8avEf7qohTHXxcutEBKDBHgTzab2kkWyUSmHd681wJadyT/krgLjfrZHI+kwQZIUBskTAYsp51X64H/O0CpUHuLbJ07h2YG5yJXg5YkBF3g4QfhLk5eyLQAwupnfjf2GM1tAJ8UkC9dM2FfQsK4b9Z1uaPfPb1YiLNi/IUBasXwin8eboA+WfpG+wT4Bcfg74uzHaqb5u6VXnhhdhVRcPgqsYmKlObQsdVGcw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nDubnrTuHMVl6Zt8kEE6LsEO5kqbbCcrNpJFfqOsJ3kE5tLZh3r62SChaiHcLSkD4k/t1E0ksNUwKV+xLuytOd3QRpZkjt9OvJfXHHqqJirwLRamF2GyOyxlub++Ls7W7iuPrVOYT0iT0PNh2HPcTNt7W7gW/+S5NJjqNF/lY2x4uXpkKSWx3CdDP+WXebt31pMvxWzS6j48vPaIzE1mPRrEGEQUFc7MOA5K1wascjMX3L3yHulIj+7G472dUKd8nFG5YfCGDYBlVT2l9b931mU6pePxLbJLgL/ay217eO38CDeGZHzY+LgWbwhkDJjIAiRSU2w/IfiDWcBadXqvdg==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=vlad_andrei.badoiu@xxxxxxxxxxxxxxx;
  • Delivery-date: Mon, 21 Oct 2019 11:52:16 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Thread-index: AQHVbUlynsi7joh7QUCyvqj8DfPFnqdlMV0A
  • Thread-topic: [Minios-devel] [UNIKRAFT/LIBLWIP PATCH 1/2] Add IPv6 macro definitions

Thanks for the patch!

Reviewed-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>

On 17.09.2019 14:16, Felipe Huici wrote:
> Add IN6_IS_ADDR_MULTICAST, IN6_IS_ADDR_LINKLOCAL and
> IN6_IS_ADDR_MC_LINKLOCAL macro definitions. These are defined by libc,
> but not included in by our netinet/in.h glue when sockets are enabled,
> breaking builds that depend on these and sockets.
>
> Signed-off-by: Felipe Huici <felipe.huici@xxxxxxxxx>
> ---
>   include/netinet/in.h | 8 ++++++++
>   1 file changed, 8 insertions(+)
>
> diff --git a/include/netinet/in.h b/include/netinet/in.h
> index 07fcc7d..505a20a 100644
> --- a/include/netinet/in.h
> +++ b/include/netinet/in.h
> @@ -5,6 +5,14 @@
>   
>   #ifdef CONFIG_LWIP_SOCKET
>   #include <lwip/sockets.h>
> +/* Taken from musl's netinet/in.h */
> +#ifdef CONFIG_LWIP_IPV6
> +#define IN6_IS_ADDR_MULTICAST(a) (((uint8_t *) (a))[0] == 0xff)
> +#define IN6_IS_ADDR_LINKLOCAL(a) \
> +  ((((uint8_t *) (a))[0]) == 0xfe && (((uint8_t *) (a))[1] & 0xc0) == 0x80)
> +#define IN6_IS_ADDR_MC_LINKLOCAL(a) \
> +  (IN6_IS_ADDR_MULTICAST(a) && ((((uint8_t *) (a))[1] & 0xf) == 0x2))
> +#endif /* LWIP_IPV6 */
>   #else /* CONFIG_LWIP_SOCKET */
>   #include_next <netinet/in.h>
>   #endif
_______________________________________________
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®.