Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Apr 2000 13:03:17 +0200
From:      Graham Wheeler <gram@cequrux.com>
To:        hackers@FreeBSD.ORG
Subject:   Re: Determining traffic on a socket
Message-ID:  <38F30675.A98B59A5@cequrux.com>
References:  <38F1A456.EAADF652@cequrux.com> <20000410034218.U4381@fw.wintelcom.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Brian Campbell pointed out to me that TCP control blocks have the 
initial and current transmit and receive sequence numbers, so it is
possible to compute the bytes sent and received from these. So, my next
question is: given a socket fd (or a pid and fd number), how can I
extract a copy of the TCP control block for that socket from the kernel?

If it isn't possible, I guess I can add an ioctl that will allow me to
query the information, but I would prefer to not have to modify the
kernel if possible.

TIA
gram
-- 
Dr Graham Wheeler                        E-mail: gram@cequrux.com
Director, Research and Development       WWW:    http://www.cequrux.com
CEQURUX Technologies                     Phone:  +27(21)423-6065
Firewalls/VPN Specialists                Fax:    +27(21)424-3656


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38F30675.A98B59A5>