Sniffing on a specific NIC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a machine with multiple NICs supported.
I am trying to capture packets using the PACKET_SOCKET directly on the
Ethernet.
It is observed that recvfrom () captures packets received on all the NICs
supported in the host.
I do have a mechanism of sorting the packets based on NIC (using sa_addr
member of sockaddr structure). But how do I capture only those packets
coming on a specific NIC (say eth1). Is there a way wherein I specify to
receive packets coming at a particular interface only?

Re,
Chuks


-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux