[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] TCP keep alive info to the application
From: |
Simon Goldschmidt |
Subject: |
Re: [lwip-users] TCP keep alive info to the application |
Date: |
Mon, 30 May 2016 07:59:44 +0200 |
Frédéric Grandjean wrote:
> My device running LwIP can be connected to a software on a window machine.
> When connected, this software sends periodic TCP KEEP ALIVE and the device
> answer
> to them, even when #define LWIP_TCP_KEEPALIVE is set to 0 (which is fine for
> me).
LWIP_TCP_KEEPALIVE controls whether lwIP sends keepalive frames to the remote
host.
Setting it to 0 does, of course, not disable answering to them when received
from
the remote host. These frames *must* be answered like any other segment or else
your
TCP stack would be broken.
> I need to know when the SW has sent this KEEP ALIVE in my application, so
> that I
> can make some actions. Is there a way to do this ?
Unfortunately, there is nothing implemetented to get callbacks non-app-layer
TCP events.
If you really, *really* need this in the way you describe (which I would
doubt), you'd
have to implement that yourself by changing tcp_in.c and getting incompatible
to "vanilla"
lwIP.
Simon