Realtime simulator: Getting active packet count at any moment in time.

23 views
Skip to first unread message

Hira

unread,
Jun 19, 2015, 12:26:29 PM6/19/15
to ns-3-...@googlegroups.com
Hi,
I'm using a Realtime simulator implementation of NS3 (with some modifications to suit my experiment), and I want to periodically check the number of packet travelling within the network (aka. I want to know the number of packets in side a network at the instant that the check is performed).
So I'm trying to figure out the simplest way to obtain the number of packets inside the network at a given moment in time. Any help will be greatly appreciated.

In fact, for the current objective, I only need to know whether there's a packet in the network or not at the time of each check, but I think getting a total number of packets might be useful for me in the future.

Thank you very much and sorry if my English phrasing is confusing.

Riyanto Jayadi

unread,
Jun 19, 2015, 3:51:17 PM6/19/15
to ns-3-...@googlegroups.com
Hi,

I guest you can you can use tracing helper to trace any packet at any given time.

Riyanto Jayadi

Tommaso Pecorella

unread,
Jun 19, 2015, 5:59:08 PM6/19/15
to ns-3-...@googlegroups.com
Good suggestion.
I'd also point you to the FlowMonitor sources. It's not perfect for your needs (it counts the packet too early in the stack), but you can borrow some ideas.

Cheers,

T.
Reply all
Reply to author
Forward
0 new messages