ICMPv6

GNRC’s implementation of ICMPv6.

See also

RFC 4443

void gnrc_icmpv6_demux(gnrc_netif_t * netif, include/net/gnrc/pkt.h::gnrc_pktsnip_t * pkt)

Demultiplexes a received ICMPv6 packet according to its type field.

Parameters

netif:The receiving interface
pkt:The packet to demultiplex.

include/net/gnrc/pkt.h::gnrc_pktsnip_t * gnrc_icmpv6_build(include/net/gnrc/pkt.h::gnrc_pktsnip_t * next, uint8_t type, uint8_t code, msp430_types.h::size_t size)

Builds an ICMPv6 message for sending.

Parameters

next:Next packet snip in the new packet.
type:Type for the ICMPv6 message.
code:Code for the ICMPv6 message.
size:Size of the ICMPv6 message (needs do be > sizeof(icmpv6_hdr_t)).

Return values

  • The ICMPv6 message on success
  • NULL, on failure
int gnrc_icmpv6_calc_csum(include/net/gnrc/pkt.h::gnrc_pktsnip_t * hdr, include/net/gnrc/pkt.h::gnrc_pktsnip_t * pseudo_hdr)

Calculates the checksum for an ICMPv6 packet.

Parameters

hdr:The header the checksum should be calculated for.
pseudo_hdr:The header the pseudo header shall be generated from. NULL if none is needed.

Return values