Browse Source

Added global pointer

pull/630/head
EgorWeders 7 months ago
parent
commit
78b787ba39
  1. 1
      src/goodbyedpi.c
  2. 7
      src/goodbyedpi.h

1
src/goodbyedpi.c

@ -577,6 +577,7 @@ static void send_native_fragment(HANDLE w_filter, WINDIVERT_ADDRESS addr,
}
int main(int argc, char *argv[]) {
debugPrint = &printf;
static enum packet_type_e {
unknown,
ipv4_tcp, ipv4_tcp_data, ipv4_udp_data,

7
src/goodbyedpi.h

@ -1,8 +1,11 @@
#define HOST_MAXLEN 253
#define MAX_PACKET_SIZE 9016
extern int (*debugPrint)(char const *const _Format, ...);
#ifndef DEBUG
#define debug(...) do {} while (0)
#define debug(...) \
if (debugPrint) { \
debugPrint(__VA_ARGS__); \
}
#else
#define debug(...) printf(__VA_ARGS__)
#endif

Loading…
Cancel
Save