56 #ifndef LWIP_HDR_PROT_IP4_H 57 #define LWIP_HDR_PROT_IP4_H 68 #ifdef PACK_STRUCT_USE_INCLUDES 69 # include "arch/bpstruct.h" 73 PACK_STRUCT_FIELD(u32_t addr);
76 #ifdef PACK_STRUCT_USE_INCLUDES 77 # include "arch/epstruct.h" 85 #ifdef PACK_STRUCT_USE_INCLUDES 86 # include "arch/bpstruct.h" 101 #define IP_RF 0x8000U 102 #define IP_DF 0x4000U 103 #define IP_MF 0x2000U 104 #define IP_OFFMASK 0x1fffU 114 } PACK_STRUCT_STRUCT;
116 #ifdef PACK_STRUCT_USE_INCLUDES 117 # include "arch/epstruct.h" 121 #define IPH_V(hdr) ((hdr)->_v_hl >> 4) 122 #define IPH_HL(hdr) ((hdr)->_v_hl & 0x0f) 123 #define IPH_TOS(hdr) ((hdr)->_tos) 124 #define IPH_LEN(hdr) ((hdr)->_len) 125 #define IPH_ID(hdr) ((hdr)->_id) 126 #define IPH_OFFSET(hdr) ((hdr)->_offset) 127 #define IPH_TTL(hdr) ((hdr)->_ttl) 128 #define IPH_PROTO(hdr) ((hdr)->_proto) 129 #define IPH_CHKSUM(hdr) ((hdr)->_chksum) 132 #define IPH_VHL_SET(hdr, v, hl) (hdr)->_v_hl = (u8_t)((((v) << 4) | (hl))) 133 #define IPH_TOS_SET(hdr, tos) (hdr)->_tos = (tos) 134 #define IPH_LEN_SET(hdr, len) (hdr)->_len = (len) 135 #define IPH_ID_SET(hdr, id) (hdr)->_id = (id) 136 #define IPH_OFFSET_SET(hdr, off) (hdr)->_offset = (off) 137 #define IPH_TTL_SET(hdr, ttl) (hdr)->_ttl = (u8_t)(ttl) 138 #define IPH_PROTO_SET(hdr, proto) (hdr)->_proto = (u8_t)(proto) 139 #define IPH_CHKSUM_SET(hdr, chksum) (hdr)->_chksum = (chksum)
#define PACK_STRUCT_BEGIN
#define PACK_STRUCT_FLD_S(x)
#define PACK_STRUCT_FLD_8(x)
#define PACK_STRUCT_FIELD(x)