riot_sys

Function gnrc_ipv6_hdr_build

Source
pub unsafe extern "C" fn gnrc_ipv6_hdr_build(
    payload: *mut gnrc_pktsnip_t,
    src: *const ipv6_addr_t,
    dst: *const ipv6_addr_t,
) -> *mut gnrc_pktsnip_t
Expand description

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

@details Initializes version field with 6, traffic class, flow label, and hop limit with 0, and next header with @ref PROTNUM_RESERVED.

@param[in] payload Payload for the packet. @param[in] src Source address for the header. Can be NULL if not known or required. @param[in] dst Destination address for the header. Can be NULL if not known or required.

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