[En-Nut-Discussion] media sense/cable detect

Austin Schutz tex at off.org
Wed Sep 17 20:25:39 CEST 2003


On Wed, Sep 17, 2003 at 09:56:53AM +0200, Harald Kipp wrote:
> Hi Damian,
> 
> 
> >has anyone looked at media sense to detect if the cable is unplugged, like 
> >Windows2000/XP?
> >
> >When the cable is unplugged all TCP connections can be flaged as closed.
> 
> Does Windows do this?
> 
> TCP rules define, that a connection should _not_ be closed on lower
> level problems. The application may close the connection on
> transmit failures.
> 
> If one node is receiving and the remote is switched off, the
> receiver will never detect the loss. It may use a socket timeout
> (supported by Nut/Net) or set the KEEPALIVE option (not supported
> by Nut/Net).
> 
> Beside that, it would still make a lot of sense to detect a link
> loss, but I never tried. Anyone else?
> 

	If the link is down it should flag packets going to that interface
with an icmp network unreachable, or something like that. The received icmp
should be interpreted by the device as being a good reason to close the
connection. Or something like that. I'm not _that_ familiar with the
exact method.

	Austin



More information about the En-Nut-Discussion mailing list