riot_sys

Function gnrc_ipv6_get_header

Source
pub unsafe extern "C" fn gnrc_ipv6_get_header(
    pkt: *mut gnrc_pktsnip_t,
) -> *mut ipv6_hdr_t
Expand description

@brief Get the IPv6 header from a given list of @ref gnrc_pktsnip_t

     This function may be used with e.g. a pointer to a (full) UDP datagram.

@pre Any @ref GNRC_NETTYPE_IPV6 snip in pkt is contains a full IPv6 header.

@param[in] pkt The pointer to the first @ref gnrc_pktsnip_t of the packet.

@return A pointer to the @ref ipv6_hdr_t of the packet. @return NULL if the packet does not contain an IPv6 header.