Skip to Content.
Sympa Menu

freetds - Re: [freetds] connect(2) for UDP

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Jackson, Craig (Gale)" <Craig.Jackson AT cengage.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] connect(2) for UDP
  • Date: Mon, 15 Dec 2008 23:52:54 -0500


> I got the idea from Chapter 8.11 of Stevens's "Unix Network Programming",
> Volume 1, 3rd edition, page 252.  And he says what you said:
>
> "[T]he kernel just checks for any immediate errors ... records the IP
> address and port number of the peer ... and returns immediately to the
> calling process."

Yep. For UDP, having the other end not be listening is not an immediate
error.

> The same program, when trying to communicate with a down host, times out
> reading. Not surprising, on reflection, because there's no machine to
> send that ICMP message.

Note that some last-hop routers will make an ICMP Host Unreachable response
on a down host, because the ARP fails. I don't know if this will be turned
into a useful diagnostic by the UDP layer. In any case, it takes some time
for it to decide if the ARP has timed out.

Craig



Archive powered by MHonArc 2.6.24.

Top of Page