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"
76#ifdef PACK_STRUCT_USE_INCLUDES
77# include "arch/epstruct.h"
85#ifdef PACK_STRUCT_USE_INCLUDES
86# include "arch/bpstruct.h"
104#define IP_OFFMASK 0x1fffU
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_8(x)
#define PACK_STRUCT_FIELD(x)
#define PACK_STRUCT_FLD_S(x)