Return to BSD News archive
Xref: sserve comp.unix.programmer:6759 comp.unix.bsd:5481 comp.sys.next.programmer:6160 Path: sserve!manuel!munnari.oz.au!uunet!sun-barr!ames!agate!agate!usenet From: izumi@pinoko.berkeley.edu (Izumi Ohzawa) Newsgroups: comp.unix.programmer,comp.unix.bsd,comp.sys.next.programmer Subject: How do I get Send-Q value of a TCP connection? Date: 22 Sep 1992 22:23:48 GMT Organization: University of California, Berkeley Lines: 19 Distribution: world Message-ID: <19o6dkINNodu@agate.berkeley.edu> Reply-To: izumi@pinoko.berkeley.edu NNTP-Posting-Host: moica.berkeley.edu Keywords: Send-Q, send buffer, TCP, netstat, socket, NeXT Given a connected TCP socket, how do I get the number of bytes that are still in the TCP send buffer for this connection? Essentially, I want the Send-Q value as reported by 'netstat' for just one socket from within the user-level process that created the socket. I took a look at sources for netstat, but it seems to traverse a list in the kernel. I would like something a little less drastic, and hopefully more efficient because I want to monitor this at regular intervals. I would also like to avoid set GID to 'kmem' if possible. I want to do it on the NeXT (if that matters) which is 4.3BSD at this level. Thanks for any info. -- Izumi Ohzawa [ 大澤五住 ] USMail: University of California, 360 Minor Hall, Berkeley, CA 94720 Telephone: (510) 642-6440 Fax: (510) 642-3323 Internet: izumi@pinoko.berkeley.edu (NeXT Mail OK)