Add packet helpers

This commit is contained in:
luwenpeng
2023-12-18 16:51:17 +08:00
parent dda0cdf104
commit 2e56bd810c
7 changed files with 1110 additions and 25 deletions

View File

@@ -11,11 +11,16 @@ extern "C"
#include "tuple.h"
#define PACKET_MAX_LAYERS 16
//#define PACKET_LOG_ERROR(format, ...) void(0)
// #define PACKET_LOG_ERROR(format, ...) void(0)
#ifndef PACKET_LOG_ERROR
#define PACKET_LOG_ERROR(format, ...) \
fprintf(stderr, "ERROR " format "\n", ##__VA_ARGS__);
#endif
// #define PACKET_LOG_DEBUG(format, ...) void(0)
#ifndef PACKET_LOG_DEBUG
#define PACKET_LOG_DEBUG(format, ...) \
fprintf(stderr, "DEBUG " format "\n", ##__VA_ARGS__);
#endif
enum layer_type
{