[riot-notifications] [RIOT] universal_addresses: configure sizes according to the used modules (#3658)
Cenk Gündoğan
notifications at github.com
Fri Sep 4 15:17:27 CEST 2015
> @@ -28,7 +28,18 @@ extern "C" {
> #include <stdint.h>
> #include <stdlib.h>
>
> -#define UNIVERSAL_ADDRESS_SIZE (16) /**< size of the used addresses in bytes */
> +/** @brief size of the used addresses in bytes */
> +/* determine the widest possible address type */
> +#ifndef UNIVERSAL_ADDRESS_SIZE
> +#define UNIVERSAL_ADDRESS_SIZE (0) /* rather senseless default, should
> + trigger warnings */
> +#endif
> +
> +/* IPv6 address has 128 bit -> 16 bytes */
> +#if defined(MODULE_GNRC_IPV6) && ((IPV6_ADDR_BIT_LEN >> 3) > UNIVERSAL_ADDRESS_SIZE)
to be more GNRC agnostic: you could use `MODULE_IPV6_ADDR` here instead.
---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/3658/files#r38750090
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20150904/bf48d812/attachment.html>
More information about the notifications
mailing list