Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
lwip_icmp6.c File Reference
IPv6 version of ICMP, as per RFC 4443. More...
Go to the source code of this file.
Functions | |
| static void | icmp6_send_response (struct pbuf *p, u8_t code, u32_t data, u8_t type) |
| Send an ICMPv6 packet in response to an incoming packet. | |
| static void | icmp6_send_response_with_addrs (struct pbuf *p, u8_t code, u32_t data, u8_t type, const ip6_addr_t *src_addr, const ip6_addr_t *dest_addr) |
| Send an ICMPv6 packet in response to an incoming packet. | |
| static void | icmp6_send_response_with_addrs_and_netif (struct pbuf *p, u8_t code, u32_t data, u8_t type, const ip6_addr_t *reply_src, const ip6_addr_t *reply_dest, struct netif *netif) |
| Send an ICMPv6 packet (with srd/dst address and netif given). | |
| void | icmp6_input (struct pbuf *p, struct netif *inp) |
| Process an input ICMPv6 message. | |
| void | icmp6_dest_unreach (struct pbuf *p, enum icmp6_dur_code c) |
| Send an icmpv6 'destination unreachable' packet. | |
| void | icmp6_packet_too_big (struct pbuf *p, u32_t mtu) |
| Send an icmpv6 'packet too big' packet. | |
| void | icmp6_time_exceeded (struct pbuf *p, enum icmp6_te_code c) |
| Send an icmpv6 'time exceeded' packet. | |
| void | icmp6_time_exceeded_with_addrs (struct pbuf *p, enum icmp6_te_code c, const ip6_addr_t *src_addr, const ip6_addr_t *dest_addr) |
| Send an icmpv6 'time exceeded' packet, with explicit source and destination addresses. | |
| void | icmp6_param_problem (struct pbuf *p, enum icmp6_pp_code c, const void *pointer) |
| Send an icmpv6 'parameter problem' packet. | |
Detailed Description
IPv6 version of ICMP, as per RFC 4443.
Definition in file lwip_icmp6.c.
Function Documentation
| void icmp6_dest_unreach | ( | struct pbuf * | p, |
| enum icmp6_dur_code | c | ||
| ) |
Send an icmpv6 'destination unreachable' packet.
This function must be used only in direct response to a packet that is being received right now. Otherwise, address zones would be lost.
- Parameters:
-
p the input packet for which the 'unreachable' should be sent, p->payload pointing to the IPv6 header c ICMPv6 code for the unreachable type
Definition at line 220 of file lwip_icmp6.c.
Process an input ICMPv6 message.
Called by ip6_input.
Will generate a reply for echo requests. Other messages are forwarded to nd6_input, or mld6_input.
- Parameters:
-
p the mld packet, p->payload pointing to the icmpv6 header inp the netif on which this packet was received
Definition at line 83 of file lwip_icmp6.c.
| void icmp6_packet_too_big | ( | struct pbuf * | p, |
| u32_t | mtu | ||
| ) |
Send an icmpv6 'packet too big' packet.
This function must be used only in direct response to a packet that is being received right now. Otherwise, address zones would be lost.
- Parameters:
-
p the input packet for which the 'packet too big' should be sent, p->payload pointing to the IPv6 header mtu the maximum mtu that we can accept
Definition at line 236 of file lwip_icmp6.c.
| void icmp6_param_problem | ( | struct pbuf * | p, |
| enum icmp6_pp_code | c, | ||
| const void * | pointer | ||
| ) |
Send an icmpv6 'parameter problem' packet.
This function must be used only in direct response to a packet that is being received right now. Otherwise, address zones would be lost and the calculated offset would be wrong (calculated against ip6_current_header()).
- Parameters:
-
p the input packet for which the 'param problem' should be sent, p->payload pointing to the IP header c ICMPv6 code for the param problem type pointer the pointer to the byte where the parameter is found
Definition at line 292 of file lwip_icmp6.c.
| static void icmp6_send_response | ( | struct pbuf * | p, |
| u8_t | code, | ||
| u32_t | data, | ||
| u8_t | type | ||
| ) | [static] |
Send an ICMPv6 packet in response to an incoming packet.
The packet is sent *to* ip_current_src_addr() on ip_current_netif().
- Parameters:
-
p the input packet for which the response should be sent, p->payload pointing to the IPv6 header code Code of the ICMPv6 header data Additional 32-bit parameter in the ICMPv6 header type Type of the ICMPv6 header
Definition at line 309 of file lwip_icmp6.c.
| static void icmp6_send_response_with_addrs | ( | struct pbuf * | p, |
| u8_t | code, | ||
| u32_t | data, | ||
| u8_t | type, | ||
| const ip6_addr_t * | src_addr, | ||
| const ip6_addr_t * | dest_addr | ||
| ) | [static] |
Send an ICMPv6 packet in response to an incoming packet.
Call this function if the packet is NOT sent as a direct response to an incoming packet, but rather sometime later (e.g. for a fragment reassembly timeout). The caller must provide the zoned source and destination addresses from the original packet with the src_addr and dest_addr parameters. The reason for this approach is that while the addresses themselves are part of the original packet, their zone information is not, thus possibly resulting in a link-local response being sent over the wrong link.
- Parameters:
-
p the input packet for which the response should be sent, p->payload pointing to the IPv6 header code Code of the ICMPv6 header data Additional 32-bit parameter in the ICMPv6 header type Type of the ICMPv6 header src_addr original source address dest_addr original destination address
Definition at line 346 of file lwip_icmp6.c.
| static void icmp6_send_response_with_addrs_and_netif | ( | struct pbuf * | p, |
| u8_t | code, | ||
| u32_t | data, | ||
| u8_t | type, | ||
| const ip6_addr_t * | reply_src, | ||
| const ip6_addr_t * | reply_dest, | ||
| struct netif * | netif | ||
| ) | [static] |
Send an ICMPv6 packet (with srd/dst address and netif given).
- Parameters:
-
p the input packet for which the response should be sent, p->payload pointing to the IPv6 header code Code of the ICMPv6 header data Additional 32-bit parameter in the ICMPv6 header type Type of the ICMPv6 header reply_src source address of the packet to send reply_dest destination address of the packet to send netif netif to send the packet
Definition at line 385 of file lwip_icmp6.c.
| void icmp6_time_exceeded | ( | struct pbuf * | p, |
| enum icmp6_te_code | c | ||
| ) |
Send an icmpv6 'time exceeded' packet.
This function must be used only in direct response to a packet that is being received right now. Otherwise, address zones would be lost.
- Parameters:
-
p the input packet for which the 'time exceeded' should be sent, p->payload pointing to the IPv6 header c ICMPv6 code for the time exceeded type
Definition at line 252 of file lwip_icmp6.c.
| void icmp6_time_exceeded_with_addrs | ( | struct pbuf * | p, |
| enum icmp6_te_code | c, | ||
| const ip6_addr_t * | src_addr, | ||
| const ip6_addr_t * | dest_addr | ||
| ) |
Send an icmpv6 'time exceeded' packet, with explicit source and destination addresses.
This function may be used to send a response sometime after receiving the packet for which this response is meant. The provided source and destination addresses are used primarily to retain their zone information.
- Parameters:
-
p the input packet for which the 'time exceeded' should be sent, p->payload pointing to the IPv6 header c ICMPv6 code for the time exceeded type src_addr source address of the original packet, with zone information dest_addr destination address of the original packet, with zone information
Definition at line 273 of file lwip_icmp6.c.
Generated on Tue Jul 12 2022 13:55:13 by
1.7.2