On Apr 26, 2011, at 8:48 PM, Ankith Agarwal wrote:
> Thanks for the reply. One more thing, if I am particular in getting the
> destination mac address, then is it better to run a pcap instance for each
> of the interfaces of the system??
For each of the *LAN* interfaces of the system. Not all interfaces, on all
systems, *have* MAC addresses. You might have a PPP interface, for example.
What exactly is your program trying to do? It might make sense to open a
PF_PACKET socket yourself, and get the interface index from the sockaddr_ll
filled in by recvfrom()
http://www.kernel.org/doc/man-pages/online/pages/man7/packet.7.html
or supplied in the ring buffer with the memory-mapped interface.-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.