44 #if LWIP_ICMP6 && LWIP_IPV6
60 #ifndef LWIP_ICMP6_DATASIZE
61 #define LWIP_ICMP6_DATASIZE 8
63 #if LWIP_ICMP6_DATASIZE == 0
64 #define LWIP_ICMP6_DATASIZE 8
68 static void icmp6_send_response(
struct pbuf *p,
u8_t code,
u32_t data,
u8_t type);
81 icmp6_input(
struct pbuf *p,
struct netif *inp)
85 const ip6_addr_t *reply_src;
103 ip6_current_dest_addr()) != 0) {
113 switch (icmp6hdr->type) {
123 #if LWIP_IPV6_FORWARD
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(),
230 icmp6_packet_too_big(
struct pbuf *p,
u32_t mtu)
276 const ip6_addr_t *reply_src;
277 ip6_addr_t *reply_dest;
278 ip6_addr_t reply_src_local, reply_dest_local;
290 LWIP_ASSERT(
"check that first pbuf can hold icmp 6message",
294 icmp6hdr->type = type;
295 icmp6hdr->code = code;
296 icmp6hdr->data = data;
310 ip6_addr_copy(reply_dest_local, ip6hdr->src);
311 ip6_addr_copy(reply_src_local, ip6hdr->dest);
312 reply_dest = &reply_dest_local;
313 reply_src = &reply_src_local;
314 netif = ip6_route(reply_src, reply_dest);
324 reply_dest = ip6_current_src_addr();
327 reply_src =
ip_2_ip6(ip6_select_source_address(
netif, reply_dest));
328 if (reply_src ==
NULL) {
337 icmp6hdr->chksum = 0;
338 #if CHECKSUM_GEN_ICMP6
341 reply_src, reply_dest);