From: Pekka Pietikainen <pp@netppl.fi>
To: yi <yi@ece.utexas.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: TCP congestion window
Date: Tue, 22 Jul 2003 09:26:44 +0300 [thread overview]
Message-ID: <20030722062644.GA18791@netppl.fi> (raw)
In-Reply-To: <3F1C6406.5040009@ece.utexas.edu>
On Mon, Jul 21, 2003 at 05:07:02PM -0500, yi wrote:
> I have some questions. I made the following system call for getting tcp
> cwnd size of ongoing connection. However, I am always getting the value
> of "2", which is the initial tcp cwnd size, I think. What I really want
> to do is to trace tcp cwnd size when I download some big file using
> "wget"'s http file downloader. For it, I added a new system call shown
> below and modified the wget source code.
Also what you want already exists, so no need to modify the kernel,
the TCP_INFO socket option (netinet/tcp.h should have the required
definitions in recent glibc)
struct tcp_info info;
int optlen=sizeof(struct tcp_info);
if(getsockopt(sk->fd,SOL_TCP,TCP_INFO,(void *)&info,&optlen) < 0)
return;
printf("unacked: %d sacked: %d lost: %d retrans: %d fackets: %d\n",
info.tcpi_unacked,info.tcpi_sacked,info.tcpi_lost,
info.tcpi_retrans,info.tcpi_fackets);
printf("pmtu: %d rcv_ssthresh: %d rtt: %d rttvar: %d snd_ssthresh:
%d\nsnd_cwnd: %d advmss: %d reordering: %d\n",info.tcpi_pmtu,info.tcpi_rcv_ssthresh,
info.tcpi_rtt,info.tcpi_rttvar,info.tcpi_snd_ssthresh,info.tcpi_snd_cwnd,info.tcpi_advmss,
info.tcpi_reordering)
There's a few more that I don't print there, see the header file.
--
Pekka Pietikainen
next prev parent reply other threads:[~2003-07-22 6:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-21 22:07 TCP congestion window yi
2003-07-22 5:18 ` Nagendra Singh Tomar
2003-07-22 6:26 ` Pekka Pietikainen [this message]
2003-07-22 6:38 ` Glen Turner
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=20030722062644.GA18791@netppl.fi \
--to=pp@netppl.fi \
--cc=linux-kernel@vger.kernel.org \
--cc=yi@ece.utexas.edu \
/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