GNRC's implementation of ICMPv6. More...

Detailed Description

GNRC's implementation of ICMPv6.

See also
RFC 4443

Modules

 ICMPv6 echo messages
 ICMPv6 echo request and reply.
 
 ICMPv6 error messages
 ICMPv6 error message handling and creation.
 

Files

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

Functions

void gnrc_icmpv6_demux (gnrc_netif_t *netif, 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.

Parameters
[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)).
Returns
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.

Parameters
[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.
Returns
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 ( gnrc_netif_t netif,
gnrc_pktsnip_t pkt 
)

Demultiplexes a received ICMPv6 packet according to its type field.

Parameters
[in]netifThe receiving interface
[in]pktThe packet to demultiplex.