Searched hist:"05 c2828c72c4eabf62376adfe27bd24797621f62" (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/include/linux/ |
H A D | if_tun.h | diff 05c2828c72c4eabf62376adfe27bd24797621f62 Thu Jan 14 00:17:09 CST 2010 Michael S. Tsirkin <mst@redhat.com> tun: export underlying socket
Tun device looks similar to a packet socket in that both pass complete frames from/to userspace.
This patch fills in enough fields in the socket underlying tun driver to support sendmsg/recvmsg operations, and message flags MSG_TRUNC and MSG_DONTWAIT, and exports access to this socket to modules. Regular read/write behaviour is unchanged.
This way, code using raw sockets to inject packets into a physical device, can support injecting packets into host network stack almost without modification.
First user of this interface will be vhost virtualization accelerator.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: David S. Miller <davem@davemloft.net>
|
/openbmc/linux/drivers/net/ |
H A D | tun.c | diff 05c2828c72c4eabf62376adfe27bd24797621f62 Thu Jan 14 00:17:09 CST 2010 Michael S. Tsirkin <mst@redhat.com> tun: export underlying socket
Tun device looks similar to a packet socket in that both pass complete frames from/to userspace.
This patch fills in enough fields in the socket underlying tun driver to support sendmsg/recvmsg operations, and message flags MSG_TRUNC and MSG_DONTWAIT, and exports access to this socket to modules. Regular read/write behaviour is unchanged.
This way, code using raw sockets to inject packets into a physical device, can support injecting packets into host network stack almost without modification.
First user of this interface will be vhost virtualization accelerator.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: David S. Miller <davem@davemloft.net>
|