Skip to content
Snippets Groups Projects
Commit 2ddd8ce1 authored by Lasse Lueder's avatar Lasse Lueder
Browse files

net/nanocoap: define coap_data_ptr

parent 2260cd7f
Branches
No related tags found
No related merge requests found
......@@ -951,6 +951,18 @@ static inline unsigned coap_get_id(coap_pkt_t *pkt)
return ntohs(pkt->hdr->id);
}
/**
* @brief Get the start of data after the header
*
* @param[in] hdr Header of CoAP packet in contiguous memory
*
* @returns pointer to first byte after the header
*/
static inline uint8_t *coap_hdr_data_ptr(coap_hdr_t *hdr)
{
return ((uint8_t *)hdr) + sizeof(coap_hdr_t);
}
/**
* @brief Get the total header length (4-byte header + token length)
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment