[Ns-developers] datagram socket tx buffer back pressure
Mathieu Lacage
mathieu.lacage at sophia.inria.fr
Mon Mar 29 07:16:30 PDT 2010
On Mon, 2010-03-29 at 14:56 +0100, Gustavo Carneiro wrote:
>
>
> Not really, it's just adding one parameter, easy... :-)
Yes, "easy". I am not sure this is going to be met with wild enthusiasm
though.
>
>
> struct OutgoingPacket
> {
> Ptr<Packet> packet;
> // stuff on the side goes here.
> };
>
>
>
> This is not what I proposed. It's similar, but not the same. This
The above would be for the ip stack.
> involves more refactoring. I proposed:
>
>
> class NetDevice {
> [...]
> - virtual bool Send(Ptr<Packet> packet, const Address& dest, uint16_t
> protocolNumber) = 0;
> + virtual bool Send(Ptr<Packet> packet, const Address& dest, uint16_t
> protocolNumber, Callback<Packet> dropCallback) = 0;
> };
>
Yes, I agree that a single per-packet callback in NetDevice::Send should
be sufficient. (Just, don't name it dropCallback: packetConsumed is
probably a better name to cover both drop and dequeue events).
Mathieu
More information about the Ns-developers
mailing list