pub unsafe extern "C" fn gnrc_udp_hdr_build(
    payload: *mut gnrc_pktsnip_t,
    src: u16,
    dst: u16
) -> *mut gnrc_pktsnip_t
Expand description

@brief Allocate and initialize a fresh UDP header in the packet buffer

@param[in] payload Payload contained in the UDP packet @param[in] src Source port in host byte order @param[in] dst Destination port in host byte order

@return pointer to the newly created (and allocated) header @return NULL on src == NULL, dst == NULL, src_len != 2, dst_len != 2 or on allocation error

@pre src > 0 and dst > 0