Browse Source

Backup before fixing u_async socket registration bug

nodeinfo-routing-update
jeka 8 months ago
parent
commit
53c7330a7f
  1. 52
      Makefile
  2. 171
      Makefile.old
  3. 372
      build_win.log
  4. 187
      c_util1
  5. 109
      cl
  6. 83
      configure.log
  7. 38
      debug_ll_queue.c
  8. 47
      debug_performance.c
  9. 37
      simple_test.c
  10. 6
      tests/logs/test_crypto.log
  11. 6
      tests/logs/test_etcp_crypto.log
  12. 1732
      tests/logs/test_etcp_two_instances.log

52
Makefile

@ -89,8 +89,8 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = x86_64-pc-linux-gnu
host_triplet = x86_64-pc-linux-gnu
build_triplet = x86_64-w64-mingw32
host_triplet = x86_64-w64-mingw32
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
@ -210,28 +210,28 @@ distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
ACLOCAL = ${SHELL} '/home/vnc1/proj/utun3/build-aux/missing' aclocal-1.16
ACLOCAL = ${SHELL} '/c/ARM/_uTun/utun2/build-aux/missing' aclocal-1.16
AMTAR = $${TAR-tar}
AM_DEFAULT_VERBOSITY = 1
AR = ar
AUTOCONF = ${SHELL} '/home/vnc1/proj/utun3/build-aux/missing' autoconf
AUTOHEADER = ${SHELL} '/home/vnc1/proj/utun3/build-aux/missing' autoheader
AUTOMAKE = ${SHELL} '/home/vnc1/proj/utun3/build-aux/missing' automake-1.16
AWK = mawk
CC = gcc
AUTOCONF = ${SHELL} '/c/ARM/_uTun/utun2/build-aux/missing' autoconf
AUTOHEADER = ${SHELL} '/c/ARM/_uTun/utun2/build-aux/missing' autoheader
AUTOMAKE = ${SHELL} '/c/ARM/_uTun/utun2/build-aux/missing' automake-1.16
AWK = gawk
CC = x86_64-w64-mingw32-gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -g -O2
CPPFLAGS =
CSCOPE = cscope
CTAGS = ctags
CYGPATH_W = echo
CYGPATH_W = cygpath -w
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
ECHO_C =
ECHO_N = -n
ECHO_T =
ETAGS = etags
EXEEXT =
EXEEXT = .exe
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
@ -241,7 +241,7 @@ LDFLAGS =
LIBOBJS =
LIBS = -lcrypto
LTLIBOBJS =
MAKEINFO = ${SHELL} '/home/vnc1/proj/utun3/build-aux/missing' makeinfo
MAKEINFO = ${SHELL} '/c/ARM/_uTun/utun2/build-aux/missing' makeinfo
MKDIR_P = /usr/bin/mkdir -p
OBJEXT = o
PACKAGE = utun
@ -254,41 +254,41 @@ PACKAGE_VERSION = 2.0.0
PATH_SEPARATOR = :
RANLIB = ranlib
SET_MAKE =
SHELL = /bin/bash
SHELL = /bin/sh
STRIP =
VERSION = 2.0.0
abs_builddir = /home/vnc1/proj/utun3
abs_srcdir = /home/vnc1/proj/utun3
abs_top_builddir = /home/vnc1/proj/utun3
abs_top_srcdir = /home/vnc1/proj/utun3
abs_builddir = /c/ARM/_uTun/utun2
abs_srcdir = /c/ARM/_uTun/utun2
abs_top_builddir = /c/ARM/_uTun/utun2
abs_top_srcdir = /c/ARM/_uTun/utun2
ac_ct_AR = ar
ac_ct_CC = gcc
ac_ct_CC =
am__include = include
am__leading_dot = .
am__quote =
am__tar = $${TAR-tar} chof - "$$tardir"
am__untar = $${TAR-tar} xf -
bindir = ${exec_prefix}/bin
build = x86_64-pc-linux-gnu
build_alias =
build = x86_64-w64-mingw32
build_alias = x86_64-w64-mingw32
build_cpu = x86_64
build_os = linux-gnu
build_vendor = pc
build_os = mingw32
build_vendor = w64
builddir = .
datadir = ${datarootdir}
datarootdir = ${prefix}/share
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
dvidir = ${docdir}
exec_prefix = ${prefix}
host = x86_64-pc-linux-gnu
host_alias =
host = x86_64-w64-mingw32
host_alias = x86_64-w64-mingw32
host_cpu = x86_64
host_os = linux-gnu
host_vendor = pc
host_os = mingw32
host_vendor = w64
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
install_sh = ${SHELL} /home/vnc1/proj/utun3/build-aux/install-sh
install_sh = ${SHELL} /c/ARM/_uTun/utun2/build-aux/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale

171
Makefile.old

@ -1,171 +0,0 @@
CC := gcc
CFLAGS := -Os -std=c99 -Wall -Wextra -D_ISOC99_SOURCE -DENABLE_TESTS -DETCP_DEBUG -DETCP_DEBUG_EXT
SRC_DIR := src
TEST_DIR := tests
INCLUDES := -I$(SRC_DIR) -Iu_async -Itinycrypt/lib/include/ -Itinycrypt/lib/source/ -Itinycrypt/tests/include/ -I.
# Директории для объектных файлов
OBJ_DIR := obj
SRC_OBJ_DIR := $(OBJ_DIR)/src
TEST_OBJ_DIR := $(OBJ_DIR)/tests
# Исходники tinycrypt
TINYCRYPT_SRCS := \
tinycrypt/lib/source/ecc.c \
tinycrypt/lib/source/ecc_dh.c \
tinycrypt/lib/source/ecc_platform_specific.c \
tinycrypt/lib/source/aes_encrypt.c \
tinycrypt/lib/source/aes_decrypt.c \
tinycrypt/lib/source/utils.c \
tinycrypt/lib/source/ctr_mode.c \
tinycrypt/lib/source/ccm_mode.c
# Исходники u_async
UASYNC_SRCS := \
u_async/u_async.c \
u_async/timeout_heap.c \
u_async/debug_config.c
# Объектные файлы tinycrypt (остаются в своих директориях)
TINYCRYPT_OBJS := $(TINYCRYPT_SRCS:.c=.o)
# Основные объектные файлы (будут в obj/src/)
SC_LIB_OBJS := $(SRC_OBJ_DIR)/secure_channel.o $(SRC_OBJ_DIR)/crc32.o
UASYNC_OBJS := $(SRC_OBJ_DIR)/u_async.o $(SRC_OBJ_DIR)/timeout_heap.o $(OBJ_DIR)/u_async/debug_config.o
PN_OBJS := $(SRC_OBJ_DIR)/pkt_normalizer.o
LL_QUEUE_OBJS := $(SRC_OBJ_DIR)/ll_queue.o
ETCP_OBJS := $(SRC_OBJ_DIR)/etcp.o $(SRC_OBJ_DIR)/etcp_connections.o $(SRC_OBJ_DIR)/crc32.o
CONFIG_PARSER_OBJS := $(SRC_OBJ_DIR)/config_parser.o
TUN_IF_OBJS := $(SRC_OBJ_DIR)/tun_if.o
ROUTING_OBJS := $(SRC_OBJ_DIR)/routing.o
CONTROL_SOCKET_OBJS := # REMOVED - control_socket removed
UTUN_OBJS := $(SRC_OBJ_DIR)/utun.o $(SRC_OBJ_DIR)/utun_instance.o $(SRC_OBJ_DIR)/utun_fixes.o $(SRC_OBJ_DIR)/utun_route_fix.o
# Тестовые объектные файлы (будут в obj/tests/)
TEST_PKT_NORMALIZER_OBJS := $(TEST_OBJ_DIR)/test_pkt_normalizer.o
TEST_ETCP_OBJS := $(TEST_OBJ_DIR)/test_etcp.o
TEST_ETCP_STRESS_OBJS := $(TEST_OBJ_DIR)/test_etcp_stress.o
TEST_ETCP_SIMPLE_OBJS := $(TEST_OBJ_DIR)/test_etcp_simple.o
TEST_U_ASYNC_COMPREHENSIVE_OBJS := $(TEST_OBJ_DIR)/test_u_async_comprehensive.o
TEST_U_ASYNC_SIMPLE_OBJS := $(TEST_OBJ_DIR)/test_u_async_simple.o
TEST_U_ASYNC_PERFORMANCE_OBJS := $(TEST_OBJ_DIR)/test_u_async_performance.o
TEST_DEBUG_CONFIG_OBJS := $(TEST_OBJ_DIR)/test_debug_config.o
TEST_LL_QUEUE_COMPREHENSIVE_OBJS := $(TEST_OBJ_DIR)/test_ll_queue_comprehensive.o
SIMPLE_UASYNC_OBJS := $(TEST_OBJ_DIR)/simple_uasync.o
TEST_ECC_ENCRYPT_OBJS := $(TEST_OBJ_DIR)/test_ecc_encrypt.o
TEST_ROUTING_OBJS := $(TEST_OBJ_DIR)/test_routing.o
# Основная цель
all: utun \
$(TEST_DIR)/test_pkt_normalizer \
$(TEST_DIR)/test_etcp \
$(TEST_DIR)/test_etcp_stress \
$(TEST_DIR)/test_etcp_simple \
$(TEST_DIR)/test_u_async_comprehensive \
$(TEST_DIR)/test_u_async_simple \
$(TEST_DIR)/test_u_async_performance \
$(TEST_DIR)/test_debug_config \
$(TEST_DIR)/test_ll_queue_comprehensive \
$(TEST_DIR)/test_ecc_encrypt \
$(TEST_DIR)/test_routing
# Создание директорий
$(OBJ_DIR):
mkdir -p $(OBJ_DIR)
mkdir -p $(OBJ_DIR)/src
mkdir -p $(OBJ_DIR)/tests
mkdir -p $(OBJ_DIR)/u_async
$(SRC_OBJ_DIR): $(OBJ_DIR)
mkdir -p $(SRC_OBJ_DIR)
$(TEST_OBJ_DIR): $(OBJ_DIR)
mkdir -p $(TEST_OBJ_DIR)
# Правило компиляции для исходников из src/
$(SRC_OBJ_DIR)/%.o: $(SRC_DIR)/%.c | $(SRC_OBJ_DIR)
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
# Правило компиляции для тестовых .c файлов
$(TEST_OBJ_DIR)/%.o: $(TEST_DIR)/%.c | $(TEST_OBJ_DIR)
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
# Правило компиляции для tinycrypt (оставляем в оригинальных директориях)
tinycrypt/lib/source/%.o: tinycrypt/lib/source/%.c
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
# Правило компиляции для u_async файлов
$(SRC_OBJ_DIR)/u_async.o: u_async/u_async.c | $(SRC_OBJ_DIR)
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
$(SRC_OBJ_DIR)/timeout_heap.o: u_async/timeout_heap.c | $(SRC_OBJ_DIR)
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
$(OBJ_DIR)/u_async/debug_config.o: u_async/debug_config.c | $(OBJ_DIR)
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
# Правила линковки
utun: $(UTUN_OBJS) $(CONFIG_PARSER_OBJS) $(TUN_IF_OBJS) $(ROUTING_OBJS) $(CONTROL_SOCKET_OBJS) $(ETCP_OBJS) $(PN_OBJS) $(LL_QUEUE_OBJS) $(UASYNC_OBJS) $(SC_LIB_OBJS) $(TINYCRYPT_OBJS)
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $^
$(TEST_DIR)/test_pkt_normalizer: $(TEST_PKT_NORMALIZER_OBJS) $(PN_OBJS) $(LL_QUEUE_OBJS) $(UASYNC_OBJS)
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $^
$(TEST_DIR)/test_etcp: $(TEST_ETCP_OBJS) $(ETCP_OBJS) $(LL_QUEUE_OBJS) $(UASYNC_OBJS)
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $^
$(TEST_DIR)/test_etcp_stress: $(TEST_ETCP_STRESS_OBJS) $(ETCP_OBJS) $(LL_QUEUE_OBJS) $(SIMPLE_UASYNC_OBJS)
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $^
$(TEST_DIR)/test_etcp_simple: $(TEST_ETCP_SIMPLE_OBJS) $(ETCP_OBJS) $(LL_QUEUE_OBJS) $(SIMPLE_UASYNC_OBJS)
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $^
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $^
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $^
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $^
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $^
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $^
$(TEST_DIR)/test_u_async_comprehensive: $(TEST_U_ASYNC_COMPREHENSIVE_OBJS) $(UASYNC_OBJS) $(SC_LIB_OBJS) $(TINYCRYPT_OBJS)
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $^
$(TEST_DIR)/test_u_async_simple: $(TEST_U_ASYNC_SIMPLE_OBJS) $(UASYNC_OBJS) $(SC_LIB_OBJS) $(TINYCRYPT_OBJS)
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $^
$(TEST_DIR)/test_u_async_performance: $(TEST_U_ASYNC_PERFORMANCE_OBJS) $(UASYNC_OBJS) $(SC_LIB_OBJS) $(TINYCRYPT_OBJS)
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $^
$(TEST_DIR)/test_debug_config: $(TEST_DEBUG_CONFIG_OBJS) $(OBJ_DIR)/u_async/debug_config.o
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $^
$(TEST_DIR)/test_ll_queue_comprehensive: $(TEST_LL_QUEUE_COMPREHENSIVE_OBJS) $(LL_QUEUE_OBJS) $(UASYNC_OBJS) $(SC_LIB_OBJS) $(TINYCRYPT_OBJS)
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $^
$(TEST_DIR)/test_ecc_encrypt: $(TEST_ECC_ENCRYPT_OBJS) $(SC_LIB_OBJS) $(UASYNC_OBJS) $(TINYCRYPT_OBJS)
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $^
$(TEST_DIR)/test_routing: $(TEST_ROUTING_OBJS) $(CONFIG_PARSER_OBJS) $(ROUTING_OBJS) $(UASYNC_OBJS)
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $^
# Очистка
clean:
rm -rf $(OBJ_DIR)
rm -f utun \
$(TEST_DIR)/test_pkt_normalizer \
$(TEST_DIR)/test_etcp \
$(TEST_DIR)/test_etcp_stress \
$(TEST_DIR)/test_etcp_simple \
$(TEST_DIR)/test_u_async_comprehensive \
$(TEST_DIR)/test_u_async_simple \
$(TEST_DIR)/test_u_async_performance \
$(TEST_DIR)/test_debug_config \
$(TEST_DIR)/test_ll_queue_comprehensive \
$(TEST_DIR)/test_ecc_encrypt \
$(TEST_DIR)/test_routing
rm -f *.o $(TEST_DIR)/*.o tinycrypt/lib/source/*.o
.PHONY: all clean

372
build_win.log

@ -2,46 +2,364 @@ make all-recursive
make[1]: Entering directory '/c/ARM/_uTun/utun2'
Making all in lib
make[2]: Entering directory '/c/ARM/_uTun/utun2/lib'
make[2]: Nothing to be done for 'all'.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -D_ISOC99_SOURCE -DDEBUG_OUTPUT_STDERR -I../src -I../lib -g -O2 -MT libuasync_a-u_async.o -MD -MP -MF .deps/libuasync_a-u_async.Tpo -c -o libuasync_a-u_async.o `test -f 'u_async.c' || echo './'`u_async.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -D_ISOC99_SOURCE -DDEBUG_OUTPUT_STDERR -I../src -I../lib -g -O2 -MT libuasync_a-ll_queue.o -MD -MP -MF .deps/libuasync_a-ll_queue.Tpo -c -o libuasync_a-ll_queue.o `test -f 'll_queue.c' || echo './'`ll_queue.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -D_ISOC99_SOURCE -DDEBUG_OUTPUT_STDERR -I../src -I../lib -g -O2 -MT libuasync_a-debug_config.o -MD -MP -MF .deps/libuasync_a-debug_config.Tpo -c -o libuasync_a-debug_config.o `test -f 'debug_config.c' || echo './'`debug_config.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -D_ISOC99_SOURCE -DDEBUG_OUTPUT_STDERR -I../src -I../lib -g -O2 -MT libuasync_a-timeout_heap.o -MD -MP -MF .deps/libuasync_a-timeout_heap.Tpo -c -o libuasync_a-timeout_heap.o `test -f 'timeout_heap.c' || echo './'`timeout_heap.c
mv -f .deps/libuasync_a-timeout_heap.Tpo .deps/libuasync_a-timeout_heap.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -D_ISOC99_SOURCE -DDEBUG_OUTPUT_STDERR -I../src -I../lib -g -O2 -MT libuasync_a-memory_pool.o -MD -MP -MF .deps/libuasync_a-memory_pool.Tpo -c -o libuasync_a-memory_pool.o `test -f 'memory_pool.c' || echo './'`memory_pool.c
mv -f .deps/libuasync_a-debug_config.Tpo .deps/libuasync_a-debug_config.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -D_ISOC99_SOURCE -DDEBUG_OUTPUT_STDERR -I../src -I../lib -g -O2 -MT libuasync_a-sha256.o -MD -MP -MF .deps/libuasync_a-sha256.Tpo -c -o libuasync_a-sha256.o `test -f 'sha256.c' || echo './'`sha256.c
mv -f .deps/libuasync_a-ll_queue.Tpo .deps/libuasync_a-ll_queue.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -D_ISOC99_SOURCE -DDEBUG_OUTPUT_STDERR -I../src -I../lib -g -O2 -MT libuasync_a-socket_compat.o -MD -MP -MF .deps/libuasync_a-socket_compat.Tpo -c -o libuasync_a-socket_compat.o `test -f 'socket_compat.c' || echo './'`socket_compat.c
mv -f .deps/libuasync_a-u_async.Tpo .deps/libuasync_a-u_async.Po
mv -f .deps/libuasync_a-memory_pool.Tpo .deps/libuasync_a-memory_pool.Po
mv -f .deps/libuasync_a-sha256.Tpo .deps/libuasync_a-sha256.Po
mv -f .deps/libuasync_a-socket_compat.Tpo .deps/libuasync_a-socket_compat.Po
rm -f libuasync.a
ar cru libuasync.a libuasync_a-u_async.o libuasync_a-ll_queue.o libuasync_a-debug_config.o libuasync_a-timeout_heap.o libuasync_a-memory_pool.o libuasync_a-sha256.o libuasync_a-socket_compat.o
C:\msys64\ucrt64\bin\ar.exe: `u' modifier ignored since `D' is the default (see `U')
ranlib libuasync.a
make[2]: Leaving directory '/c/ARM/_uTun/utun2/lib'
Making all in src
make[2]: Entering directory '/c/ARM/_uTun/utun2/src'
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -MT utun-utun.o -MD -MP -MF .deps/utun-utun.Tpo -c -o utun-utun.o `test -f 'utun.c' || echo './'`utun.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -MT utun-utun_instance.o -MD -MP -MF .deps/utun-utun_instance.Tpo -c -o utun-utun_instance.o `test -f 'utun_instance.c' || echo './'`utun_instance.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -MT utun-config_parser.o -MD -MP -MF .deps/utun-config_parser.Tpo -c -o utun-config_parser.o `test -f 'config_parser.c' || echo './'`config_parser.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -MT utun-config_updater.o -MD -MP -MF .deps/utun-config_updater.Tpo -c -o utun-config_updater.o `test -f 'config_updater.c' || echo './'`config_updater.c
In file included from config_parser.c:8:
config_parser.c: In function 'parse_debug_categories':
../lib/debug_config.h:52:36: warning: conversion from 'long long unsigned int' to 'uint32_t' {aka 'unsigned int'} changes value from '18446744073709551615' to '4294967295' [-Woverflow]
52 | #define DEBUG_CATEGORY_ALL ((debug_category_t)0xFFFFFFFFFFFFFFFFULL)
| ^
config_parser.c:40:29: note: in expansion of macro 'DEBUG_CATEGORY_ALL'
40 | if (!value_copy) return DEBUG_CATEGORY_ALL; // Default to all on error
| ^~~~~~~~~~~~~~~~~~
../lib/debug_config.h:52:36: warning: conversion from 'long long unsigned int' to 'uint32_t' {aka 'unsigned int'} changes value from '18446744073709551615' to '4294967295' [-Woverflow]
52 | #define DEBUG_CATEGORY_ALL ((debug_category_t)0xFFFFFFFFFFFFFFFFULL)
| ^
config_parser.c:68:27: note: in expansion of macro 'DEBUG_CATEGORY_ALL'
68 | categories |= DEBUG_CATEGORY_ALL;
| ^~~~~~~~~~~~~~~~~~
mv -f .deps/utun-utun.Tpo .deps/utun-utun.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -MT utun-route_lib.o -MD -MP -MF .deps/utun-route_lib.Tpo -c -o utun-route_lib.o `test -f 'route_lib.c' || echo './'`route_lib.c
mv -f .deps/utun-utun_instance.Tpo .deps/utun-utun_instance.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -MT utun-route_bgp.o -MD -MP -MF .deps/utun-route_bgp.Tpo -c -o utun-route_bgp.o `test -f 'route_bgp.c' || echo './'`route_bgp.c
mv -f .deps/utun-config_updater.Tpo .deps/utun-config_updater.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -MT utun-routing.o -MD -MP -MF .deps/utun-routing.Tpo -c -o utun-routing.o `test -f 'routing.c' || echo './'`routing.c
mv -f .deps/utun-config_parser.Tpo .deps/utun-config_parser.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -MT utun-tun_if.o -MD -MP -MF .deps/utun-tun_if.Tpo -c -o utun-tun_if.o `test -f 'tun_if.c' || echo './'`tun_if.c
mv -f .deps/utun-tun_if.Tpo .deps/utun-tun_if.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -MT utun-etcp.o -MD -MP -MF .deps/utun-etcp.Tpo -c -o utun-etcp.o `test -f 'etcp.c' || echo './'`etcp.c
mv -f .deps/utun-route_bgp.Tpo .deps/utun-route_bgp.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -MT utun-etcp_connections.o -MD -MP -MF .deps/utun-etcp_connections.Tpo -c -o utun-etcp_connections.o `test -f 'etcp_connections.c' || echo './'`etcp_connections.c
mv -f .deps/utun-route_lib.Tpo .deps/utun-route_lib.Po
mv -f .deps/utun-routing.Tpo .deps/utun-routing.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -MT utun-etcp_loadbalancer.o -MD -MP -MF .deps/utun-etcp_loadbalancer.Tpo -c -o utun-etcp_loadbalancer.o `test -f 'etcp_loadbalancer.c' || echo './'`etcp_loadbalancer.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -MT utun-secure_channel.o -MD -MP -MF .deps/utun-secure_channel.Tpo -c -o utun-secure_channel.o `test -f 'secure_channel.c' || echo './'`secure_channel.c
etcp.c: In function 'etcp_connection_create':
etcp.c:112:22: warning: assignment to 'struct pn_pair *' from incompatible pointer type 'struct PKTNORM *' [-Wincompatible-pointer-types]
112 | etcp->normalizer = pn_init(etcp);
| ^
secure_channel.c: In function 'sc_generate_keypair':
secure_channel.c:134:5: warning: 'EC_KEY_new' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
134 | EC_KEY *key = EC_KEY_new();
| ^~~~~~
In file included from secure_channel.c:25:
C:/msys64/ucrt64/include/openssl/ec.h:971:31: note: declared here
971 | OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new(void);
| ^~~~~~~~~~
secure_channel.c:139:5: warning: 'EC_KEY_set_group' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
139 | if (EC_KEY_set_group(key, group) != 1) {
| ^~
C:/msys64/ucrt64/include/openssl/ec.h:1045:27: note: declared here
1045 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group);
| ^~~~~~~~~~~~~~~~
secure_channel.c:140:9: warning: 'EC_KEY_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
140 | EC_KEY_free(key);
| ^~~~~~~~~~~
C:/msys64/ucrt64/include/openssl/ec.h:1006:28: note: declared here
1006 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
| ^~~~~~~~~~~
secure_channel.c:145:5: warning: 'EC_KEY_generate_key' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
145 | if (EC_KEY_generate_key(key) != 1) {
| ^~
C:/msys64/ucrt64/include/openssl/ec.h:1104:27: note: declared here
1104 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_generate_key(EC_KEY *key);
| ^~~~~~~~~~~~~~~~~~~
secure_channel.c:146:9: warning: 'EC_KEY_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
146 | EC_KEY_free(key);
| ^~~~~~~~~~~
C:/msys64/ucrt64/include/openssl/ec.h:1006:28: note: declared here
1006 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
| ^~~~~~~~~~~
secure_channel.c:150:5: warning: 'EC_KEY_get0_private_key' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
150 | const BIGNUM *priv = EC_KEY_get0_private_key(key);
| ^~~~~
C:/msys64/ucrt64/include/openssl/ec.h:1051:37: note: declared here
1051 | OSSL_DEPRECATEDIN_3_0 const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key);
| ^~~~~~~~~~~~~~~~~~~~~~~
secure_channel.c:152:9: warning: 'EC_KEY_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
152 | EC_KEY_free(key);
| ^~~~~~~~~~~
C:/msys64/ucrt64/include/openssl/ec.h:1006:28: note: declared here
1006 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
| ^~~~~~~~~~~
secure_channel.c:156:5: warning: 'EC_KEY_get0_public_key' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
156 | const EC_POINT *pub_point = EC_KEY_get0_public_key(key);
| ^~~~~
C:/msys64/ucrt64/include/openssl/ec.h:1065:39: note: declared here
1065 | OSSL_DEPRECATEDIN_3_0 const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key);
| ^~~~~~~~~~~~~~~~~~~~~~
secure_channel.c:159:9: warning: 'EC_KEY_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
159 | EC_KEY_free(key);
| ^~~~~~~~~~~
C:/msys64/ucrt64/include/openssl/ec.h:1006:28: note: declared here
1006 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
| ^~~~~~~~~~~
secure_channel.c:164:5: warning: 'EC_KEY_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
164 | EC_KEY_free(key);
| ^~~~~~~~~~~
C:/msys64/ucrt64/include/openssl/ec.h:1006:28: note: declared here
1006 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
| ^~~~~~~~~~~
secure_channel.c: In function 'sc_set_peer_public_key':
secure_channel.c:220:5: warning: 'EC_KEY_new' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
220 | EC_KEY *my_key = EC_KEY_new();
| ^~~~~~
C:/msys64/ucrt64/include/openssl/ec.h:971:31: note: declared here
971 | OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new(void);
| ^~~~~~~~~~
secure_channel.c:225:5: warning: 'EC_KEY_set_group' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
225 | if (EC_KEY_set_group(my_key, group) != 1) {
| ^~
C:/msys64/ucrt64/include/openssl/ec.h:1045:27: note: declared here
1045 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group);
| ^~~~~~~~~~~~~~~~
secure_channel.c:226:9: warning: 'EC_KEY_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
226 | EC_KEY_free(my_key);
| ^~~~~~~~~~~
C:/msys64/ucrt64/include/openssl/ec.h:1006:28: note: declared here
1006 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
| ^~~~~~~~~~~
secure_channel.c:231:5: warning: 'EC_KEY_set_private_key' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
231 | if (!my_priv || EC_KEY_set_private_key(my_key, my_priv) != 1) {
| ^~
C:/msys64/ucrt64/include/openssl/ec.h:1059:27: note: declared here
1059 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *prv);
| ^~~~~~~~~~~~~~~~~~~~~~
secure_channel.c:233:9: warning: 'EC_KEY_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
233 | EC_KEY_free(my_key);
| ^~~~~~~~~~~
C:/msys64/ucrt64/include/openssl/ec.h:1006:28: note: declared here
1006 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
| ^~~~~~~~~~~
secure_channel.c:240:9: warning: 'EC_KEY_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
240 | EC_KEY_free(my_key);
| ^~~~~~~~~~~
C:/msys64/ucrt64/include/openssl/ec.h:1006:28: note: declared here
1006 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
| ^~~~~~~~~~~
secure_channel.c:251:9: warning: 'EC_KEY_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
251 | EC_KEY_free(my_key);
| ^~~~~~~~~~~
C:/msys64/ucrt64/include/openssl/ec.h:1006:28: note: declared here
1006 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
| ^~~~~~~~~~~
secure_channel.c:256:5: warning: 'ECDH_compute_key' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
256 | int len = ECDH_compute_key(shared_secret, SC_SHARED_SECRET_SIZE, peer_point, my_key, NULL);
| ^~~
C:/msys64/ucrt64/include/openssl/ec.h:1299:27: note: declared here
1299 | OSSL_DEPRECATEDIN_3_0 int ECDH_compute_key(void *out, size_t outlen,
| ^~~~~~~~~~~~~~~~
secure_channel.c:263:9: warning: 'EC_KEY_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
263 | EC_KEY_free(my_key);
| ^~~~~~~~~~~
C:/msys64/ucrt64/include/openssl/ec.h:1006:28: note: declared here
1006 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
| ^~~~~~~~~~~
secure_channel.c:275:5: warning: 'EC_KEY_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
275 | EC_KEY_free(my_key);
| ^~~~~~~~~~~
C:/msys64/ucrt64/include/openssl/ec.h:1006:28: note: declared here
1006 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
| ^~~~~~~~~~~
secure_channel.c: In function 'sc_build_nonce':
secure_channel.c:306:5: warning: 'SHA256_Init' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
306 | SHA256_Init(&sha_ctx);
| ^~~~~~~~~~~
In file included from secure_channel.c:27:
C:/msys64/ucrt64/include/openssl/sha.h:73:27: note: declared here
73 | OSSL_DEPRECATEDIN_3_0 int SHA256_Init(SHA256_CTX *c);
| ^~~~~~~~~~~
secure_channel.c:307:5: warning: 'SHA256_Update' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
307 | SHA256_Update(&sha_ctx, data, 24);
| ^~~~~~~~~~~~~
C:/msys64/ucrt64/include/openssl/sha.h:74:27: note: declared here
74 | OSSL_DEPRECATEDIN_3_0 int SHA256_Update(SHA256_CTX *c,
| ^~~~~~~~~~~~~
secure_channel.c:308:5: warning: 'SHA256_Final' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
308 | SHA256_Final(hash, &sha_ctx);
| ^~~~~~~~~~~~
C:/msys64/ucrt64/include/openssl/sha.h:76:27: note: declared here
76 | OSSL_DEPRECATEDIN_3_0 int SHA256_Final(unsigned char *md, SHA256_CTX *c);
| ^~~~~~~~~~~~
mv -f .deps/utun-etcp_loadbalancer.Tpo .deps/utun-etcp_loadbalancer.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -MT utun-crc32.o -MD -MP -MF .deps/utun-crc32.Tpo -c -o utun-crc32.o `test -f 'crc32.c' || echo './'`crc32.c
mv -f .deps/utun-etcp.Tpo .deps/utun-etcp.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -MT utun-pkt_normalizer.o -MD -MP -MF .deps/utun-pkt_normalizer.Tpo -c -o utun-pkt_normalizer.o `test -f 'pkt_normalizer.c' || echo './'`pkt_normalizer.c
mv -f .deps/utun-etcp_connections.Tpo .deps/utun-etcp_connections.Po
mv -f .deps/utun-secure_channel.Tpo .deps/utun-secure_channel.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -MT utun-etcp_api.o -MD -MP -MF .deps/utun-etcp_api.Tpo -c -o utun-etcp_api.o `test -f 'etcp_api.c' || echo './'`etcp_api.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -MT utun-tun_windows.o -MD -MP -MF .deps/utun-tun_windows.Tpo -c -o utun-tun_windows.o `test -f 'tun_windows.c' || echo './'`tun_windows.c
mv -f .deps/utun-crc32.Tpo .deps/utun-crc32.Po
etcp_api.c: In function 'etcp_send':
etcp_api.c:82:26: warning: initialization of 'struct PKTNORM *' from incompatible pointer type 'struct pn_pair *' [-Wincompatible-pointer-types]
82 | struct PKTNORM* pn = conn->normalizer;
| ^~~~
mv -f .deps/utun-etcp_api.Tpo .deps/utun-etcp_api.Po
mv -f .deps/utun-pkt_normalizer.Tpo .deps/utun-pkt_normalizer.Po
mv -f .deps/utun-tun_windows.Tpo .deps/utun-tun_windows.Po
x86_64-w64-mingw32-gcc -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -o utun.exe utun-utun.o utun-utun_instance.o utun-config_parser.o utun-config_updater.o utun-route_lib.o utun-route_bgp.o utun-routing.o utun-tun_if.o utun-etcp.o utun-etcp_connections.o utun-etcp_loadbalancer.o utun-secure_channel.o utun-crc32.o utun-pkt_normalizer.o utun-etcp_api.o utun-tun_windows.o ../lib/libuasync.a -lpthread -lm -lcrypto -liphlpapi -lws2_32 -ladvapi32 -lcrypto
make[2]: Leaving directory '/c/ARM/_uTun/utun2/src'
Making all in tests
make[2]: Entering directory '/c/ARM/_uTun/utun2/tests'
make all-am
make[3]: Entering directory '/c/ARM/_uTun/utun2/tests'
x86_64-w64-mingw32-gcc -I../tinycrypt/lib/include -I../tinycrypt/lib/source -I../lib -g -O2 -o test_crypto.exe test_crypto-test_crypto.o ../src/utun-aes_encrypt.o ../src/utun-aes_decrypt.o ../src/utun-ccm_mode.o ../src/utun-cmac_mode.o ../src/utun-ctr_mode.o ../src/utun-ecc.o ../src/utun-ecc_dh.o ../src/utun-ecc_dsa.o ../src/utun-sha256.o ../src/utun-ecc_platform_specific.o ../src/utun-utils.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -MT test_etcp_crypto-test_etcp_crypto.o -MD -MP -MF .deps/test_etcp_crypto-test_etcp_crypto.Tpo -c -o test_etcp_crypto-test_etcp_crypto.o `test -f 'test_etcp_crypto.c' || echo './'`test_etcp_crypto.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../tinycrypt/lib/include -I../tinycrypt/lib/source -I../lib -g -O2 -MT test_crypto-test_crypto.o -MD -MP -MF .deps/test_crypto-test_crypto.Tpo -c -o test_crypto-test_crypto.o `test -f 'test_crypto.c' || echo './'`test_crypto.c
make[4]: Entering directory '/c/ARM/_uTun/utun2/src'
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-aes_encrypt.o ../tinycrypt/lib/source/aes_encrypt.c
make[4]: Entering directory '/c/ARM/_uTun/utun2/src'
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-aes_encrypt.o ../tinycrypt/lib/source/aes_encrypt.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-aes_decrypt.o ../tinycrypt/lib/source/aes_decrypt.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-aes_decrypt.o ../tinycrypt/lib/source/aes_decrypt.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-ccm_mode.o ../tinycrypt/lib/source/ccm_mode.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-ccm_mode.o ../tinycrypt/lib/source/ccm_mode.c
mv -f .deps/test_crypto-test_crypto.Tpo .deps/test_crypto-test_crypto.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-cmac_mode.o ../tinycrypt/lib/source/cmac_mode.c
mv -f .deps/test_etcp_crypto-test_etcp_crypto.Tpo .deps/test_etcp_crypto-test_etcp_crypto.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-ctr_mode.o ../tinycrypt/lib/source/ctr_mode.c
make[4]: Entering directory '/c/ARM/_uTun/utun2/src'
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-cmac_mode.o ../tinycrypt/lib/source/cmac_mode.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-cmac_mode.o ../tinycrypt/lib/source/cmac_mode.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-ctr_mode.o ../tinycrypt/lib/source/ctr_mode.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-ecc.o ../tinycrypt/lib/source/ecc.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-ctr_mode.o ../tinycrypt/lib/source/ctr_mode.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-ecc.o ../tinycrypt/lib/source/ecc.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-ecc.o ../tinycrypt/lib/source/ecc.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-ecc_dh.o ../tinycrypt/lib/source/ecc_dh.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-ecc_dh.o ../tinycrypt/lib/source/ecc_dh.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-ecc_dh.o ../tinycrypt/lib/source/ecc_dh.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-ecc_dsa.o ../tinycrypt/lib/source/ecc_dsa.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-ecc_dsa.o ../tinycrypt/lib/source/ecc_dsa.c
make[4]: Entering directory '/c/ARM/_uTun/utun2/src'
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-ecc_dsa.o ../tinycrypt/lib/source/ecc_dsa.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-ecc_dsa.o ../tinycrypt/lib/source/ecc_dsa.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-sha256.o ../tinycrypt/lib/source/sha256.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-sha256.o ../tinycrypt/lib/source/sha256.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-sha256.o ../tinycrypt/lib/source/sha256.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-sha256.o ../tinycrypt/lib/source/sha256.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-ecc_platform_specific.o ../tinycrypt/lib/source/ecc_platform_specific.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-ecc_platform_specific.o ../tinycrypt/lib/source/ecc_platform_specific.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-ecc_platform_specific.o ../tinycrypt/lib/source/ecc_platform_specific.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-ecc_platform_specific.o ../tinycrypt/lib/source/ecc_platform_specific.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-utils.o ../tinycrypt/lib/source/utils.c
make[4]: Leaving directory '/c/ARM/_uTun/utun2/src'
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-utils.o ../tinycrypt/lib/source/utils.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-utils.o ../tinycrypt/lib/source/utils.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-utils.o ../tinycrypt/lib/source/utils.c
make[4]: Entering directory '/c/ARM/_uTun/utun2/src'
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -I../tinycrypt/lib/include -I../tinycrypt/lib/source -c -o utun-ecc_platform_specific.o ../tinycrypt/lib/source/ecc_platform_specific.c
make[4]: Leaving directory '/c/ARM/_uTun/utun2/src'
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -MT test_etcp_two_instances-test_etcp_two_instances.o -MD -MP -MF .deps/test_etcp_two_instances-test_etcp_two_instances.Tpo -c -o test_etcp_two_instances-test_etcp_two_instances.o `test -f 'test_etcp_two_instances.c' || echo './'`test_etcp_two_instances.c
make[4]: Leaving directory '/c/ARM/_uTun/utun2/src'
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -MT test_etcp_simple_traffic-test_etcp_simple_traffic.o -MD -MP -MF .deps/test_etcp_simple_traffic-test_etcp_simple_traffic.Tpo -c -o test_etcp_simple_traffic-test_etcp_simple_traffic.o `test -f 'test_etcp_simple_traffic.c' || echo './'`test_etcp_simple_traffic.c
make[4]: Leaving directory '/c/ARM/_uTun/utun2/src'
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -MT test_etcp_minimal-test_etcp_minimal.o -MD -MP -MF .deps/test_etcp_minimal-test_etcp_minimal.Tpo -c -o test_etcp_minimal-test_etcp_minimal.o `test -f 'test_etcp_minimal.c' || echo './'`test_etcp_minimal.c
make[4]: Leaving directory '/c/ARM/_uTun/utun2/src'
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -MT test_etcp_100_packets-test_etcp_100_packets.o -MD -MP -MF .deps/test_etcp_100_packets-test_etcp_100_packets.Tpo -c -o test_etcp_100_packets-test_etcp_100_packets.o `test -f 'test_etcp_100_packets.c' || echo './'`test_etcp_100_packets.c
mv -f .deps/test_etcp_two_instances-test_etcp_two_instances.Tpo .deps/test_etcp_two_instances-test_etcp_two_instances.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -MT test_pkt_normalizer_etcp-test_pkt_normalizer_etcp.o -MD -MP -MF .deps/test_pkt_normalizer_etcp-test_pkt_normalizer_etcp.Tpo -c -o test_pkt_normalizer_etcp-test_pkt_normalizer_etcp.o `test -f 'test_pkt_normalizer_etcp.c' || echo './'`test_pkt_normalizer_etcp.c
mv -f .deps/test_etcp_minimal-test_etcp_minimal.Tpo .deps/test_etcp_minimal-test_etcp_minimal.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -MT test_pkt_normalizer_standalone-test_pkt_normalizer_standalone.o -MD -MP -MF .deps/test_pkt_normalizer_standalone-test_pkt_normalizer_standalone.Tpo -c -o test_pkt_normalizer_standalone-test_pkt_normalizer_standalone.o `test -f 'test_pkt_normalizer_standalone.c' || echo './'`test_pkt_normalizer_standalone.c
mv -f .deps/test_etcp_simple_traffic-test_etcp_simple_traffic.Tpo .deps/test_etcp_simple_traffic-test_etcp_simple_traffic.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -MT test_etcp_api-test_etcp_api.o -MD -MP -MF .deps/test_etcp_api-test_etcp_api.Tpo -c -o test_etcp_api-test_etcp_api.o `test -f 'test_etcp_api.c' || echo './'`test_etcp_api.c
mv -f .deps/test_etcp_100_packets-test_etcp_100_packets.Tpo .deps/test_etcp_100_packets-test_etcp_100_packets.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../lib -g -O2 -MT test_ll_queue-test_ll_queue.o -MD -MP -MF .deps/test_ll_queue-test_ll_queue.Tpo -c -o test_ll_queue-test_ll_queue.o `test -f 'test_ll_queue.c' || echo './'`test_ll_queue.c
x86_64-w64-mingw32-gcc -I../src -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -o test_pkt_normalizer_standalone.exe test_pkt_normalizer_standalone-test_pkt_normalizer_standalone.o ../src/utun-pkt_normalizer.o ../src/utun-route_lib.o ../src/utun-routing.o ../src/utun-etcp_api.o ../src/utun-aes_encrypt.o ../src/utun-aes_decrypt.o ../src/utun-ccm_mode.o ../src/utun-cmac_mode.o ../src/utun-ctr_mode.o ../src/utun-ecc.o ../src/utun-ecc_dh.o ../src/utun-ecc_dsa.o ../src/utun-sha256.o ../src/utun-ecc_platform_specific.o ../src/utun-utils.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
mv -f .deps/test_pkt_normalizer_standalone-test_pkt_normalizer_standalone.Tpo .deps/test_pkt_normalizer_standalone-test_pkt_normalizer_standalone.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../tinycrypt/lib/include -I../tinycrypt/lib/source -I../lib -g -O2 -MT test_ecc_encrypt-test_ecc_encrypt.o -MD -MP -MF .deps/test_ecc_encrypt-test_ecc_encrypt.Tpo -c -o test_ecc_encrypt-test_ecc_encrypt.o `test -f 'test_ecc_encrypt.c' || echo './'`test_ecc_encrypt.c
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../src/utun-ecc.o:ecc.c:(.data+0x0): undefined reference to `default_CSPRNG'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../src/utun-ecc.o:ecc.c:(.data+0x0): undefined reference to `default_CSPRNG'
collect2.exe: error: ld returned 1 exit status
make[3]: *** [Makefile:955: test_pkt_normalizer_standalone.exe] Error 1
make[3]: *** Waiting for unfinished jobs....
collect2.exe: error: ld returned 1 exit status
make[3]: *** [Makefile:899: test_crypto.exe] Error 1
In file included from ../lib/u_async.h:8,
from test_ll_queue.c:14:
../lib/platform_compat.h:44:23: error: static declaration of 'gettimeofday' follows non-static declaration
44 | static inline int gettimeofday(struct timeval *tv, void *tz) {
| ^~~~~~~~~~~~
In file included from test_ll_queue.c:11:
C:/msys64/ucrt64/include/sys/time.h:42:13: note: previous declaration of 'gettimeofday' with type 'int(struct timeval * restrict, void * restrict)'
42 | int __cdecl gettimeofday(struct timeval *__restrict__,
| ^~~~~~~~~~~~
make[3]: *** [Makefile:1217: test_ll_queue-test_ll_queue.o] Error 1
mv -f .deps/test_etcp_api-test_etcp_api.Tpo .deps/test_etcp_api-test_etcp_api.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../lib -g -O2 -MT test_intensive_memory_pool-test_intensive_memory_pool.o -MD -MP -MF .deps/test_intensive_memory_pool-test_intensive_memory_pool.Tpo -c -o test_intensive_memory_pool-test_intensive_memory_pool.o `test -f 'test_intensive_memory_pool.c' || echo './'`test_intensive_memory_pool.c
mv -f .deps/test_pkt_normalizer_etcp-test_pkt_normalizer_etcp.Tpo .deps/test_pkt_normalizer_etcp-test_pkt_normalizer_etcp.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../lib -g -O2 -MT test_memory_pool_and_config-test_memory_pool_and_config.o -MD -MP -MF .deps/test_memory_pool_and_config-test_memory_pool_and_config.Tpo -c -o test_memory_pool_and_config-test_memory_pool_and_config.o `test -f 'test_memory_pool_and_config.c' || echo './'`test_memory_pool_and_config.c
mv -f .deps/test_ll_queue-test_ll_queue.Tpo .deps/test_ll_queue-test_ll_queue.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../lib -g -O2 -MT test_packet_dump-test_packet_dump.o -MD -MP -MF .deps/test_packet_dump-test_packet_dump.Tpo -c -o test_packet_dump-test_packet_dump.o `test -f 'test_packet_dump.c' || echo './'`test_packet_dump.c
mv -f .deps/test_ecc_encrypt-test_ecc_encrypt.Tpo .deps/test_ecc_encrypt-test_ecc_encrypt.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../lib -g -O2 -MT test_u_async_comprehensive-test_u_async_comprehensive.o -MD -MP -MF .deps/test_u_async_comprehensive-test_u_async_comprehensive.Tpo -c -o test_u_async_comprehensive-test_u_async_comprehensive.o `test -f 'test_u_async_comprehensive.c' || echo './'`test_u_async_comprehensive.c
mv -f .deps/test_intensive_memory_pool-test_intensive_memory_pool.Tpo .deps/test_intensive_memory_pool-test_intensive_memory_pool.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../lib -g -O2 -MT test_u_async_performance-test_u_async_performance.o -MD -MP -MF .deps/test_u_async_performance-test_u_async_performance.Tpo -c -o test_u_async_performance-test_u_async_performance.o `test -f 'test_u_async_performance.c' || echo './'`test_u_async_performance.c
mv -f .deps/test_memory_pool_and_config-test_memory_pool_and_config.Tpo .deps/test_memory_pool_and_config-test_memory_pool_and_config.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../lib -g -O2 -MT test_debug_categories-test_debug_categories.o -MD -MP -MF .deps/test_debug_categories-test_debug_categories.Tpo -c -o test_debug_categories-test_debug_categories.o `test -f 'test_debug_categories.c' || echo './'`test_debug_categories.c
mv -f .deps/test_packet_dump-test_packet_dump.Tpo .deps/test_packet_dump-test_packet_dump.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../lib -g -O2 -MT test_config_debug-test_config_debug.o -MD -MP -MF .deps/test_config_debug-test_config_debug.Tpo -c -o test_config_debug-test_config_debug.o `test -f 'test_config_debug.c' || echo './'`test_config_debug.c
mv -f .deps/test_u_async_comprehensive-test_u_async_comprehensive.Tpo .deps/test_u_async_comprehensive-test_u_async_comprehensive.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../lib -g -O2 -MT test_route_lib-test_route_lib.o -MD -MP -MF .deps/test_route_lib-test_route_lib.Tpo -c -o test_route_lib-test_route_lib.o `test -f 'test_route_lib.c' || echo './'`test_route_lib.c
mv -f .deps/test_u_async_performance-test_u_async_performance.Tpo .deps/test_u_async_performance-test_u_async_performance.Po
mv -f .deps/test_debug_categories-test_debug_categories.Tpo .deps/test_debug_categories-test_debug_categories.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -MT test_bgp_route_exchange-test_bgp_route_exchange.o -MD -MP -MF .deps/test_bgp_route_exchange-test_bgp_route_exchange.Tpo -c -o test_bgp_route_exchange-test_bgp_route_exchange.o `test -f 'test_bgp_route_exchange.c' || echo './'`test_bgp_route_exchange.c
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -g -O2 -MT bench_timeout_heap-bench_timeout_heap.o -MD -MP -MF .deps/bench_timeout_heap-bench_timeout_heap.Tpo -c -o bench_timeout_heap-bench_timeout_heap.o `test -f 'bench_timeout_heap.c' || echo './'`bench_timeout_heap.c
mv -f .deps/test_config_debug-test_config_debug.Tpo .deps/test_config_debug-test_config_debug.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -g -O2 -MT bench_uasync_timeouts-bench_uasync_timeouts.o -MD -MP -MF .deps/bench_uasync_timeouts-bench_uasync_timeouts.Tpo -c -o bench_uasync_timeouts-bench_uasync_timeouts.o `test -f 'bench_uasync_timeouts.c' || echo './'`bench_uasync_timeouts.c
mv -f .deps/test_route_lib-test_route_lib.Tpo .deps/test_route_lib-test_route_lib.Po
mv -f .deps/bench_timeout_heap-bench_timeout_heap.Tpo .deps/bench_timeout_heap-bench_timeout_heap.Po
x86_64-w64-mingw32-gcc -I../src -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -o test_etcp_crypto.exe test_etcp_crypto-test_etcp_crypto.o ../src/utun-secure_channel.o ../src/utun-crc32.o -lcrypto ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../tinycrypt/lib/include -I../tinycrypt/lib/source -I../lib -g -O2 -o test_crypto.exe test_crypto-test_crypto.o ../src/utun-aes_encrypt.o ../src/utun-aes_decrypt.o ../src/utun-ccm_mode.o ../src/utun-cmac_mode.o ../src/utun-ctr_mode.o ../src/utun-ecc.o ../src/utun-ecc_dh.o ../src/utun-ecc_dsa.o ../src/utun-sha256.o ../src/utun-ecc_platform_specific.o ../src/utun-utils.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../src -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -o test_etcp_two_instances.exe test_etcp_two_instances-test_etcp_two_instances.o ../src/utun-config_parser.o ../src/utun-config_updater.o ../src/utun-route_lib.o ../src/utun-route_bgp.o ../src/utun-routing.o ../src/utun-tun_if.o ../src/utun-tun_windows.o ../src/utun-utun_instance.o ../src/utun-etcp.o ../src/utun-etcp_connections.o ../src/utun-etcp_loadbalancer.o ../src/utun-pkt_normalizer.o ../src/utun-etcp_api.o ../src/utun-secure_channel.o ../src/utun-crc32.o -lcrypto ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../src -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -o test_etcp_simple_traffic.exe test_etcp_simple_traffic-test_etcp_simple_traffic.o ../src/utun-config_parser.o ../src/utun-config_updater.o ../src/utun-route_lib.o ../src/utun-route_bgp.o ../src/utun-routing.o ../src/utun-tun_if.o ../src/utun-tun_windows.o ../src/utun-utun_instance.o ../src/utun-etcp.o ../src/utun-etcp_connections.o ../src/utun-etcp_loadbalancer.o ../src/utun-pkt_normalizer.o ../src/utun-etcp_api.o ../src/utun-secure_channel.o ../src/utun-crc32.o -lcrypto ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../src -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -o test_etcp_minimal.exe test_etcp_minimal-test_etcp_minimal.o ../src/utun-config_parser.o ../src/utun-config_updater.o ../src/utun-route_lib.o ../src/utun-route_bgp.o ../src/utun-routing.o ../src/utun-tun_if.o ../src/utun-tun_windows.o ../src/utun-utun_instance.o ../src/utun-etcp.o ../src/utun-etcp_connections.o ../src/utun-etcp_loadbalancer.o ../src/utun-pkt_normalizer.o ../src/utun-etcp_api.o ../src/utun-secure_channel.o ../src/utun-crc32.o -lcrypto ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../src -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -o test_etcp_100_packets.exe test_etcp_100_packets-test_etcp_100_packets.o ../src/utun-config_parser.o ../src/utun-config_updater.o ../src/utun-route_lib.o ../src/utun-route_bgp.o ../src/utun-routing.o ../src/utun-tun_if.o ../src/utun-tun_windows.o ../src/utun-utun_instance.o ../src/utun-etcp.o ../src/utun-etcp_connections.o ../src/utun-etcp_loadbalancer.o ../src/utun-pkt_normalizer.o ../src/utun-etcp_api.o ../src/utun-secure_channel.o ../src/utun-crc32.o -lcrypto ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
mv -f .deps/bench_uasync_timeouts-bench_uasync_timeouts.Tpo .deps/bench_uasync_timeouts-bench_uasync_timeouts.Po
x86_64-w64-mingw32-gcc -I../src -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -o test_pkt_normalizer_etcp.exe test_pkt_normalizer_etcp-test_pkt_normalizer_etcp.o ../src/utun-config_parser.o ../src/utun-config_updater.o ../src/utun-route_lib.o ../src/utun-route_bgp.o ../src/utun-routing.o ../src/utun-tun_if.o ../src/utun-tun_windows.o ../src/utun-utun_instance.o ../src/utun-etcp.o ../src/utun-etcp_connections.o ../src/utun-etcp_loadbalancer.o ../src/utun-pkt_normalizer.o ../src/utun-etcp_api.o ../src/utun-secure_channel.o ../src/utun-crc32.o -lcrypto ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
mv -f .deps/test_bgp_route_exchange-test_bgp_route_exchange.Tpo .deps/test_bgp_route_exchange-test_bgp_route_exchange.Po
x86_64-w64-mingw32-gcc -I../src -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -o test_pkt_normalizer_standalone.exe test_pkt_normalizer_standalone-test_pkt_normalizer_standalone.o ../src/utun-pkt_normalizer.o ../src/utun-route_lib.o ../src/utun-routing.o ../src/utun-etcp_api.o ../src/utun-aes_encrypt.o ../src/utun-aes_decrypt.o ../src/utun-ccm_mode.o ../src/utun-cmac_mode.o ../src/utun-ctr_mode.o ../src/utun-ecc.o ../src/utun-ecc_dh.o ../src/utun-ecc_dsa.o ../src/utun-sha256.o ../src/utun-ecc_platform_specific.o ../src/utun-utils.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../src -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -o test_etcp_api.exe test_etcp_api-test_etcp_api.o ../src/utun-config_parser.o ../src/utun-config_updater.o ../src/utun-route_lib.o ../src/utun-route_bgp.o ../src/utun-routing.o ../src/utun-tun_if.o ../src/utun-tun_windows.o ../src/utun-utun_instance.o ../src/utun-etcp.o ../src/utun-etcp_connections.o ../src/utun-etcp_loadbalancer.o ../src/utun-pkt_normalizer.o ../src/utun-etcp_api.o ../src/utun-secure_channel.o ../src/utun-crc32.o -lcrypto ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../src -I../lib -g -O2 -o test_ll_queue.exe test_ll_queue-test_ll_queue.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../tinycrypt/lib/include -I../tinycrypt/lib/source -I../lib -g -O2 -o test_ecc_encrypt.exe test_ecc_encrypt-test_ecc_encrypt.o ../src/utun-secure_channel.o ../src/utun-crc32.o ../src/utun-aes_encrypt.o ../src/utun-aes_decrypt.o ../src/utun-ccm_mode.o ../src/utun-cmac_mode.o ../src/utun-ctr_mode.o ../src/utun-ecc.o ../src/utun-ecc_dh.o ../src/utun-ecc_dsa.o ../src/utun-sha256.o ../src/utun-ecc_platform_specific.o ../src/utun-utils.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto -lcrypto
x86_64-w64-mingw32-gcc -I../src -I../lib -g -O2 -o test_intensive_memory_pool.exe test_intensive_memory_pool-test_intensive_memory_pool.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../src -I../lib -g -O2 -o test_memory_pool_and_config.exe test_memory_pool_and_config-test_memory_pool_and_config.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../src -I../lib -g -O2 -o test_packet_dump.exe test_packet_dump-test_packet_dump.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../src -I../lib -g -O2 -o test_u_async_comprehensive.exe test_u_async_comprehensive-test_u_async_comprehensive.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../src -I../lib -g -O2 -o test_u_async_performance.exe test_u_async_performance-test_u_async_performance.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../src -I../lib -g -O2 -o test_debug_categories.exe test_debug_categories-test_debug_categories.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../src -I../lib -g -O2 -o test_config_debug.exe test_config_debug-test_config_debug.o ../src/utun-config_parser.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../src -I../lib -g -O2 -o test_route_lib.exe test_route_lib-test_route_lib.o ../src/utun-route_lib.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../src -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -o test_bgp_route_exchange.exe test_bgp_route_exchange-test_bgp_route_exchange.o ../src/utun-config_parser.o ../src/utun-config_updater.o ../src/utun-route_lib.o ../src/utun-route_bgp.o ../src/utun-routing.o ../src/utun-tun_if.o ../src/utun-tun_windows.o ../src/utun-utun_instance.o ../src/utun-etcp.o ../src/utun-etcp_connections.o ../src/utun-etcp_loadbalancer.o ../src/utun-pkt_normalizer.o ../src/utun-etcp_api.o ../src/utun-secure_channel.o ../src/utun-crc32.o -lcrypto ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../lib -g -O2 -o bench_timeout_heap.exe bench_timeout_heap-bench_timeout_heap.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../lib -g -O2 -o bench_uasync_timeouts.exe bench_uasync_timeouts-bench_uasync_timeouts.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
make[3]: Leaving directory '/c/ARM/_uTun/utun2/tests'
make[2]: *** [Makefile:844: all] Error 2
make[2]: Leaving directory '/c/ARM/_uTun/utun2/tests'
make[1]: *** [Makefile:379: all-recursive] Error 1
make[2]: Entering directory '/c/ARM/_uTun/utun2'
make[2]: Leaving directory '/c/ARM/_uTun/utun2'
make[1]: Leaving directory '/c/ARM/_uTun/utun2'
make: *** [Makefile:320: all] Error 2
.o ../src/utun-ctr_mode.o ../src/utun-ecc.o ../src/utun-ecc_dh.o ../src/utun-ecc_dsa.o ../src/utun-sha256.o ../src/utun-ecc_platform_specific.o ../src/utun-utils.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto -lcrypto
x86_64-w64-mingw32-gcc -I../src -I../lib -g -O2 -o test_intensive_memory_pool.exe test_intensive_memory_pool-test_intensive_memory_pool.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../src -I../lib -g -O2 -o test_memory_pool_and_config.exe test_memory_pool_and_config-test_memory_pool_and_config.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../src -I../lib -g -O2 -o test_packet_dump.exe test_packet_dump-test_packet_dump.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../src -I../lib -g -O2 -o test_u_async_comprehensive.exe test_u_async_comprehensive-test_u_async_comprehensive.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../src -I../lib -g -O2 -o test_u_async_performance.exe test_u_async_performance-test_u_async_performance.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../src -I../lib -g -O2 -o test_debug_categories.exe test_debug_categories-test_debug_categories.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../src -I../lib -g -O2 -o test_config_debug.exe test_config_debug-test_config_debug.o ../src/utun-config_parser.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../src -I../lib -g -O2 -o test_route_lib.exe test_route_lib-test_route_lib.o ../src/utun-route_lib.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../src -I../lib -I../tinycrypt/lib/include -I../tinycrypt/lib/source -g -O2 -o test_bgp_route_exchange.exe test_bgp_route_exchange-test_bgp_route_exchange.o ../src/utun-config_parser.o ../src/utun-config_updater.o ../src/utun-route_lib.o ../src/utun-route_bgp.o ../src/utun-routing.o ../src/utun-tun_if.o ../src/utun-tun_windows.o ../src/utun-utun_instance.o ../src/utun-etcp.o ../src/utun-etcp_connections.o ../src/utun-etcp_loadbalancer.o ../src/utun-pkt_normalizer.o ../src/utun-etcp_api.o ../src/utun-secure_channel.o ../src/utun-crc32.o -lcrypto ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../lib -g -O2 -o bench_timeout_heap.exe bench_timeout_heap-bench_timeout_heap.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
x86_64-w64-mingw32-gcc -I../lib -g -O2 -o bench_uasync_timeouts.exe bench_uasync_timeouts-bench_uasync_timeouts.o ../lib/libuasync.a -lpthread -lws2_32 -liphlpapi -ladvapi32 -lcrypto
make[3]: Leaving directory '/c/ARM/_uTun/utun2/tests'
make[2]: Leaving directory '/c/ARM/_uTun/utun2/tests'
make[2]: Entering directory '/c/ARM/_uTun/utun2'
make[2]: Leaving directory '/c/ARM/_uTun/utun2'
make[1]: Leaving directory '/c/ARM/_uTun/utun2'
make: *** [Makefile:320: all] Error 2
ERROR: Build failed!
Check build_win.log (Windows) or build_linux.log (Linux) for details
Build completed successfully!
Binary: src/utun.exe
Make sure wintun.dll is in the same directory as utun.exe

187
c_util1

@ -1,187 +0,0 @@
#!/usr/bin/python3
import sys
import os
import subprocess
from pycparser import parse_file, c_ast, CParser
import re
def read_filelist(filename='filelist.txt'):
with open(filename, 'r') as f:
return [line.strip() for line in f if line.strip()]
def preprocess_file(filename):
# Препроцессинг с помощью cpp (GCC preprocessor)
try:
preprocessed = subprocess.check_output(['cpp', '-nostdinc', filename]).decode('utf-8')
return preprocessed.splitlines()
except subprocess.CalledProcessError as e:
print(f"Error preprocessing {filename}: {e}")
return None
def collect_comments_and_code(lines):
# Собираем комментарии и очищаем код для парсинга (pycparser игнорирует комментарии)
comments = {}
clean_lines = []
in_multi = False
current_comment = []
line_num = 0
for line in lines:
line_num += 1
stripped = line.strip()
if in_multi:
end = line.find('*/')
if end != -1:
current_comment.append(line[:end+2])
in_multi = False
# Добавляем остаток строки как код
rest = line[end+2:]
if rest.strip():
clean_lines.append(rest)
comments[line_num] = '\n'.join(current_comment)
current_comment = []
else:
current_comment.append(line)
else:
if stripped.startswith('//'):
comments[line_num] = line
elif stripped.startswith('/*'):
if '*/' in stripped:
comments[line_num] = line
else:
in_multi = True
current_comment = [line]
else:
clean_lines.append(line)
return comments, '\n'.join(clean_lines)
class FuncVisitor(c_ast.NodeVisitor):
def __init__(self, comments):
self.functions = []
self.structs = []
self.comments = comments
def visit_FuncDef(self, node):
# Извлекаем функцию
ret = node.decl.type.type.type.names[0] if hasattr(node.decl.type.type, 'type') else 'void'
name = node.decl.name
args = ', '.join([p.type.type.names[0] + ' ' + p.name for p in node.decl.type.args.params]) if node.decl.type.args else ''
pre_comments = []
# Собираем комментарии перед функцией (приблизительно по coord)
if node.coord:
line = node.coord.line
for l in range(line-1, 0, -1):
if l in self.comments and (self.comments[l].startswith('//') or self.comments[l].startswith('/*')):
pre_comments.insert(0, self.comments[l])
else:
break
body_lines = len(node.body.block_items) if node.body else 0 # Приблизительное число строк
self.functions.append({
'type': 'function', 'name': name, 'args': args, 'ret': ret,
'pre': pre_comments, 'line_count': body_lines + 2, # + декларация и скобки
'start': node.coord.line - 1 if node.coord else 0,
'end': node.coord.line + body_lines if node.coord else 0,
'node': node
})
self.generic_visit(node)
def visit_Struct(self, node):
# Извлекаем структуру
name = node.name
pre_comments = []
if node.coord:
line = node.coord.line
for l in range(line-1, 0, -1):
if l in self.comments and (self.comments[l].startswith('//') or self.comments[l].startswith('/*')):
pre_comments.insert(0, self.comments[l])
else:
break
line_count = len(node.decls) + 2 if node.decls else 2
self.structs.append({
'type': 'struct', 'name': name,
'pre': pre_comments, 'line_count': line_count,
'start': node.coord.line - 1 if node.coord else 0,
'end': node.coord.line + line_count if node.coord else 0,
'node': node
})
self.generic_visit(node)
def parse_c_file(filename, comments):
ast = parse_file(filename, use_cpp=False) # Уже препроцессировано
visitor = FuncVisitor(comments)
visitor.visit(ast)
return visitor.functions, visitor.structs
if __name__ == "__main__":
files = read_filelist()
project_functions = {}
project_structs = {}
contents = {} # Оригинальный код для вывода
for f in files:
contents[f] = open(f, 'r').read().splitlines()
pre_lines = preprocess_file(f)
if pre_lines is None:
continue
comments, clean_code = collect_comments_and_code(pre_lines)
# Записываем очищенный код во временный файл для pycparser
tmp_file = f + '.pre'
with open(tmp_file, 'w') as tf:
tf.write(clean_code)
try:
funcs, structs = parse_c_file(tmp_file, comments)
project_functions[f] = funcs
project_structs[f] = structs
except Exception as e:
print(f"Parse error in {f}: {e}")
finally:
os.remove(tmp_file)
if len(sys.argv) < 2:
print("Usage: python c_util.py toc | func <file> <funcname> | struct <file> <structname>")
sys.exit(1)
cmd = sys.argv[1]
if cmd == 'toc':
for f in files:
print(f"File: {f}")
for func in project_functions.get(f, []):
print(f"Function: {func['ret']} {func['name']}({func['args']}) - {func['line_count']} lines")
for strct in project_structs.get(f, []):
print(f"Struct: {strct['name']} - {strct['line_count']} lines") # Добавил вывод структур в TOC
elif cmd == 'func':
if len(sys.argv) < 4:
print("Usage: python c_util.py func <file> <funcname>")
sys.exit(1)
file = sys.argv[2]
funcname = sys.argv[3]
found = False
if file in project_functions:
for func in project_functions[file]:
if func['name'] == funcname:
lines = contents[file]
pre = func['pre']
body = lines[func['start']:func['end']]
print('\n'.join(pre + body))
found = True
break
if not found:
print("Function not found")
elif cmd == 'struct':
if len(sys.argv) < 4:
print("Usage: python c_util.py struct <file> <structname>")
sys.exit(1)
file = sys.argv[2]
structname = sys.argv[3]
found = False
if file in project_structs:
for strct in project_structs[file]:
if strct['name'] == structname:
lines = contents[file]
pre = strct['pre']
body = lines[strct['start']:strct['end']]
print('\n'.join(pre + body))
found = True
break
if not found:
print("Struct not found")
else:
print("Unknown command")

109
cl

@ -0,0 +1,109 @@
Making distclean in lib
make[1]: Entering directory '/c/ARM/_uTun/utun2/lib'
rm -rf ../build
test -z "libuasync.a" || rm -f libuasync.a
rm -f *.o
rm -f *.tab.c
test -z "" || rm -f
test . = "." || test -z "" || rm -f
rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
rm -f ./.deps/libuasync_a-debug_config.Po
rm -f ./.deps/libuasync_a-ll_queue.Po
rm -f ./.deps/libuasync_a-memory_pool.Po
rm -f ./.deps/libuasync_a-sha256.Po
rm -f ./.deps/libuasync_a-socket_compat.Po
rm -f ./.deps/libuasync_a-timeout_heap.Po
rm -f ./.deps/libuasync_a-u_async.Po
rm -f Makefile
make[1]: Leaving directory '/c/ARM/_uTun/utun2/lib'
Making distclean in src
make[1]: Entering directory '/c/ARM/_uTun/utun2/src'
test -z "utun.exe" || rm -f utun.exe
rm -f *.o
rm -f ../tinycrypt/lib/source/*.o
rm -f *.tab.c
test -z "" || rm -f
test . = "." || test -z "" || rm -f
test -z "../tinycrypt/lib/source/.deps/.dirstamp" || rm -f ../tinycrypt/lib/source/.deps/.dirstamp
test -z "../tinycrypt/lib/source/.dirstamp" || rm -f ../tinycrypt/lib/source/.dirstamp
rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
rm -f ../tinycrypt/lib/source/.deps/utun-aes_decrypt.Po
rm -f ../tinycrypt/lib/source/.deps/utun-aes_encrypt.Po
rm -f ../tinycrypt/lib/source/.deps/utun-cbc_mode.Po
rm -f ../tinycrypt/lib/source/.deps/utun-ccm_mode.Po
rm -f ../tinycrypt/lib/source/.deps/utun-cmac_mode.Po
rm -f ../tinycrypt/lib/source/.deps/utun-ctr_mode.Po
rm -f ../tinycrypt/lib/source/.deps/utun-ecc.Po
rm -f ../tinycrypt/lib/source/.deps/utun-ecc_dh.Po
rm -f ../tinycrypt/lib/source/.deps/utun-ecc_dsa.Po
rm -f ../tinycrypt/lib/source/.deps/utun-ecc_platform_specific.Po
rm -f ../tinycrypt/lib/source/.deps/utun-hmac.Po
rm -f ../tinycrypt/lib/source/.deps/utun-sha256.Po
rm -f ../tinycrypt/lib/source/.deps/utun-utils.Po
rm -f ./.deps/utun-config_parser.Po
rm -f ./.deps/utun-config_updater.Po
rm -f ./.deps/utun-crc32.Po
rm -f ./.deps/utun-etcp.Po
rm -f ./.deps/utun-etcp_api.Po
rm -f ./.deps/utun-etcp_connections.Po
rm -f ./.deps/utun-etcp_loadbalancer.Po
rm -f ./.deps/utun-pkt_normalizer.Po
rm -f ./.deps/utun-route_bgp.Po
rm -f ./.deps/utun-route_lib.Po
rm -f ./.deps/utun-routing.Po
rm -f ./.deps/utun-secure_channel.Po
rm -f ./.deps/utun-tun_if.Po
rm -f ./.deps/utun-tun_linux.Po
rm -f ./.deps/utun-tun_windows.Po
rm -f ./.deps/utun-utun.Po
rm -f ./.deps/utun-utun_instance.Po
rm -f Makefile
make[1]: Leaving directory '/c/ARM/_uTun/utun2/src'
Making distclean in tests
make[1]: Entering directory '/c/ARM/_uTun/utun2/tests'
test -z "test_etcp_crypto.exe test_crypto.exe test_etcp_two_instances.exe test_etcp_simple_traffic.exe test_etcp_minimal.exe test_etcp_100_packets.exe test_pkt_normalizer_etcp.exe test_pkt_normalizer_standalone.exe test_etcp_api.exe test_ll_queue.exe test_ecc_encrypt.exe test_intensive_memory_pool.exe test_memory_pool_and_config.exe test_packet_dump.exe test_u_async_comprehensive.exe test_u_async_performance.exe test_debug_categories.exe test_config_debug.exe test_route_lib.exe test_bgp_route_exchange.exe bench_timeout_heap.exe bench_uasync_timeouts.exe" || rm -f test_etcp_crypto.exe test_crypto.exe test_etcp_two_instances.exe test_etcp_simple_traffic.exe test_etcp_minimal.exe test_etcp_100_packets.exe test_pkt_normalizer_etcp.exe test_pkt_normalizer_standalone.exe test_etcp_api.exe test_ll_queue.exe test_ecc_encrypt.exe test_intensive_memory_pool.exe test_memory_pool_and_config.exe test_packet_dump.exe test_u_async_comprehensive.exe test_u_async_performance.exe test_debug_categories.exe test_config_debug.exe test_route_lib.exe test_bgp_route_exchange.exe bench_timeout_heap.exe bench_uasync_timeouts.exe
rm -f test_etcp_crypto.exe test_crypto.exe test_etcp_two_instances.exe test_etcp_simple_traffic.exe test_etcp_minimal.exe test_etcp_100_packets.exe test_pkt_normalizer_etcp.exe test_pkt_normalizer_standalone.exe test_etcp_api.exe test_ll_queue.exe test_ecc_encrypt.exe test_intensive_memory_pool.exe test_memory_pool_and_config.exe test_packet_dump.exe test_u_async_comprehensive.exe test_u_async_performance.exe test_debug_categories.exe test_config_debug.exe test_route_lib.exe test_bgp_route_exchange.exe bench_timeout_heap.exe bench_uasync_timeouts.exe
rm -f ../tests/test_*.conf ../tests/test_*.json 2>/dev/null || true
rm -rf ../tests/logs 2>/dev/null || true
rm -f *.o
test -z "test_etcp_crypto.log test_crypto.log test_etcp_two_instances.log test_etcp_simple_traffic.log test_etcp_minimal.log test_etcp_100_packets.log test_pkt_normalizer_etcp.log test_pkt_normalizer_standalone.log test_etcp_api.log test_ll_queue.log test_ecc_encrypt.log test_intensive_memory_pool.log test_memory_pool_and_config.log test_packet_dump.log test_u_async_comprehensive.log test_u_async_performance.log test_debug_categories.log test_config_debug.log test_route_lib.log test_bgp_route_exchange.log bench_timeout_heap.log bench_uasync_timeouts.log" || rm -f test_etcp_crypto.log test_crypto.log test_etcp_two_instances.log test_etcp_simple_traffic.log test_etcp_minimal.log test_etcp_100_packets.log test_pkt_normalizer_etcp.log test_pkt_normalizer_standalone.log test_etcp_api.log test_ll_queue.log test_ecc_encrypt.log test_intensive_memory_pool.log test_memory_pool_and_config.log test_packet_dump.log test_u_async_comprehensive.log test_u_async_performance.log test_debug_categories.log test_config_debug.log test_route_lib.log test_bgp_route_exchange.log bench_timeout_heap.log bench_uasync_timeouts.log
test -z "test_etcp_crypto.trs test_crypto.trs test_etcp_two_instances.trs test_etcp_simple_traffic.trs test_etcp_minimal.trs test_etcp_100_packets.trs test_pkt_normalizer_etcp.trs test_pkt_normalizer_standalone.trs test_etcp_api.trs test_ll_queue.trs test_ecc_encrypt.trs test_intensive_memory_pool.trs test_memory_pool_and_config.trs test_packet_dump.trs test_u_async_comprehensive.trs test_u_async_performance.trs test_debug_categories.trs test_config_debug.trs test_route_lib.trs test_bgp_route_exchange.trs bench_timeout_heap.trs bench_uasync_timeouts.trs" || rm -f test_etcp_crypto.trs test_crypto.trs test_etcp_two_instances.trs test_etcp_simple_traffic.trs test_etcp_minimal.trs test_etcp_100_packets.trs test_pkt_normalizer_etcp.trs test_pkt_normalizer_standalone.trs test_etcp_api.trs test_ll_queue.trs test_ecc_encrypt.trs test_intensive_memory_pool.trs test_memory_pool_and_config.trs test_packet_dump.trs test_u_async_comprehensive.trs test_u_async_performance.trs test_debug_categories.trs test_config_debug.trs test_route_lib.trs test_bgp_route_exchange.trs bench_timeout_heap.trs bench_uasync_timeouts.trs
test -z "test-suite.log" || rm -f test-suite.log
rm -f *.tab.c
test -z "" || rm -f
test . = "." || test -z "" || rm -f
rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
rm -f ./.deps/bench_timeout_heap-bench_timeout_heap.Po
rm -f ./.deps/bench_uasync_timeouts-bench_uasync_timeouts.Po
rm -f ./.deps/test_bgp_route_exchange-test_bgp_route_exchange.Po
rm -f ./.deps/test_config_debug-test_config_debug.Po
rm -f ./.deps/test_crypto-test_crypto.Po
rm -f ./.deps/test_debug_categories-test_debug_categories.Po
rm -f ./.deps/test_ecc_encrypt-test_ecc_encrypt.Po
rm -f ./.deps/test_etcp_100_packets-test_etcp_100_packets.Po
rm -f ./.deps/test_etcp_api-test_etcp_api.Po
rm -f ./.deps/test_etcp_crypto-test_etcp_crypto.Po
rm -f ./.deps/test_etcp_minimal-test_etcp_minimal.Po
rm -f ./.deps/test_etcp_simple_traffic-test_etcp_simple_traffic.Po
rm -f ./.deps/test_etcp_two_instances-test_etcp_two_instances.Po
rm -f ./.deps/test_intensive_memory_pool-test_intensive_memory_pool.Po
rm -f ./.deps/test_ll_queue-test_ll_queue.Po
rm -f ./.deps/test_memory_pool_and_config-test_memory_pool_and_config.Po
rm -f ./.deps/test_packet_dump-test_packet_dump.Po
rm -f ./.deps/test_pkt_normalizer_etcp-test_pkt_normalizer_etcp.Po
rm -f ./.deps/test_pkt_normalizer_standalone-test_pkt_normalizer_standalone.Po
rm -f ./.deps/test_route_lib-test_route_lib.Po
rm -f ./.deps/test_u_async_comprehensive-test_u_async_comprehensive.Po
rm -f ./.deps/test_u_async_performance-test_u_async_performance.Po
rm -f Makefile
make[1]: Leaving directory '/c/ARM/_uTun/utun2/tests'
make[1]: Entering directory '/c/ARM/_uTun/utun2'
rm -rf build
test -z "" || rm -f
test . = "." || test -z "" || rm -f
rm -f config.h stamp-h1
rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
rm -f cscope.out cscope.in.out cscope.po.out cscope.files
make[1]: Leaving directory '/c/ARM/_uTun/utun2'
rm -f config.status config.cache config.log configure.lineno config.status.lineno
rm -f Makefile

83
configure.log

@ -0,0 +1,83 @@
configure: loading site script /etc/config.site
checking for x86_64-w64-mingw32-gcc... x86_64-w64-mingw32-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether x86_64-w64-mingw32-gcc accepts -g... yes
checking for x86_64-w64-mingw32-gcc option to enable C11 features... none needed
checking whether x86_64-w64-mingw32-gcc understands -c and -o together... yes
checking for x86_64-w64-mingw32-ranlib... no
checking for ranlib... ranlib
checking for x86_64-w64-mingw32-ar... no
checking for x86_64-w64-mingw32-lib... no
checking for x86_64-w64-mingw32-link... no
checking for ar... ar
checking the archiver (ar) interface... ar
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking whether make supports nested variables... yes
checking dependency style of x86_64-w64-mingw32-gcc... gcc3
checking whether make sets $(MAKE)... (cached) yes
checking for SHA256_Init in -lcrypto... yes
checking for Windows... yes
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for arpa/inet.h... no
checking for fcntl.h... yes
checking for limits.h... yes
checking for netinet/in.h... no
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for sys/ioctl.h... no
checking for sys/socket.h... no
checking for unistd.h... (cached) yes
checking for size_t... yes
checking for ssize_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uint8_t... yes
checking for inline... inline
checking build system type... x86_64-w64-mingw32
checking host system type... x86_64-w64-mingw32
checking for GNU libc compatible malloc... yes
checking for gettimeofday... yes
checking for memset... yes
checking for socket... no
checking for strchr... yes
checking for strdup... yes
checking for strerror... yes
checking for strstr... yes
checking for TUN/TAP support... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating tests/Makefile
config.status: creating lib/Makefile
config.status: creating config.h
config.status: executing depfiles commands
Configuration summary:
----------------------
Prefix: /usr/local
Compiler: x86_64-w64-mingw32-gcc
CFLAGS: -g -O2
Features:
TUN/TAP:

38
debug_ll_queue.c

@ -1,38 +0,0 @@
#include "lib/ll_queue.h"
#include "lib/u_async.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
int id;
char name[32];
int value;
} test_data_t;
int main() {
struct UASYNC* ua = uasync_create();
struct ll_queue* q = queue_new(ua, 0);
/* Create test data */
test_data_t* data1 = (test_data_t*)queue_data_new(sizeof(test_data_t));
data1->id = 1;
strcpy(data1->name, "test1");
data1->value = 100;
printf("Created data: id=%d, name=%s, value=%d\n", data1->id, data1->name, data1->value);
printf("Data pointer: %p\n", data1);
/* Put data into queue */
queue_data_put(q, data1, data1->id);
printf("After put: queue count = %d\n", queue_entry_count(q));
/* Get data from queue */
test_data_t* retrieved = (test_data_t*)queue_data_get(q);
printf("Retrieved pointer: %p\n", retrieved);
printf("Retrieved data: id=%d, name=%s, value=%d\n", retrieved->id, retrieved->name, retrieved->value);
queue_free(q);
uasync_destroy(ua, 0);
return 0;
}

47
debug_performance.c

@ -1,47 +0,0 @@
#include "../lib/u_async.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/socket.h>
#include <fcntl.h>
static void test_callback(int fd, void* arg) {
(void)fd; (void)arg;
}
int main() {
uasync_t* ua = uasync_create();
if (!ua) return 1;
printf("=== Debug Performance Test ===\n");
// Test 1: Normal add/remove
int sock1 = socket(AF_INET, SOCK_DGRAM, 0);
void* id1 = uasync_add_socket(ua, sock1, test_callback, NULL, NULL, NULL);
printf("Added socket %d: id=%p\n", sock1, id1);
size_t alloc1, free1, alloc2, free2;
uasync_get_stats(ua, &alloc1, &free1, &alloc2, &free2);
printf("After add: timers %zu/%zu, sockets %zu/%zu\n", alloc1, free1, alloc2, free2);
uasync_remove_socket(ua, id1);
printf("Removed socket %d\n", sock1);
uasync_get_stats(ua, &alloc1, &free1, &alloc2, &free2);
printf("After remove: timers %zu/%zu, sockets %zu/%zu\n", alloc1, free1, alloc2, free2);
close(sock1);
// Test 2: Failed add
int sock2 = 9999; // Invalid socket
void* id2 = uasync_add_socket(ua, sock2, test_callback, NULL, NULL, NULL);
printf("Tried to add invalid socket %d: id=%p\n", sock2, id2);
uasync_get_stats(ua, &alloc1, &free1, &alloc2, &free2);
printf("After failed add: timers %zu/%zu, sockets %zu/%zu\n", alloc1, free1, alloc2, free2);
uasync_destroy(ua, 0);
printf("Destroyed uasync\n");
return 0;
}

37
simple_test.c

@ -1,37 +0,0 @@
#include "../lib/u_async.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/socket.h>
#include <fcntl.h>
static void test_callback(int fd, void* arg) {
(void)fd; (void)arg;
}
int main() {
uasync_t* ua = uasync_create();
if (!ua) return 1;
printf("=== Simple Corruption Test ===\n");
// Create just one socket
int sock = socket(AF_INET, SOCK_DGRAM, 0);
printf("Created socket with fd=%d\n", sock);
void* id = uasync_add_socket(ua, sock, test_callback, NULL, NULL, NULL);
printf("Added socket: fd=%d, id=%p\n", sock, id);
// Check if fd is still correct
struct socket_node* node = (struct socket_node*)id;
printf("Node fd after add: %d\n", node->fd);
// Try to remove immediately (no polling)
int result = uasync_remove_socket(ua, id);
printf("Remove result: %d\n", result);
close(sock);
uasync_destroy(ua, 0);
return 0;
}

6
tests/logs/test_crypto.log

@ -0,0 +1,6 @@
[16:39:30-886.734] [INFO] [16] (test_crypto.c:16) main() === Basic Crypto Test ===
[16:39:30-888.044] [INFO] [16] (test_crypto.c:27) main() AES key setup successful
[16:39:30-888.092] [INFO] [16] (test_crypto.c:38) main() CCM config successful
[16:39:30-888.126] [INFO] [16] (test_crypto.c:50) main() Encryption successful
[16:39:30-888.162] [INFO] [16] (test_crypto.c:58) main() Decryption successful
[16:39:30-888.186] [INFO] [16] (test_crypto.c:61) main() Crypto test PASSED

6
tests/logs/test_etcp_crypto.log

@ -0,0 +1,6 @@
[16:39:30-839.015] [INFO] [16] (test_etcp_crypto.c:17) main() === ETCP Crypto Test ===
[16:39:30-855.810] [ERROR] [16] (secure_channel.c:211) sc_set_peer_public_key() sc_set_peer_public_key: invalid key
[16:39:30-855.934] [ERROR] [16] (secure_channel.c:211) sc_set_peer_public_key() sc_set_peer_public_key: invalid key
[16:39:30-855.968] [INFO] [16] (test_etcp_crypto.c:54) main() Crypto contexts initialized
[16:39:30-869.483] [INFO] [16] (test_etcp_crypto.c:77) main() Client->Server encryption/decryption: PASSED
[16:39:30-869.534] [INFO] [16] (test_etcp_crypto.c:78) main() ETCP crypto test PASSED

1732
tests/logs/test_etcp_two_instances.log

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save