IPv6 extension headers.

Implementation of IPv6 extension headers.

void gnrc_ipv6_ext_demux(gnrc_netif_t * netif, include/net/gnrc/pkt.h::gnrc_pktsnip_t * current, include/net/gnrc/pkt.h::gnrc_pktsnip_t * pkt, uint8_t nh)

Demultiplex extension headers according to nh.

About current and pkt: IPv6 <- IPv6_EXT <- IPv6_EXT <- UNDEF

This situation may happen when the packet has a source routing extension header (RFC 6554), and the packet is forwarded from an interface to another.

include/net/gnrc/pkt.h::gnrc_pktsnip_t * gnrc_ipv6_ext_build(include/net/gnrc/pkt.h::gnrc_pktsnip_t * ipv6, include/net/gnrc/pkt.h::gnrc_pktsnip_t * next, uint8_t nh, msp430_types.h::size_t size)

Builds an extension header for sending.

Parameters

ipv6:The IPv6 header. Can be NULL.
next:The next header. Must be a successor to ipv6 if it is not NULL.
nh:Protocol Numbers of the next header.
size:Size of the extension header.

Return values

  • The extension header on success.
  • NULL, on error.