lwIP 2.2.1 Lightweight IP stack

Functions
icmp6.c File Reference
`#include "lwip/opt.h"`
`#include "lwip/icmp6.h"`
`#include "lwip/prot/icmp6.h"`
`#include "lwip/ip6.h"`
`#include "lwip/ip6_addr.h"`
`#include "lwip/inet_chksum.h"`
`#include "lwip/pbuf.h"`
`#include "lwip/netif.h"`
`#include "lwip/nd6.h"`
`#include "lwip/mld6.h"`
`#include "lwip/ip.h"`
`#include "lwip/stats.h"`
`#include <string.h>`

## Functions
void | icmp6_input (struct pbuf *p, struct netif *inp)
void | icmp6_dest_unreach (struct pbuf *p, enum icmp6_dur_code c)
void | icmp6_packet_too_big (struct pbuf *p, u32_t mtu)
void | icmp6_time_exceeded (struct pbuf *p, enum icmp6_te_code 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)
void | icmp6_param_problem (struct pbuf *p, enum icmp6_pp_code c, const void *pointer)

## Detailed Description

IPv6 version of ICMP, as per RFC 4443.

## Function Documentation

## ◆ icmp6_dest_unreach()

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

## ◆ icmp6_input()

void icmp6_input | ( | struct pbuf * | p,
|  | struct netif * | inp
| ) |  |

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

## ◆ icmp6_packet_too_big()

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

## ◆ icmp6_param_problem()

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

## ◆ icmp6_time_exceeded()

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

## ◆ icmp6_time_exceeded_with_addrs()

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