feature: support packet dump to pcap

This commit is contained in:
luwenpeng
2024-07-01 15:51:36 +08:00
parent ec38d90241
commit 761329e530
5 changed files with 123 additions and 138 deletions

16
src/packet/packet_dump.h Normal file
View File

@@ -0,0 +1,16 @@
#pragma once
#ifdef __cplusplus
extern "C"
{
#endif
#include <stdint.h>
// return 0: success
// return -1: failed
int packet_dump(const char *file, const char *data, uint16_t len);
#ifdef __cplusplus
}
#endif