Search code examples
network-programmingwiresharktcpdump

Wireshark - On which interface a packet arrived?


Does anybody know how can I find out what's the interface a packet arrived on? I captured packets with tcpdump using "-i any" and now I want to find out on what interface a certain packet was received. And another question, can I start tcpdump on an interface that does not exist yet? The code I am testing creates an interface and starts sending packets imediately. The problem is that by the time I get to hit tcpdump, some packets are already sent.

Thanks!


Solution

  • I think we cannot do that on a interface which is not in network .. we can work on packets which flies in the network so the Ethernet should be in network