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

This commit is contained in:
Dirk Ziegelmeier 2016-12-06 09:36:36 +01:00
parent 1687721600
commit cc25c2634b
3 changed files with 16 additions and 16 deletions

View File

@ -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

View File

@ -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

View File

@ -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" {