32 #ifndef LWIP_HDR_ICMP_H 33 #define LWIP_HDR_ICMP_H 40 #if LWIP_IPV6 && LWIP_ICMP6 76 #ifdef PACK_STRUCT_USE_INCLUDES 93 #ifdef PACK_STRUCT_USE_INCLUDES 97 #define ICMPH_TYPE(hdr) ((hdr)->type) 98 #define ICMPH_CODE(hdr) ((hdr)->code) 101 #define ICMPH_TYPE_SET(hdr, t) ((hdr)->type = (t)) 102 #define ICMPH_CODE_SET(hdr, c) ((hdr)->code = (c)) 105 #if LWIP_IPV4 && LWIP_ICMP 107 void icmp_input(
struct pbuf *p,
struct netif *inp);
113 #if LWIP_IPV4 && LWIP_IPV6 114 #if LWIP_ICMP && LWIP_ICMP6 115 #define icmp_port_unreach(isipv6, pbuf) ((isipv6) ? \ 116 icmp6_dest_unreach(pbuf, ICMP6_DUR_PORT) : \ 117 icmp_dest_unreach(pbuf, ICMP_DUR_PORT)) 119 #define icmp_port_unreach(isipv6, pbuf) do{ if(!(isipv6)) { icmp_dest_unreach(pbuf, ICMP_DUR_PORT);}}while(0) 121 #define icmp_port_unreach(isipv6, pbuf) do{ if(isipv6) { icmp6_dest_unreach(pbuf, ICMP6_DUR_PORT);}}while(0) 123 #define icmp_port_unreach(isipv6, pbuf) 125 #elif LWIP_IPV6 && LWIP_ICMP6 126 #define icmp_port_unreach(isipv6, pbuf) icmp6_dest_unreach(pbuf, ICMP6_DUR_PORT) 127 #elif LWIP_IPV4 && LWIP_ICMP 128 #define icmp_port_unreach(isipv6, pbuf) icmp_dest_unreach(pbuf, ICMP_DUR_PORT) 130 #define icmp_port_unreach(isipv6, pbuf)
PACK_STRUCT_FIELD(u16_t chksum)
PACK_STRUCT_FLD_8(u8_t type)
#define PACK_STRUCT_BEGIN
PACK_STRUCT_BEGIN struct icmp_echo_hdr PACK_STRUCT_STRUCT