feature: add debug_plugin for development debugging

This commit is contained in:
luwenpeng
2024-08-01 11:40:00 +08:00
parent 48202b4d0a
commit 776090331e
16 changed files with 446 additions and 135 deletions

View File

@@ -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
}