forked from RIOT-Makers/YaCoAP
-
Notifications
You must be signed in to change notification settings - Fork 1
/
coap_dump.h
executable file
·31 lines (25 loc) · 678 Bytes
/
coap_dump.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef COAP_DUMP_H
#define COAP_DUMP_H 1
#ifdef __cplusplus
extern "C" {
#endif
#include "coap.h"
/**
* Dumps the content of \p buf as hexadecimal.
*
* @param[in] buf The buffer to be dumped.
* @param[in] buflen The length of \p buf in bytes.
* @param[in] bare If true, "Dump:" and a the newline character are printed
* before the actual values.
*/
void coap_dump(const uint8_t *buf, size_t buflen, bool bare);
/**
* Dumps all values of a CoAP packet (including payload) as hexadecimal.
*
* @param[in] pkt Pointer to the packet whose content is to be dumped.
*/
void coap_dump_packet(const coap_packet_t *pkt);
#ifdef __cplusplus
}
#endif
#endif //COAP_DUMP_H