Networking Forums

Networking Forums > Computer Networking > Linux Networking > About tun has packets in queue

Reply
Thread Tools Display Modes

About tun has packets in queue

 
 
calvin
Guest
Posts: n/a

 
      03-05-2004, 10:03 AM
Hiya,
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;
}
return(j);

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

Calvin
 
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
How to access the queue of incoming packets (Snort and libpcap)... Alexander Mahone Linux Networking 5 05-27-2008 01:34 PM
Newbie wants to look at other people's packets (promiscuous mode fails to capture packets) George D. Wireless Internet 1 07-14-2007 07:09 AM
TCP Queue size catbacker@gmail.com Windows Networking 0 03-07-2007 01:12 AM
QUEUE packets at PREROUTING vivekian Linux Networking 0 05-06-2006 08:30 PM
datagram queue? Jonathan Ellis Linux Networking 0 08-04-2005 11:33 PM



1 2 3 4 5 6 7 8 9 10 11