[Ns-bugs] [Bug 457] I added a module that might be useful...
code@nsnam.ece.gatech.edu
code at nsnam.ece.gatech.edu
Fri Jan 2 07:39:36 PST 2009
http://www.nsnam.org/bugzilla/show_bug.cgi?id=457
Tom Henderson <tomh at tomh.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tomh at tomh.org
--- Comment #1 from Tom Henderson <tomh at tomh.org> 2009-01-02 10:39:36 EDT ---
(In reply to comment #0)
> Created an attachment (id=344)
--> (http://www.nsnam.org/bugzilla/attachment.cgi?id=344) [details]
> src files
>
> I've attached the files below -- basically it's a droptailqueue which uses the
> cumulative number of bytes in the queue rather than number of packets when
> deciding whether or not to drop packets. I know it's very simple change to make
> took like 5 min but figured this might be useful
>
I would be OK with this class but since it is such a simple change to
DropTailQueue I wonder whether it should just be added as a mode of operation
of the existing class.
Another possibility along such lines would be to define a private virtual
CheckOverflow (Ptr <const Packet> p) that could be used as follows:
bool
DropTailQueue::DoEnqueue (Ptr<Packet> p)
{
NS_LOG_FUNCTION (this << p);
- if (m_packets.size () >= m_maxPackets)
+ if (CheckOverflow (p))
{
NS_LOG_LOGIC ("Queue full -- droppping pkt");
and then, put the policy into CheckOverflow whether it checks a packet counter
or running byte counter. This could be enabled by two attributes such as
"byteLimit" (default false) and "maxBytes".
--
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Ns-bugs
mailing list