On Mon, Nov 28, 2011 at 11:35 AM, abhinav narain <[email protected]> wrote: > hi, > I am using libpcap on Openwrt platform, Netgear router wndr3700v2. > I am able to capture packets on phy0, interface. > But what should I do to capture packets on phy0,phy1 simultaneously in the > same program ? > > I don't think I can use "any" interface as it might capture packets from > bridge interface also ! > Kindly suggest.
I don't know anything about that platform, but the standard way is to open two pcap handles, one for each interface, get the underlying file descriptor and use select() or poll(). Although you could use threads instead if you felt the need. -- Aaron Turner http://synfin.net/ Twitter: @synfinatic http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin "carpe diem quam minimum credula postero" - This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
