Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: timeout

From: holger:rebol at: 10-Apr-2001 21:55

On Tue, Apr 10, 2001 at 10:36:08PM -0500, Harold Grovesteen wrote:
> Not true.
Yes, it is :-). Check the sources (BSD e.g.) or just use tcpdump to watch what happens.
> The ICMP port unreachable message relates to whether and > application is accepting connections or not from the port. A TCP RST is > sent when an non SYN message is received for a non-existent TCP > connection on the receiving system.
A TCP RST is sent in lots of different situations. In the sources of the (inofficial reference implementation) BSD 4.x this is triggered by a jump to dropwithreset within tcp_input(). "dropwithreset" is reached in many situations, one of which is when the PCB search comes up empty, i.e. if no listening socket on the specified address/port combination exists. Pretty much all TCP/IP-enabled operating systems with the exception of Linux and some embedded systems are based on BSD and inherit this behavior.
> Refer to the TCP RFC for details.
Yes, please do. RFC 793, 3.4, "Reset Generation" state 1: "If the connection does not exist (CLOSED) then a reset is sent in response to any incoming segment except another reset." ("CLOSED" in TCP terminology includes the case of not having a listener on an address/port combination.) Or check Stevens' TCP/IP Illustrated Vol 2, 28.2: "If the PCB was not found, the input segment is dropped and an RST is sent as a reply. This is how TCP handles SYNs that arrive for a server that doesn't exist, for example." You are probably confusing TCP with UDP. UDP does not have connection semantics or control packets of its own, and therefore falls back to ICMP for reporting unreachable ports. TCP never causes "ICMP port unreachable" messages, except as part of firewalling. In any case, we are getting off topic here... -- Holger Kruse [holger--rebol--com]