This commit is contained in:
jeka committed 2026-03-05 21:16:02 +03:00
1 parent 614a891575
commit 76555f019b
3 files changed
+6 -11

No files matched your search

+1 -10
View File
@@ -24,15 +24,6 @@ static void etcp_connections_read_callback_socket(socket_t sock, void* arg);
struct ETCP_CONN* etcp_connection_create(struct UTUN_INSTANCE* instance);
static void etcp_link_remove_from_connections(struct ETCP_SOCKET* conn, struct ETCP_LINK* link);
// Unified packet dump function - uses configured format
static void packet_dump(const char* prefix, const uint8_t* data, size_t len, struct ETCP_LINK* link) {
DEBUG_TRACE(DEBUG_CATEGORY_CONNECTION, "");
if (!data || len == 0) return;
// Full multi-line format (legacy)
log_dump(prefix, data, len);
}
static void etcp_link_send_init(struct ETCP_LINK* link, uint8_t reset);
static int etcp_link_send_reset(struct ETCP_LINK* link);
static void etcp_link_init_timer_cbk(void* arg);
@@ -1115,7 +1106,7 @@ process_decrypted:
return; // INIT_RESPONSE is handled, no further processing needed
}
// packet_dump("RECV decrypted:", pkt->data, pkt->data_len, link);
// log_dump("RECV decrypted:", pkt->data, pkt->data_len, link);
etcp_conn_input(pkt);
return;
+4
View File
@@ -208,6 +208,8 @@ static void pn_send_to_etcp(struct PKTNORM* pn) {
frag->ll.memlen = pn->etcp->instance->data_pool->object_size;
DEBUG_INFO(DEBUG_CATEGORY_NORMALIZER, "pn->etcp: size=%d memlen=%d frag_size=%d", frag->ll.len, frag->ll.memlen, pn->frag_size);
if (debug_should_output(DEBUG_LEVEL_DEBUG, DEBUG_CATEGORY_DUMP)) log_dump("NORM->ETCP", pn->data, frag->ll.len);
queue_data_put(pn->etcp->input_queue, (struct ll_entry*)frag, 0);
// Сбросить структуру (dgram передан во фрагмент, не освобождаем)
pn->data = NULL;
@@ -303,6 +305,8 @@ static void pn_unpacker_cb(struct ll_queue* q, void* arg) {
uint8_t* payload = frag->ll.dgram;
uint16_t len = frag->ll.len;
uint16_t ptr = 0;
if (debug_should_output(DEBUG_LEVEL_DEBUG, DEBUG_CATEGORY_DUMP)) log_dump("ETCP->NORM", payload, len);
DEBUG_DEBUG(DEBUG_CATEGORY_NORMALIZER, "unpacking fragment len=%d", len);
while (ptr < len) {