jes wrote:
We've discovered that the NicheLite IP stack apparently does NOT recognize a loss of connection on a telnet session (server running the NicheLite stack) when the client equipment is powered down. We are expecting this to result in an M_CLOSED indication by lower layer to the callback function, but this apparently doesn't arrive. ...
Also, according to our IT dept, a CAT5 cable disconnect on an existing session ought to similarly result in a report of loss of connection for security reasons (ie someone trying to spoof a previously existing connection), but it does not do this either.
I think you've run into a DECADES old misunderstanding here.
There is no mechanism in TCP to time out a connection (there is, but see later). A "Feature" of TCP is the ability to set up a connection, take down the connection between the two computers for a WEEK, reconnect and have the connection remain established. This is a deliberate feature.
If your Application requires a "disconnection notification" then it is the APPLICATION'S problem and is not TCP's.
TCP has a contentious "TCP Keepalive" documented here:
http://tools.ietf.org/html/rfc1122#page-101
Also here (click on "Read more" at the bottom and search for "keepalive"):
http://groups.google.com/group/comp.answers/msg/cd072527fe89c44c?&q=faq
Because of the fear of the internet being bought down by everything sending keep-alives all the time, the specification listed above is to have the "Keepalive Time" default to two HOURS. It has never been used or supported by anything.
You're looking at doing something different though. In your application you are expecting that unplugging the Ethernet Cable will signal up to the TCP and Application that the link has gone down. Maybe and maybe not. I wouldn't expect this to always work. Simple network devices might be able to do this. More complicated one with multiple connected networks might not. Just because a PC does it doesn't make it right :smileyhappy:.
It certainly won't work if there's a HUB between the client and the server. The hub will be providing the link indication to the server and it won't ever signal client disconnection or power-off.
If you want 'connection security" then that's a problem for the "connection".