From cc25c2634bcb0010ab910b955f2200395ea470a5 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Tue, 6 Dec 2016 09:36:36 +0100 Subject: [PATCH] Cleanup: move struct ip6_addr_packed and ip6_addr_p_t type to prot/ip6.h - these types are used in prot/ip6.h and prot/mld6.h --- src/include/lwip/ip6_addr.h | 15 --------------- src/include/lwip/prot/ip6.h | 15 +++++++++++++++ src/include/lwip/prot/mld6.h | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/include/lwip/ip6_addr.h b/src/include/lwip/ip6_addr.h index 14d0f7cf..1171df9e 100644 --- a/src/include/lwip/ip6_addr.h +++ b/src/include/lwip/ip6_addr.h @@ -58,23 +58,8 @@ struct ip6_addr { u32_t addr[4]; }; -/** This is the packed version of ip6_addr_t, - used in network headers that are itself packed */ -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/bpstruct.h" -#endif -PACK_STRUCT_BEGIN -struct ip6_addr_packed { - PACK_STRUCT_FIELD(u32_t addr[4]); -} PACK_STRUCT_STRUCT; -PACK_STRUCT_END -#ifdef PACK_STRUCT_USE_INCLUDES -# include "arch/epstruct.h" -#endif - /** IPv6 address */ typedef struct ip6_addr ip6_addr_t; -typedef struct ip6_addr_packed ip6_addr_p_t; #if BYTE_ORDER == BIG_ENDIAN diff --git a/src/include/lwip/prot/ip6.h b/src/include/lwip/prot/ip6.h index 4e3ca37d..6e1e2632 100644 --- a/src/include/lwip/prot/ip6.h +++ b/src/include/lwip/prot/ip6.h @@ -43,6 +43,21 @@ #ifdef __cplusplus extern "C" { #endif + +/** This is the packed version of ip6_addr_t, + used in network headers that are itself packed */ +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/bpstruct.h" +#endif +PACK_STRUCT_BEGIN +struct ip6_addr_packed { + PACK_STRUCT_FIELD(u32_t addr[4]); +} PACK_STRUCT_STRUCT; +PACK_STRUCT_END +#ifdef PACK_STRUCT_USE_INCLUDES +# include "arch/epstruct.h" +#endif +typedef struct ip6_addr_packed ip6_addr_p_t; #define IP6_HLEN 40 diff --git a/src/include/lwip/prot/mld6.h b/src/include/lwip/prot/mld6.h index 2664829b..be3a006a 100644 --- a/src/include/lwip/prot/mld6.h +++ b/src/include/lwip/prot/mld6.h @@ -38,7 +38,7 @@ #define LWIP_HDR_PROT_MLD6_H #include "lwip/arch.h" -#include "lwip/ip6_addr.h" +#include "lwip/prot/ip6.h" #ifdef __cplusplus extern "C" {