diff --git a/src/core/tcp.c b/src/core/tcp.c index cd4ea31b..57b2a1a9 100644 --- a/src/core/tcp.c +++ b/src/core/tcp.c @@ -1302,6 +1302,12 @@ tcp_eff_send_mss(u16_t sendmss, struct ip_addr *addr) } #endif /* TCP_CALCULATE_EFF_SEND_MSS */ +const char* +tcp_debug_state_str(enum tcp_state s) +{ + return tcp_state_str[s]; +} + #if TCP_DEBUG || TCP_INPUT_DEBUG || TCP_OUTPUT_DEBUG /** * Print a tcp header for debugging purposes. @@ -1339,12 +1345,6 @@ tcp_debug_print(struct tcp_hdr *tcphdr) LWIP_DEBUGF(TCP_DEBUG, ("+-------------------------------+\n")); } -const char* -tcp_debug_state_str(enum tcp_state s) -{ - return tcp_state_str[s]; -} - /** * Print a tcp state for debugging purposes. * diff --git a/src/include/lwip/tcp.h b/src/include/lwip/tcp.h index 6ce05fd4..2efa0860 100644 --- a/src/include/lwip/tcp.h +++ b/src/include/lwip/tcp.h @@ -587,10 +587,10 @@ u16_t tcp_eff_send_mss(u16_t sendmss, struct ip_addr *addr); extern struct tcp_pcb *tcp_input_pcb; extern u32_t tcp_ticks; +const char* tcp_debug_state_str(enum tcp_state s); #if TCP_DEBUG || TCP_INPUT_DEBUG || TCP_OUTPUT_DEBUG void tcp_debug_print(struct tcp_hdr *tcphdr); void tcp_debug_print_flags(u8_t flags); -const char* tcp_debug_state_str(enum tcp_state s); void tcp_debug_print_state(enum tcp_state s); void tcp_debug_print_pcbs(void); s16_t tcp_pcbs_sane(void);