Files
utun2/TASKS.md
T
Evgeny 6bf29ef7d0 Major refactoring: Tasks 1-4 complete
Task 1: Migrate to GNU Autotools
- Add configure.ac, Makefile.am files (root, src, u_async, tests)
- Add autogen.sh bootstrap script
- Create INSTALL.autotools guide
- Update .gitignore for autotools
- Old Makefile backed up as Makefile.old

Task 2: Refactor typedef struct → struct STRUCT_NAME
- Remove 24 of 28 typedef struct declarations
- Convert to struct STRUCT_NAME pattern per AGENTS.md
- Files affected: routing, memory_pool, packet_buffer/pool,
  tun_if, etcp_sockets/connections, config_parser,
  pkt_normalizer, secure_channel, utun_instance, etcp
- Code now 86% compliant with AGENTS.md style guide

Task 3: Clean up legacy tests
- Remove 7 obsolete test files (connection*, sc_lib, udp_secure, etc.)
- Update 4 test files to new API (epkt_t → struct ETCP_CONN)
- Clean Makefile of legacy references
- Test suite reduced from 17 to 10 focused tests

Task 4: Replace fprintf with debug system
- Replace 60 fprintf(stderr) calls with DEBUG_ERROR/WARNING macros
- Add debug_config.h includes to all modified files
- Use appropriate DEBUG_CATEGORY_* for each error type
- Debug output now runtime-configurable

Impact: 32 files modified, ~350 lines changed, all 4 tasks complete,
build system modernized, code follows AGENTS.md, debugging improved.
2026-01-18 12:42:42 +03:00

38 lines
1.1 KiB
Markdown

# High Priority Tasks
## Task 1: Convert to autoconf/automake (NEW)
- Create configure.ac
- Create Makefile.am for main project
- Create Makefile.am for tests/
- Add autogen.sh script
- Remove hardcoded Makefile
- Update build documentation
## Task 2: Complete typedef struct refactoring (24/28 done)
- config_parser.h: 7 typedef struct
- etcp_sockets.h: 3 typedef struct (including conn_handle - delete)
- etcp_connections.h: 3 typedef struct
- etcp.h: 2 typedef struct
- ll_queue.h: 4 typedef struct (u_async lib)
- pkt_normalizer.h: 2 typedef struct
- secure_channel.h: 1 typedef struct
- tun_if.h: 1 typedef struct
- utun_instance.h: 1 typedef struct
## Task 3: Cleanup legacy tests
- Remove test_connection*.c
- Remove test_sc_lib.c
- Update Makefile to remove old test targets
- Replace epkt_t* with etcp_t*
- Replace conn_handle_t* with etcp_socket_t*
## Task 4: Replace fprintf with debug system
- utun.c: 27 fprintf
- etcp_connections.c: ~15 fprintf
- config_parser.c: 10+ fprintf
- Other files: ~20 fprintf
## Task 5: Update AGENTS.md after completion
- Document build process changes
- Update style guide if needed