Date: Thu, 10 Mar 2016 19:35:15 +0530 From: ragu foss <ragu.foss@gmail.com> To: freebsd-questions@freebsd.org Subject: TAP (/dev/tap0) interface payload not delivered to user space Message-ID: <CAN8gescYUK-TdBe1nD5EsvUDr_i4bRsK0fhJW0uiAWULLjF0_A@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi All, I am studying how tun/tap interface works in FreeBSD. I wrote an application where I am trying to receive packets in user space through tap interface. For this, I open the tap device (/dev/tap0) and read from it. I am configuring the tap interface with the following configurations ifconfig tap0 create ifconfig tap0 inet 192.168.1.32/24 Then I ping the ip "ping 192.168.1.45". The problem is, I am receiving only the header of the packet. I am reading only 42 (Ethernet header (14) + IP header (20) + ICMP (8) ) bytes always. Whatever be the value of the ping payload size (ping -s 100 192.168.1.45), I am reading the same 42 bytes in the application. Is this is expected behaviour? If yes, what should I do to receive the whole packet? Thanks, Ragunath
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN8gescYUK-TdBe1nD5EsvUDr_i4bRsK0fhJW0uiAWULLjF0_A>