59 #ifndef LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN 60 #define LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN 1 64 #define ICMP_DEST_UNREACH_DATASIZE 8 66 static void icmp_send_response(
struct pbuf *p,
u8_t type,
u8_t code);
78 icmp_input(
struct pbuf *p,
struct netif *inp)
109 #if !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING 112 #if !LWIP_MULTICAST_PING 118 #if !LWIP_BROADCAST_PING 145 #if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN 153 LWIP_ASSERT(
"icmp_input: moving p->payload to ip header failed\n", 0);
162 LWIP_ASSERT(
"check that first pbuf can hold struct the ICMP header",
166 LWIP_ASSERT(
"icmp_input: copying to new pbuf failed\n", 0);
172 LWIP_ASSERT(
"icmp_input: restoring original p->payload failed\n", 0);
182 LWIP_ASSERT(
"icmp_input: restoring original p->payload failed\n", 0);
215 LWIP_ASSERT(
"Can't move over header in packet", 0);
239 #if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN 263 #if IP_FORWARD || IP_REASSEMBLY 274 icmp_send_response(p,
ICMP_TE, t);
288 icmp_send_response(
struct pbuf *p,
u8_t type,
u8_t code)
305 LWIP_ASSERT(
"check that first pbuf can hold icmp message",
316 icmphdr->type = type;
317 icmphdr->code = code;
323 IP_HLEN + ICMP_DEST_UNREACH_DATASIZE);
#define SMEMCPY(dst, src, len)
err_t pbuf_copy(struct pbuf *p_to, struct pbuf *p_from) ICACHE_FLASH_ATTR
u16_t inet_chksum(void *dataptr, u16_t len) ICACHE_FLASH_ATTR
#define ip_current_src_addr()
ip_addr_t current_iphdr_dest
#define ip_addr_debug_print(debug, ipaddr)
#define ICACHE_FLASH_ATTR
#define ICMP_STATS_INC(x)
#define ip_current_dest_addr()
#define snmp_inc_icmpoutmsgs()
#define LWIP_DEBUGF(debug, message)
#define ip_addr_copy(dest, src)
u16_t inet_chksum_pbuf(struct pbuf *p) ICACHE_FLASH_ATTR
err_t ip_output_if(struct pbuf *p, ip_addr_t *src, ip_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif) ICACHE_FLASH_ATTR
#define snmp_inc_icmpouttimeexcds()
#define snmp_inc_icmpinerrors()
typedefPACK_STRUCT_END struct ip_addr ip_addr_t
#define IPH_CHKSUM_SET(hdr, chksum)
u8_t pbuf_free(struct pbuf *p) ICACHE_FLASH_ATTR
#define IPH_TTL_SET(hdr, ttl)
#define ip_addr_isbroadcast(ipaddr, netif)
u8_t pbuf_header(struct pbuf *p, s16_t header_size) ICACHE_FLASH_ATTR
#define LWIP_ASSERT(message, assertion)
err_t ip_output(struct pbuf *p, ip_addr_t *src, ip_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto) ICACHE_FLASH_ATTR
#define ip_addr_ismulticast(addr1)
#define snmp_inc_icmpoutechoreps()
struct pbuf * pbuf_alloc(pbuf_layer l, u16_t length, pbuf_type type) ICACHE_FLASH_ATTR
#define snmp_inc_icmpinmsgs()
#define ICMPH_TYPE_SET(hdr, t)