XTCP LWIP: how to handle TCP timeouts

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
magnus
Member
Posts: 13
Joined: Tue Aug 06, 2019 8:40 pm

XTCP LWIP: how to handle TCP timeouts

Post by magnus »

Hi,

It seems to me that the XTCP LWIP stack does not have a way to handle TCP timeouts?
I expected the XTCP_TIMED_OUT event to be fired but while debugging I noticed that it is never used within lib_xtcp (only the uip stack).

Confusingly the api/xtcp.h file does expose the following enum:

Code: Select all

typedef enum {
  ARP_TIMEOUT = 0,
  AUTOIP_TIMEOUT,
  TCP_TIMEOUT,
  IGMP_TIMEOUT,
  DHCP_COARSE_TIMEOUT,
  DHCP_FINE_TIMEOUT,
  NUM_TIMEOUTS
} xtcp_lwip_timeout_type;
But I don't know how I'd use it for anything related to the API.

Have I missed something?


User avatar
akp
XCore Expert
Posts: 578
Joined: Thu Nov 26, 2015 11:47 pm

Post by akp »

That xtcp_lwip_timeout_type is used for firing periodic functions. Are you finding an unexpected behaviour?
magnus
Member
Posts: 13
Joined: Tue Aug 06, 2019 8:40 pm

Post by magnus »

But that seems to be only used internally? (I was just confused whether I could use it for anything since it is in the api header)

The problem I have is that my application never gets notified that a TCP connection has timed out. So if, for whatever reason, a TCP connection has timed out I will never notice and reclaim the resources that have been reserved.
Post Reply