how to find the queue size in listen system call

hi,

I want to find the queue size of the listen system call which is defined as below

listen(s, backlog)

The backlog parameter sets the maximum number of outstanding connections which can be queued awaiting acceptance by the server.

I want to know where is this listen queue created and what to find the current queue size. If the queue is created in the memory i want to know how much size it is occcuping and all.

Hi,

the queue is stored within some kernel structures. There is no standard way to find out the backlog, but usually Un*x systems offers some specific ways to get this info ( using ioctl() or similar ).

You won't get however the size of the underlying structure...

What is your target OS?

Cheers,
Lo�c
--
My (Unix) Blog: Lo�c OnStage

"The most amazing achievement of the computer software industry is its continuing cancellation of the steady and staggering gains made by the computer hardware industry." -- Henry Petroski

Thank you . Iam working on SVR4 (MPRAS ) UNIX OS. Iam looking for a command something like netstat or so to get the queue length.

If i have to use ioctl what are the exact parametes i have to use in it.

let me know where can i find the source code for Listen system call.