IPv6 header defintions

include/net/gnrc/pkt.h::gnrc_pktsnip_t * gnrc_ipv6_hdr_build(include/net/gnrc/pkt.h::gnrc_pktsnip_t * payload, const ipv6_addr_t * src, const ipv6_addr_t * dst)

Builds an IPv6 header for sending and adds it to the packet buffer.

Initializes version field with 6, traffic class, flow label, and hop limit with 0, and next header with protnum.h::PROTNUM_RESERVED.

Parameters

payload:Payload for the packet.
src:Source address for the header. Can be NULL if not known or required.
dst:Destination address for the header. Can be NULL if not known or required.

Return values

  • The an IPv6 header in packet buffer on success.
  • NULL on error.