benzea / ptpv2d

Automatically exported from code.google.com/p/ptpv2d
2 stars 0 forks source link

PTPv2 Stack does not received packets from TAP interface #5

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.PTP Packets are send from a user space application to a TAP interface.
2.Packet Rx count is incremented at TAP interface.
3. Now when the PTPv2 stack is bound to "tap0" using "-b" the packets are not 
received at the PTPv2 stack.

What is the expected output? What do you see instead?
Packets are exoected to be recived from teh TAP0 interface.

What version of the product are you using? On what operating system?
I am using Linux.

Please provide any additional information below.
The same with eth0 interface works fine.

Original issue reported on code.google.com by Arpitg...@gmail.com on 22 Sep 2011 at 2:53

GoogleCodeExporter commented 8 years ago
Please find the tap0 interface details:

tap0      Link encap:Ethernet  HWaddr 00:11:00:00:00:11
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::211:ff:fe00:11/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1738 errors:0 dropped:0 overruns:0 frame:0
          TX packets:70 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:177244 (173.0 KiB)  TX bytes:5616 (5.4 KiB)

Original comment by Arpitg...@gmail.com on 22 Sep 2011 at 5:37

GoogleCodeExporter commented 8 years ago
The problem is fixed in case the
setsockopt(rawSock,SOL_SOCKET,SO_BINDTODEVICE,&ifs[tapIdx],sizeof(struct ifreq))
is used.

Original comment by Arpitg...@gmail.com on 21 Feb 2012 at 2:40