Hello Mike, I tried running a simple packet sniffer on a Laptop with 2 ethernet interfaces. Still i am seeing the same behaviour.
On my laptop, I have 2 network interfaces eth0 and eth1. eth0 is the lan and eth1 is the wlan. I have created a raw socket and bound to eth0 using the below call. setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE, ifName, strlen(ifName) + 1 I am listening for raw ethernet packets on the eth0. I am getting packets even if i have removed the lan cable. I am not sure how the packets from eth1 and sent to eth0? My program is https://gist.github.com/austinmarton/2862515 I am not sure if there is any IP forwarding causing the issue. There is a procfs regarding ip forwarding turning it off or on. does not make any different. Thanks for your help. Regards, Sriram On Sat, Feb 11, 2017 at 3:54 PM, Mike O'Connor <m...@oeg.com.au> wrote: > Hi Sriram > > So it sounds like you have the cabling wrong, Ethercat networks must be > separated on a layer 2 network. Wired correctly you should never see the > Ethercat frames on both networks. > > Mike > > On 10/02/2017 10:59 PM, Sriram V wrote: >> Hi Mike, >> >> I have 2 ethernet ports. I am broadcasting ethercat packets on the >> network. This is received by both the ports. >> I want to allow ethercat packets ONLY to received by my raw socket >> which is bound to one port. >> On the other port - I want to allow ethernet packets with IP header >> only (non ethercat packets). >> >> Is this possible. >> >> Thanks, >> Sriram >> >> On Fri, Feb 10, 2017 at 12:31 PM, Mike O'Connor <m...@oeg.com.au> wrote: >>> On 10/02/2017 4:59 PM, Sriram V wrote: >>>> Hello, >>>> >>>> I wanted to check if i can allow only ethercat packets to be passed to >>>> app layer? >>>> >>>> Basically, I want to process only ethercat packets. Therefore, i want >>>> to kernel to filter out basic IP packets. >>>> >>>> Regards, >>>> Sriram >>>> _______________________________________________ >>>> etherlab-users mailing list >>>> etherlab-users@etherlab.org >>>> http://lists.etherlab.org/mailman/listinfo/etherlab-users >>> The Ethercat packets are actually raw Ethernet frames, so I think you >>> need to explain what your issue is and from there the list might be able >>> to help. >>> >>> Mike >>> > _______________________________________________ etherlab-users mailing list etherlab-users@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-users