From owner-freebsd-hackers Tue Apr 11 3:58:41 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from citadel.cequrux.com (citadel.cdsec.com [192.96.22.18]) by hub.freebsd.org (Postfix) with ESMTP id D541737B9E3 for ; Tue, 11 Apr 2000 03:58:31 -0700 (PDT) (envelope-from gram@cequrux.com) Received: (from nobody@localhost) by citadel.cequrux.com (8.9.3/8.9.3) id MAA18690 for ; Tue, 11 Apr 2000 12:58:26 +0200 (SAST) Received: by citadel.cequrux.com via recvmail id 18687; Tue Apr 11 12:58:16 2000 Message-ID: <38F30675.A98B59A5@cequrux.com> Date: Tue, 11 Apr 2000 13:03:17 +0200 From: Graham Wheeler Organization: Cequrux Technologies X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 2.2.8-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: hackers@FreeBSD.ORG Subject: Re: Determining traffic on a socket References: <38F1A456.EAADF652@cequrux.com> <20000410034218.U4381@fw.wintelcom.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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