GNRC's implementation of ICMPv6. More...

Detailed Description

GNRC's implementation of ICMPv6.

See also
RFC 4443


 ICMPv6 echo messages
 ICMPv6 echo request and reply.
 ICMPv6 error messages
 ICMPv6 error message handling and creation.
 IPv6 Neighbor discovery
 GNRC's IPv6 Neighbor Discovery implementation.


file  gnrc/icmpv6.h
 Definitions for GNRC's ICMPv6 implementation.


void gnrc_icmpv6_demux (kernel_pid_t iface, gnrc_pktsnip_t *pkt)
 Demultiplexes a received ICMPv6 packet according to its type field. More...
gnrc_pktsnip_tgnrc_icmpv6_build (gnrc_pktsnip_t *next, uint8_t type, uint8_t code, size_t size)
 Builds an ICMPv6 message for sending. More...
int gnrc_icmpv6_calc_csum (gnrc_pktsnip_t *hdr, gnrc_pktsnip_t *pseudo_hdr)
 Calculates the checksum for an ICMPv6 packet. More...

Function Documentation

◆ gnrc_icmpv6_build()

gnrc_pktsnip_t* gnrc_icmpv6_build ( gnrc_pktsnip_t next,
uint8_t  type,
uint8_t  code,
size_t  size 

Builds an ICMPv6 message for sending.

[in]nextNext packet snip in the new packet.
[in]typeType for the ICMPv6 message.
[in]codeCode for the ICMPv6 message.
[in]sizeSize of the ICMPv6 message (needs do be > sizeof(icmpv6_hdr_t)).
The ICMPv6 message on success
NULL, on failure

◆ gnrc_icmpv6_calc_csum()

int gnrc_icmpv6_calc_csum ( gnrc_pktsnip_t hdr,
gnrc_pktsnip_t pseudo_hdr 

Calculates the checksum for an ICMPv6 packet.

[in]hdrThe header the checksum should be calculated for.
[in]pseudo_hdrThe header the pseudo header shall be generated from. NULL if none is needed.
0, on success.
-EINVAL, if gnrc_pktsnip_t::type of pkt was not GNRC_NETTYPE_ICMPV6
-ENOENT, if gnrc_pktsnip_t::type of pseudo_hdr was not GNRC_NETTYPE_IPV6

◆ gnrc_icmpv6_demux()

void gnrc_icmpv6_demux ( kernel_pid_t  iface,
gnrc_pktsnip_t pkt 

Demultiplexes a received ICMPv6 packet according to its type field.

[in]ifaceThe receiving interface
[in]pktThe packet to demultiplex.