It's not clear how similar my use of TUN/TAP is to what you want, but UML uses
TUN/TAP as one mechanism to network a virtual machine to the host, and it
works quite well.
See tuntap_up() in
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/user-mode-linux/tools/uml_net/uml_net.c?rev=1.10&content-type=text/vnd.viewcvs-markup
for setting up a TUN/TAP interface and
tuntap_user_read() and tuntap_user_write() (which are both trivial)
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/user-mode-linux/linux/arch/um/drivers/tuntap_user.c?rev=1.2&content-type=text/vnd.viewcvs-markup
for getting packets in and out of the interface.
Jeff
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/