From: Andi Kleen <ak@suse.de>
To: "Stuart MacDonald" <stuartm@connecttech.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: TCP stack behaviour question
Date: 18 Sep 2006 10:29:12 +0200 [thread overview]
Message-ID: <p73slip4lyf.fsf@verdi.suse.de> (raw)
In-Reply-To: <057a01c6d8ec$4d52c7b0$294b82ce@stuartm>
"Stuart MacDonald" <stuartm@connecttech.com> writes:
> I'm having some trouble with a network application I've written. I've
> done a lot of research the last few days; man 7 ip, man 7 tcp, kernel
> 2.4.31 source code, Stevens' Illustrated TCP/IP Vol 1 & 3 (for some
> reason we don't have Vol 2), Usenet, websites. I'm hoping someone here
> can help me out, or point me in the correct direction.
Stevens is a good reference to BSD networking, but not necessarily to Linux.
> Question 1: There's the original packet, plus 7 retransmitted packets
> for a total of 8, then TCP gives up. How is 7 (or 8) derived from the
> tcp_retries[12] settings?
Documented in tcp(7)
> Question 1a: The time between last and second-last retransmit packets
> is only about 27 seconds. I've read there's a maximum time, but also
> that it's usually 100 or 120 seconds. Where can I find that setting in
> /proc?
It's fixed by the TCP specification.
> Question 2: After the retransmit has given up, the app is still
> making an occasional write(), which succeeds! However, tearing down
> and attemting a new connection results in an immediate EHOSTUNREACH
> error. Why is the write() succeeding?
It goes all in the local buffer, until it starts blocking (or EAGAIN
for non blocking sockets)
>
> Question 2a: How can my app find out the EHOSTUNREACH error
> immediately? IP_RECVERR is not implemented on TCP, and SO_ERROR always
> reports no error (0).
Did you really read the manpages? It is implemented and it's documented.
-Andi (your new temporary manpage proxy)
next prev parent reply other threads:[~2006-09-18 8:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-15 17:28 TCP stack behaviour question Stuart MacDonald
2006-09-18 8:29 ` Andi Kleen [this message]
2006-09-18 13:20 ` Stuart MacDonald
2006-09-18 13:54 ` Andi Kleen
2006-09-18 14:19 ` Stuart MacDonald
2006-09-18 14:31 ` Andi Kleen
2006-09-18 15:38 ` Michael Kerrisk
2006-09-18 17:01 ` Stuart MacDonald
2006-09-19 6:13 ` Michael Kerrisk
2006-09-19 6:47 ` Andi Kleen
2006-09-19 14:50 ` Michael Kerrisk
2006-09-20 9:55 ` Andi Kleen
-- strict thread matches above, loose matches on Subject: below --
2006-09-18 18:29 Stuart MacDonald
2006-09-19 12:03 ` Samuel Tardieu
2006-09-19 14:00 ` Stuart MacDonald
2006-09-20 9:54 ` Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=p73slip4lyf.fsf@verdi.suse.de \
--to=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=stuartm@connecttech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox