feature: add debug_plugin for development debugging
This commit is contained in:
@@ -6,9 +6,20 @@ extern "C"
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
const char *packet_parse(struct packet *pkt, const char *data, uint16_t len);
|
||||
void packet_print(const struct packet *pkt);
|
||||
|
||||
// bref : 1, output packet bref info
|
||||
// bref : 0, output packet detail info
|
||||
int packet_to_str(const struct packet *pkt, char *buff, int size);
|
||||
|
||||
static inline void packet_print(const struct packet *pkt)
|
||||
{
|
||||
char buff[4096];
|
||||
packet_to_str(pkt, buff, sizeof(buff));
|
||||
printf("%s\n", buff);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user