44#if LWIP_ICMP6 && LWIP_IPV6
60#if !LWIP_ICMP6_DATASIZE || (LWIP_ICMP6_DATASIZE > (IP6_MIN_MTU_LENGTH - IP6_HLEN - ICMP6_HLEN))
61#undef LWIP_ICMP6_DATASIZE
62#define LWIP_ICMP6_DATASIZE (IP6_MIN_MTU_LENGTH - IP6_HLEN - ICMP6_HLEN)
68 u8_t type,
const ip6_addr_t *src_addr,
const ip6_addr_t *dest_addr);
70 u8_t type,
const ip6_addr_t *src_addr,
const ip6_addr_t *dest_addr,
struct netif *
netif);
87 const ip6_addr_t *reply_src;
105 ip6_current_dest_addr()) != 0) {
115 switch (icmp6hdr->type) {
136#if !LWIP_MULTICAST_PING
138 if (ip6_addr_ismulticast(ip6_current_dest_addr())) {
165#if LWIP_MULTICAST_PING
166 if (ip6_addr_ismulticast(ip6_current_dest_addr())) {
167 reply_src =
ip_2_ip6(ip6_select_source_address(inp, ip6_current_src_addr()));
168 if (reply_src ==
NULL) {
179 reply_src = ip6_current_dest_addr();
185#if CHECKSUM_GEN_ICMP6
194 ip6_output_if(
r, reply_src, ip6_current_src_addr(),
236icmp6_packet_too_big(
struct pbuf *
p,
u32_t mtu)
274 const ip6_addr_t *src_addr,
const ip6_addr_t *dest_addr)
276 icmp6_send_response_with_addrs(
p,
c, 0,
ICMP6_TYPE_TE, src_addr, dest_addr);
311 const struct ip6_addr *reply_src, *reply_dest;
315 reply_dest = ip6_current_src_addr();
318 reply_src =
ip_2_ip6(ip6_select_source_address(
netif, reply_dest));
319 if (reply_src ==
NULL) {
323 icmp6_send_response_with_addrs_and_netif(
p,
code,
data,
type, reply_src, reply_dest,
netif);
347 const ip6_addr_t *src_addr,
const ip6_addr_t *dest_addr)
349 const struct ip6_addr *reply_src, *reply_dest;
353 LWIP_ASSERT(
"must provide both source and destination", src_addr !=
NULL);
354 LWIP_ASSERT(
"must provide both source and destination", dest_addr !=
NULL);
358 IP6_ADDR_ZONECHECK(src_addr);
359 IP6_ADDR_ZONECHECK(dest_addr);
361 reply_dest = src_addr;
362 reply_src = dest_addr;
363 netif = ip6_route(reply_src, reply_dest);
368 icmp6_send_response_with_addrs_and_netif(
p,
code,
data,
type, reply_src,
386 const ip6_addr_t *reply_src,
const ip6_addr_t *reply_dest,
struct netif *
netif)
400 LWIP_ASSERT(
"check that first pbuf can hold icmp6 header",
404 icmp6hdr->type =
type;
405 icmp6hdr->code =
code;
412 icmp6hdr->chksum = 0;
413#if CHECKSUM_GEN_ICMP6
416 reply_src, reply_dest);
#define LWIP_DEBUGF(debug, message)
#define LWIP_ASSERT(message, assertion)
#define ip_current_netif()
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLdouble GLdouble GLdouble r
GLdouble GLdouble GLdouble GLdouble q
GLsizei const GLvoid * pointer
#define CHECKSUM_CHECK_ICMP6
#define LWIP_ICMP6_DATASIZE
struct pbuf * pbuf_alloc(pbuf_layer layer, u16_t length, pbuf_type type)
u8_t pbuf_free(struct pbuf *p)
err_t pbuf_copy(struct pbuf *p_to, const struct pbuf *p_from)
err_t pbuf_copy_partial_pbuf(struct pbuf *p_to, const struct pbuf *p_from, u16_t copy_len, u16_t offset)
int const JOCTET unsigned int datalen
#define IF__NETIF_CHECKSUM_ENABLED(netif, chksumflag)
#define ICMP6_STATS_INC(x)