ByeDPI: обсуждение

Не компилируется, к сожалению.


cc -std=c99 -O2 packets.c main.c conev.c proxy.c desync.c -I . -o ciadpi
In file included from main.c:11:
./params.h:47:26: warning: backslash-newline at end of file
   47 | #define LOG(s, str, ...) \
      |                           
main.c: In function ‘main’:
main.c:205:35: error: ‘INT_MAX’ undeclared (first use in this function)
  205 |             if (val <= 0 || val > INT_MAX/4 || *end)
      |                                   ^~~~~~~
main.c:14:1: note: ‘INT_MAX’ is defined in header ‘<limits.h>’; did you forget to ‘#include <limits.h>’?
   13 | #include <packets.h>
  +++ |+#include <limits.h>
   14 | 
main.c:205:35: note: each undeclared identifier is reported only once for each function it appears in
  205 |             if (val <= 0 || val > INT_MAX/4 || *end)
      |                                   ^~~~~~~
main.c:269:23: error: ‘INT_MIN’ undeclared (first use in this function)
  269 |             if (val < INT_MIN || val > INT_MAX || *end)
      |                       ^~~~~~~
main.c:269:23: note: ‘INT_MIN’ is defined in header ‘<limits.h>’; did you forget to ‘#include <limits.h>’?
In file included from proxy.c:21:
./params.h:47:26: warning: backslash-newline at end of file
   47 | #define LOG(s, str, ...) \
      |                           
In file included from desync.c:21:
./params.h:47:26: warning: backslash-newline at end of file
   47 | #define LOG(s, str, ...) \
      |                           
desync.c: In function ‘fake_attack’:
desync.c:18:35: warning: implicit declaration of function ‘fileno’ [e]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Wimplicit-function-declaratione]8;;]
   18 | #define memfd_create(name, flags) fileno(tmpfile())
      |                                   ^~~~~~
desync.c:30:15: note: in expansion of macro ‘memfd_create’
   30 |     int ffd = memfd_create("name", O_RDWR);
      |               ^~~~~~~~~~~~
desync.c:18:42: warning: implicit declaration of function ‘tmpfile’ [e]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Wimplicit-function-declaratione]8;;]
   18 | #define memfd_create(name, flags) fileno(tmpfile())
      |                                          ^~~~~~~
desync.c:30:15: note: in expansion of macro ‘memfd_create’
   30 |     int ffd = memfd_create("name", O_RDWR);
      |               ^~~~~~~~~~~~
desync.c:32:9: warning: implicit declaration of function ‘perror’ [e]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Wimplicit-function-declaratione]8;;]
   32 |         perror("memfd_create");
      |         ^~~~~~
desync.c:39:13: warning: implicit declaration of function ‘ftruncate’ [e]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Wimplicit-function-declaratione]8;;]
   39 |         if (ftruncate(ffd, pos) < 0) {
      |             ^~~~~~~~~
desync.c:48:9: warning: implicit declaration of function ‘memcpy’ [e]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Wimplicit-function-declaratione]8;;]
   48 |         memcpy(p, pkt.data, psz < pos ? psz : pos);
      |         ^~~~~~
desync.c:23:1: note: include ‘<string.h>’ or provide a declaration of ‘memcpy’
   22 | #include <packets.h>
  +++ |+#include <string.h>
   23 | 
desync.c:48:9: warning: incompatible implicit declaration of built-in function ‘memcpy’ [e]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wbuiltin-declaration-mismatch-Wbuiltin-declaration-mismatche]8;;]
   48 |         memcpy(p, pkt.data, psz < pos ? psz : pos);
      |         ^~~~~~
desync.c:48:9: note: include ‘<string.h>’ or provide a declaration of ‘memcpy’
desync.c:59:9: warning: implicit declaration of function ‘usleep’; did you mean ‘sleep’? [e]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Wimplicit-function-declaratione]8;;]
   59 |         usleep(params.sfdelay);
      |         ^~~~~~
      |         sleep
desync.c: In function ‘desync’:
./params.h:48:28: warning: implicit declaration of function ‘printf’ [e]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Wimplicit-function-declaratione]8;;]
   48 |     if (params.debug >= s) printf(str, ##__VA_ARGS__)
      |                            ^~~~~~
desync.c:116:5: note: in expansion of macro ‘LOG’
  116 |     LOG(LOG_S, "host: %.*s\n", len, host);
      |     ^~~
desync.c:23:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
   22 | #include <packets.h>
  +++ |+#include <stdio.h>
   23 | 
./params.h:48:28: warning: incompatible implicit declaration of built-in function ‘printf’ [e]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wbuiltin-declaration-mismatch-Wbuiltin-declaration-mismatche]8;;]
   48 |     if (params.debug >= s) printf(str, ##__VA_ARGS__)
      |                            ^~~~~~
desync.c:116:5: note: in expansion of macro ‘LOG’
  116 |     LOG(LOG_S, "host: %.*s\n", len, host);
      |     ^~~
./params.h:48:28: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
   48 |     if (params.debug >= s) printf(str, ##__VA_ARGS__)
      |                            ^~~~~~
desync.c:116:5: note: in expansion of macro ‘LOG’
  116 |     LOG(LOG_S, "host: %.*s\n", len, host);
      |     ^~~
desync.c:120:13: warning: implicit declaration of function ‘fprintf’ [e]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-function-declaration-Wimplicit-function-declaratione]8;;]
  120 |             fprintf(stderr, "mod http error\n");
      |             ^~~~~~~
desync.c:120:13: note: include ‘<stdio.h>’ or provide a declaration of ‘fprintf’
desync.c:120:13: warning: incompatible implicit declaration of built-in function ‘fprintf’ [e]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wbuiltin-declaration-mismatch-Wbuiltin-declaration-mismatche]8;;]
desync.c:120:13: note: include ‘<stdio.h>’ or provide a declaration of ‘fprintf’
desync.c:120:21: error: ‘stderr’ undeclared (first use in this function)
  120 |             fprintf(stderr, "mod http error\n");
      |                     ^~~~~~
desync.c:120:21: note: ‘stderr’ is defined in header ‘<stdio.h>’; did you forget to ‘#include <stdio.h>’?
desync.c:120:21: note: each undeclared identifier is reported only once for each function it appears in
./params.h:48:28: warning: incompatible implicit declaration of built-in function ‘printf’ [e]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wbuiltin-declaration-mismatch-Wbuiltin-declaration-mismatche]8;;]
   48 |     if (params.debug >= s) printf(str, ##__VA_ARGS__)
      |                            ^~~~~~
desync.c:129:5: note: in expansion of macro ‘LOG’
  129 |     LOG(LOG_L, "split pos: %d, n: %ld\n", pos, n);
      |     ^~~
./params.h:48:28: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
   48 |     if (params.debug >= s) printf(str, ##__VA_ARGS__)
      |                            ^~~~~~
desync.c:129:5: note: in expansion of macro ‘LOG’
  129 |     LOG(LOG_L, "split pos: %d, n: %ld\n", pos, n);
      |     ^~~
make: *** [Makefile:7: all] Error 1