mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
nanocoap: introduce coap_get_method()
This commit is contained in:
parent
5b2beea08a
commit
2e7cdfb345
@ -499,6 +499,18 @@ static inline unsigned coap_get_code_raw(const coap_pkt_t *pkt)
|
||||
return (unsigned)pkt->hdr->code;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get a request's method type
|
||||
*
|
||||
* @param[in] pkt CoAP request packet
|
||||
*
|
||||
* @returns request method type
|
||||
*/
|
||||
static inline coap_method_t coap_get_method(const coap_pkt_t *pkt)
|
||||
{
|
||||
return pkt->hdr->code;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the message ID of the given CoAP packet
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user