mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-03 21:14:40 +08:00
Move declaration of struct ip4_addr_packed and ip4_addr_p_t to prot/ip4.h
The types are used in structs declared in ip4.h.
This commit is contained in:
parent
92183bb354
commit
a6bc422729
@ -52,24 +52,9 @@ struct ip4_addr {
|
||||
u32_t addr;
|
||||
};
|
||||
|
||||
/** This is the packed version of ip4_addr_t,
|
||||
used in network headers that are itself packed */
|
||||
#ifdef PACK_STRUCT_USE_INCLUDES
|
||||
# include "arch/bpstruct.h"
|
||||
#endif
|
||||
PACK_STRUCT_BEGIN
|
||||
struct ip4_addr_packed {
|
||||
PACK_STRUCT_FIELD(u32_t addr);
|
||||
} PACK_STRUCT_STRUCT;
|
||||
PACK_STRUCT_END
|
||||
#ifdef PACK_STRUCT_USE_INCLUDES
|
||||
# include "arch/epstruct.h"
|
||||
#endif
|
||||
|
||||
/** ip4_addr_t uses a struct for convenience only, so that the same defines can
|
||||
* operate both on ip4_addr_t as well as on ip4_addr_p_t. */
|
||||
typedef struct ip4_addr ip4_addr_t;
|
||||
typedef struct ip4_addr_packed ip4_addr_p_t;
|
||||
|
||||
/**
|
||||
* struct ipaddr2 is used in the definition of the ARP packet format in
|
||||
|
@ -44,6 +44,22 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** This is the packed version of ip4_addr_t,
|
||||
used in network headers that are itself packed */
|
||||
#ifdef PACK_STRUCT_USE_INCLUDES
|
||||
# include "arch/bpstruct.h"
|
||||
#endif
|
||||
PACK_STRUCT_BEGIN
|
||||
struct ip4_addr_packed {
|
||||
PACK_STRUCT_FIELD(u32_t addr);
|
||||
} PACK_STRUCT_STRUCT;
|
||||
PACK_STRUCT_END
|
||||
#ifdef PACK_STRUCT_USE_INCLUDES
|
||||
# include "arch/epstruct.h"
|
||||
#endif
|
||||
|
||||
typedef struct ip4_addr_packed ip4_addr_p_t;
|
||||
|
||||
/* Size of the IPv4 header. Same as 'sizeof(struct ip_hdr)'. */
|
||||
#define IP_HLEN 20
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user