Anyone know of some sample code and must-do configuration to use /dev/tap to
read/write packets from user space? I would like to evaluate a user space
network stack, which writes/reads IP packets. I got a tun/tap driver from
http://www.whiteboard.ne.jp/~admin2/tuntap/ It builds, installs , and I can
open /dev/tap, but I don't have a clue about what I need to do with ifconfig to
get it working. I don't read any any data while running a simple program that
opens the device and loops on a read of the device. Here is the config. I tried:
# tunctl -t tap0
# ifconfig tap0 plumb
# ifconfig tap0 192.168.0.4
# ifconfig tap0 up
# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232
index 1
inet 127.0.0.1 netmask ff000000
elxl0: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index 2
inet 192.168.0.2 netmask ffffff00 broadcast 192.168.0.255
ether 0:1:2:7c:ec:9f
tap0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 11
inet 192.168.0.4 netmask ffffff00 broadcast 192.168.0.255
ether a:0:20:e0:9c:2d
# ping 192.168.0.4
192.168.0.4 is alive
--
This message posted from opensolaris.org
_______________________________________________
networking-discuss mailing list
[email protected]