librelist archives

« back to archive

Dropping Packets from Output Queue

Dropping Packets from Output Queue

From:
Rohan Chakravarthy
Date:
2014-11-19 @ 22:13
Hi,

If I have queues that I am pushing packets into from a custom element, is
there any way for me to drop packets from the tail of one of the queues?

For example:

If I have
customElement[0]->[0]Queue1
customElement[1]->[0]Queue2

and based on some parameters in my custom element, I'd like to drop the
last packet in Queue1 if it exists. I think I would need some kind of
pointer to Queue1 in my customElement. Is this possible?

Thanks,
Rohan

Re: [click] Dropping Packets from Output Queue

From:
Antonie Henning
Date:
2014-11-19 @ 22:37
Hi,
You could call the queue element methods from the custom element e.g.
customQueue1::customQueue;customElement(DROP customQueue1);
So then its possible to call a function in customQueue to drop the last 
packet. customQueue would for example be something similar to Queue with a
modified 'reset' handler.
If you want to look at an example, have a look at how ARPQuerier uses ARPTable.
Hope it helps.A
      From: Rohan Chakravarthy <rchakra3@ncsu.edu>
 To: click@librelist.com 
 Sent: Thursday, November 20, 2014 12:13 AM
 Subject: [click] Dropping Packets from Output Queue
   


Hi,
If I have queues that I am pushing packets into from a custom element, is 
there any way for me to drop packets from the tail of one of the queues?
For example:
If I have customElement[0]->[0]Queue1customElement[1]->[0]Queue2

and based on some parameters in my custom element, I'd like to drop the 
last packet in Queue1 if it exists. I think I would need some kind of 
pointer to Queue1 in my customElement. Is this possible?
Thanks,Rohan