TAP (/dev/tap0) interface payload not delivered to user space
ragu.foss at gmail.com
Thu Mar 10 14:05:16 UTC 2016
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
More information about the freebsd-questions