Networking Forums

Networking Forums > Computer Networking > Linux Networking > TUN/TAP Device Output Queue

Reply
Thread Tools Display Modes

TUN/TAP Device Output Queue

 
 
calvin
Guest
Posts: n/a

 
      03-06-2004, 05:16 PM
I am running some network simulation under Redhat9.0 with tun.c
ver1.5.
I opened 6 vitual tun devices under /net/dev/tun1~6.
Because of simulation request, I need to know which tun device has
packets in its output queue (buffer) waiting to be sent. How can I get
this information by writing a function in tun.c. I know how to do
under FreeBSD tun device as following:

j = 0;
for (i=0; i<=6; i++) {
if (tunctl[i].tun_if.if_snd.ifq_len > 0)
ThisTunHasPacketInQueue[j++] = i; /* save tun number i into my
array */
}
return(j);

But how can I do the same job under Linux? Thanks

Calvin
 
Reply With Quote
 
 
 
 
Cameron Kerr
Guest
Posts: n/a

 
      03-06-2004, 08:54 PM
calvin <(E-Mail Removed)> wrote:
> I am running some network simulation under Redhat9.0 with tun.c
> ver1.5.
> I opened 6 vitual tun devices under /net/dev/tun1~6.
> Because of simulation request, I need to know which tun device has
> packets in its output queue (buffer) waiting to be sent.


> But how can I do the same job under Linux? Thanks


I thought FreeBSD and Linux share the same tun code. So it should be
very similar, if not the same.

netstat displays this information. Perhaps it would be useful to study
what it does.

--
Cameron Kerr
(E-Mail Removed) : http://nzgeeks.org/cameron/
Empowered by Perl!
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TCP Queue size catbacker@gmail.com Windows Networking 0 03-07-2007 01:12 AM
datagram queue? Jonathan Ellis Linux Networking 0 08-04-2005 11:33 PM
Network Interface:Output Queue Length ---- showing 4294963197 Dan Carollo Windows Networking 0 02-08-2005 07:30 PM
NIC performance - Output Queue Length huge! glendeek Windows Networking 0 07-27-2004 08:48 PM
What Causes TCP Send Queue to Grow ("netstat" -an output)? John Davis Linux Networking 4 08-14-2003 03:23 PM



1 2 3 4 5 6 7 8 9 10 11