36 |
#include "lwip/pbuf.h" |
#include "lwip/pbuf.h" |
37 |
#include "lwip/ip_addr.h" |
#include "lwip/ip_addr.h" |
38 |
#include "lwip/netif.h" |
#include "lwip/netif.h" |
39 |
|
#include "lwip/ip.h" |
40 |
|
|
41 |
#ifdef PACK_STRUCT_USE_INCLUDES |
#ifdef PACK_STRUCT_USE_INCLUDES |
42 |
# include "arch/bpstruct.h" |
# include "arch/bpstruct.h" |
46 |
PACK_STRUCT_FIELD(u8_t addr[6]); |
PACK_STRUCT_FIELD(u8_t addr[6]); |
47 |
} PACK_STRUCT_STRUCT; |
} PACK_STRUCT_STRUCT; |
48 |
PACK_STRUCT_END |
PACK_STRUCT_END |
|
#ifdef PACK_STRUCT_USE_INCLUDES |
|
|
# include "arch/epstruct.h" |
|
|
#endif |
|
49 |
|
|
|
#ifdef PACK_STRUCT_USE_INCLUDES |
|
|
# include "arch/bpstruct.h" |
|
|
#endif |
|
50 |
PACK_STRUCT_BEGIN |
PACK_STRUCT_BEGIN |
51 |
struct eth_hdr { |
struct eth_hdr { |
52 |
PACK_STRUCT_FIELD(struct eth_addr dest); |
PACK_STRUCT_FIELD(struct eth_addr dest); |
54 |
PACK_STRUCT_FIELD(u16_t type); |
PACK_STRUCT_FIELD(u16_t type); |
55 |
} PACK_STRUCT_STRUCT; |
} PACK_STRUCT_STRUCT; |
56 |
PACK_STRUCT_END |
PACK_STRUCT_END |
57 |
|
|
58 |
|
PACK_STRUCT_BEGIN |
59 |
|
/** the ARP message */ |
60 |
|
struct etharp_hdr { |
61 |
|
PACK_STRUCT_FIELD(struct eth_hdr ethhdr); |
62 |
|
PACK_STRUCT_FIELD(u16_t hwtype); |
63 |
|
PACK_STRUCT_FIELD(u16_t proto); |
64 |
|
PACK_STRUCT_FIELD(u16_t _hwlen_protolen); |
65 |
|
PACK_STRUCT_FIELD(u16_t opcode); |
66 |
|
PACK_STRUCT_FIELD(struct eth_addr shwaddr); |
67 |
|
PACK_STRUCT_FIELD(struct ip_addr sipaddr); |
68 |
|
PACK_STRUCT_FIELD(struct eth_addr dhwaddr); |
69 |
|
PACK_STRUCT_FIELD(struct ip_addr dipaddr); |
70 |
|
} PACK_STRUCT_STRUCT; |
71 |
|
PACK_STRUCT_END |
72 |
|
|
73 |
|
PACK_STRUCT_BEGIN |
74 |
|
struct ethip_hdr { |
75 |
|
PACK_STRUCT_FIELD(struct eth_hdr eth); |
76 |
|
PACK_STRUCT_FIELD(struct ip_hdr ip); |
77 |
|
}; |
78 |
#ifdef PACK_STRUCT_USE_INCLUDES |
#ifdef PACK_STRUCT_USE_INCLUDES |
79 |
# include "arch/epstruct.h" |
# include "arch/epstruct.h" |
80 |
#endif |
#endif |