Hi all
I am wondering if it is possible to configure ns3 such that when EnablePcap() is called on some NetDevice that it can somehow determine the directionality of the traffic and use that to e.g., only write outgoing or only incoming traffic (on that specific device) to a pcap file.
This is perhaps a bit unusual, as some of that could be achieved with just filtering with e.g., wireshark in the resulting pcap, but that might get very time-intensive.
Let's assume a scenario where traffic is captured at nodes that are essentially just routers, having many outgoing and incoming interfaces. If I want to get some "big picture" view of all the traffic going through a specific router I call EnablePcap on all the NetDevices that "belong" to that router node.
What I'm getting then once I "merge" all the pcap files captured at all of the router's interfaces is essentially a situation where each packet occurs twice, as it was captured as incoming traffic on one interface and outgoing traffic on another.
Depending on the scenario, there might not be any way to just categorize an entire interface (and thus pcap file) as ougoing or incoming traffic and things get even more complicated if you have an entire topology of such nodes.
This is where it would be convenient to have some way to only write incoming or outgoing traffic into the pcap.
Is there anything that can be done in terms of configuration? Or do you see some other approach that might help tackle this?
Best & Thanks in advance,
Pascal