The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
AWK help reqd Sathy153 Shell Programming and Scripting 17 06-19-2008 12:30 AM
CIACTech02-003: Office for Mac X Antipiracy Mechanism Opens Server Ports iBot Security Advisories (RSS) 0 12-24-2007 06:40 AM
Checklist for Shell Script reqd Shivdatta Shell Programming and Scripting 2 11-30-2007 07:59 AM
Help Reqd PradeepRed HP-UX 1 03-15-2007 06:55 PM
adv reqd on SIGCHLD on accept call stevenjagan High Level Programming 5 07-28-2006 04:24 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 06-27-2007
Registered User
 

Join Date: Jun 2007
Posts: 3
Exclamation Mechanism reqd for knowing TCP buffer occupancy level

Hi,

The description and the context of the mechanism that i require is as follows:

There is an application communicating with a protocol stack binary. There is a TCP socket communication between the two.

Now, the stack is pumping up data to the Application such that the receiving buffer of the Application and the sending buffer of the stack is getting occupied. Basically, the Application is processing messages at a rate slower than that at which the stack is pumping the data to it.

Now the mechanism that i require is that i need a way in which i can get the amount of buffer that has been filled up by the messages in the corresponding TCP buffers.
My aim is to raise an alarm in case the TCP buffer has been filled up to a particular percentage level.

But to do that i need a way of knowing how much of the buffer has been occupied. So how do i get that idea?

Need this urgently. Thanks a lot.
Cheers
Saptarshi,
Reply With Quote
Forum Sponsor
  #2  
Old 06-27-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
ioctl(FIONREAD) would be a good start to find out how much a socket has to read.

However the internal buffers are a matter for the kernel really, there is no guarrantee that SIOCGHIWAT,SIOCGLOWAT etc are implemented.
Reply With Quote
  #3  
Old 06-28-2007
Registered User
 

Join Date: Jun 2007
Posts: 3
Hi,

Thanks for the reply.
This would not actually map to the requirement i have of knowing the TCP buffer occupancy.

Thanks anyways.

regards
Saptarshi.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:27 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0