rajneesh rana
2007-Jul-18 06:07 UTC
[Bridge] Reading and writing from tap device attacted to bridge
On 7/18/07, rajneesh rana <rana.rajneesh@gmail.com> wrote:> > I'm trying to trap ethernet frames from a user process over the wire, > using the linux tap device. I see a lot of docs/threads about using tun > device, but none for tap device. > > I am able to open Tap device and attach it to bridge but getting no clue > how to read and write data from tap device. > > thanx > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.linux-foundation.org/pipermail/bridge/attachments/20070718/ec934e01/attachment.htm
Stephen Hemminger
2007-Jul-18 06:28 UTC
[Bridge] Reading and writing from tap device attacted to bridge
On Wed, 18 Jul 2007 18:37:38 +0530 "rajneesh rana" <rana.rajneesh@gmail.com> wrote:> On 7/18/07, rajneesh rana <rana.rajneesh@gmail.com> wrote: > > > > I'm trying to trap ethernet frames from a user process over the wire, > > using the linux tap device. I see a lot of docs/threads about using tun > > device, but none for tap device.Use AF_PACKET, it is easier and faster. That is what tcpdump etc use.> > I am able to open Tap device and attach it to bridge but getting no clue > > how to read and write data from tap device.Examples in http://vtun.sourceforge.net/tun/