|
|
|
|
@ -102,7 +102,7 @@ static void burst_resp_timeout_cb(void* arg) {
|
|
|
|
|
|
|
|
|
|
static void etcp_link_send_init(struct ETCP_LINK* link, uint8_t reset, uint8_t collision) { |
|
|
|
|
DEBUG_TRACE(DEBUG_CATEGORY_CONNECTION, ""); |
|
|
|
|
DEBUG_INFO(DEBUG_CATEGORY_CONNECTION, "link=%p, is_server=%d, reset=%d, collision=%d", link, link ? link->is_server : -1, reset, collision); |
|
|
|
|
DEBUG_DEBUG(DEBUG_CATEGORY_CONNECTION, "link=%p, is_server=%d, reset=%d, collision=%d", link, link ? link->is_server : -1, reset, collision); |
|
|
|
|
if (!link || !link->etcp || !link->etcp->instance) return; |
|
|
|
|
|
|
|
|
|
struct ETCP_DGRAM* dgram = u_malloc(PACKET_DATA_SIZE); |
|
|
|
|
@ -173,10 +173,10 @@ static void etcp_link_send_init(struct ETCP_LINK* link, uint8_t reset, uint8_t c
|
|
|
|
|
// Debug: print remote address before sending
|
|
|
|
|
if (link->remote_addr.ss_family == AF_INET) { |
|
|
|
|
struct sockaddr_in* sin = (struct sockaddr_in*)&link->remote_addr; |
|
|
|
|
DEBUG_INFO(DEBUG_CATEGORY_ETCP, "[ETCP] INIT sending to %s:%d, link=%p, rst_req=%d", ip_to_str(&sin->sin_addr, AF_INET).str, ntohs(sin->sin_port), link, reset); |
|
|
|
|
DEBUG_DEBUG(DEBUG_CATEGORY_ETCP, "[ETCP] INIT sending to %s:%d, link=%p, rst_req=%d", ip_to_str(&sin->sin_addr, AF_INET).str, ntohs(sin->sin_port), link, reset); |
|
|
|
|
} else if (link->remote_addr.ss_family == AF_INET6) { |
|
|
|
|
struct sockaddr_in6* sin6 = (struct sockaddr_in6*)&link->remote_addr; |
|
|
|
|
DEBUG_INFO(DEBUG_CATEGORY_ETCP, "[ETCP] INIT sending to %s:%d, link=%p, rst_req=%d", ip_to_str(&sin6->sin6_addr, AF_INET6).str, ntohs(sin6->sin6_port), link, reset); |
|
|
|
|
DEBUG_DEBUG(DEBUG_CATEGORY_ETCP, "[ETCP] INIT sending to %s:%d, link=%p, rst_req=%d", ip_to_str(&sin6->sin6_addr, AF_INET6).str, ntohs(sin6->sin6_port), link, reset); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
etcp_encrypt_send(dgram); |
|
|
|
|
|