2007-11-14 13:02:24

by Henning Rogge

[permalink] [raw]
Subject: Virtual wireless network card for mac80211

Hello,

I'm looking for a way to simulate a ieee802.11 card on a linux system. Is
there an equivalent for tun/tap for the mac80211 layer, so I can just send
the communication with a wireless device back to userspace (and data from
userspace into the wireless stack) ?

Henning Rogge


2007-11-14 15:21:51

by Johannes Berg

[permalink] [raw]
Subject: Re: Virtual wireless network card for mac80211


> I'm looking for a way to simulate a ieee802.11 card on a linux system. Is
> there an equivalent for tun/tap for the mac80211 layer, so I can just send
> the communication with a wireless device back to userspace (and data from
> userspace into the wireless stack) ?

No. I've described this task on
http://kernelnewbies.org/KernelProjects/Mac80211TestDriver and somebody
was interested in writing one, but I never heard back from him.

johannes


Attachments:
signature.asc (828.00 B)
This is a digitally signed message part

2007-11-14 15:20:17

by Henning Rogge

[permalink] [raw]
Subject: Re: Virtual wireless network card for mac80211

Am Mittwoch 14 November 2007 16:08:39 schrieben Sie:
> On Wed, Nov 14, 2007 at 01:16:50PM +0100, Henning Rogge wrote:
> No, but I have been thinking about this as well. It might be a nice
> capability to have, so long as the regulatory spectre continues to
> discourage some vendors from disclosing information about their
> hardware. At least such a scenario seems less grey w.r.t. GPL
> compliance.
>
> Still, I would not want to put much effort into a project that
> distracts from development of fully open source drivers. But I think
> the performance of such a solution would be sub-optimal enough to
> discourage full reliance upon it. And the plus of having a userland
> binary driver versus no driver at all might make it worthwhile.
>
> What is the situation that makes this interesting to you?
I'm not interested in having a binary driver but in simulation of mobile
networks with virtual machines. By placing a virtual driver into the mac80211
layer the sollution would be totally transparent for the clients, even for
applications with Radiotap headers and Libpcap.
A central server would be connected to the userspace parts of the virtual
driver and simulate connections between the VMs.

Henning Rogge


2007-11-14 15:31:13

by John W. Linville

[permalink] [raw]
Subject: Re: Virtual wireless network card for mac80211

On Wed, Nov 14, 2007 at 04:20:15PM +0100, Henning Rogge wrote:
> Am Mittwoch 14 November 2007 16:08:39 schrieben Sie:

> > What is the situation that makes this interesting to you?

> I'm not interested in having a binary driver but in simulation of mobile
> networks with virtual machines. By placing a virtual driver into the mac80211
> layer the sollution would be totally transparent for the clients, even for
> applications with Radiotap headers and Libpcap.
> A central server would be connected to the userspace parts of the virtual
> driver and simulate connections between the VMs.

Even better -- a completely legitimate use for such a feature. :-)

Such a driver might also serve as a development tool for the mac80211
stack developers, and as a model for how drivers should behave when
interacting with mac80211.

In fact, I think Johannes Berg submitted this to the Kernel Newbies
project suggestions already:

http://kernelnewbies.org/KernelProjects/Mac80211TestDriver

So, any aspiring wireless/kernel hackers out there?

John
--
John W. Linville
[email protected]

2007-11-14 15:09:05

by John W. Linville

[permalink] [raw]
Subject: Re: Virtual wireless network card for mac80211

On Wed, Nov 14, 2007 at 01:16:50PM +0100, Henning Rogge wrote:

> I'm looking for a way to simulate a ieee802.11 card on a linux system. Is
> there an equivalent for tun/tap for the mac80211 layer, so I can just send
> the communication with a wireless device back to userspace (and data from
> userspace into the wireless stack) ?

No, but I have been thinking about this as well. It might be a nice
capability to have, so long as the regulatory spectre continues to
discourage some vendors from disclosing information about their
hardware. At least such a scenario seems less grey w.r.t. GPL
compliance.

Still, I would not want to put much effort into a project that
distracts from development of fully open source drivers. But I think
the performance of such a solution would be sub-optimal enough to
discourage full reliance upon it. And the plus of having a userland
binary driver versus no driver at all might make it worthwhile.

What is the situation that makes this interesting to you?

Thanks,

John
--
John W. Linville
[email protected]

2007-11-15 06:47:02

by Henning Rogge

[permalink] [raw]
Subject: Re: Virtual wireless network card for mac80211

Am Mittwoch 14 November 2007 16:59:58 schrieb Mike Kershaw:
> Depending what you're trying to do, I did patches for tuntap that went
> in a year or two ago that allow you to set the link type and write
> radiotap/80211 frames. Kismet-newcore (it's in branches in svn if you
> care) uses this to replicate mangled frames back out to other userspace
> programs.

> http://svn.kismetwireless.net/code/branch/kismet-newcore/dumpfile_tuntap.cc
Okay, that seems to be what I was looking for. It's not as flexible as a full
virtual network card, but it has all features I need, thank you.

(it seems that none of the online documentation I found for tuntap contains
this capability)

Henning

2007-11-14 16:11:14

by Mike Kershaw

[permalink] [raw]
Subject: Re: Virtual wireless network card for mac80211

On Wed, Nov 14, 2007 at 01:16:50PM +0100, Henning Rogge wrote:
> Hello,
>
> I'm looking for a way to simulate a ieee802.11 card on a linux system. Is
> there an equivalent for tun/tap for the mac80211 layer, so I can just send
> the communication with a wireless device back to userspace (and data from
> userspace into the wireless stack) ?

Depending what you're trying to do, I did patches for tuntap that went
in a year or two ago that allow you to set the link type and write
radiotap/80211 frames. Kismet-newcore (it's in branches in svn if you
care) uses this to replicate mangled frames back out to other userspace
programs.

http://svn.kismetwireless.net/code/branch/kismet-newcore/dumpfile_tuntap.cc

If you want something that actually responds to iw* ioctls, etc, then
this probably isn't what you want however.

-m

--
Mike Kershaw/Dragorn <[email protected]>
GPG Fingerprint: 3546 89DF 3C9D ED80 3381 A661 D7B2 8822 738B BDB1

"A baby seal walks into a club..."


Attachments:
(No filename) (992.00 B)
(No filename) (189.00 B)
Download all attachments

2007-11-14 15:25:55

by Johannes Berg

[permalink] [raw]
Subject: Re: Virtual wireless network card for mac80211


> No, but I have been thinking about this as well. It might be a nice
> capability to have, so long as the regulatory spectre continues to
> discourage some vendors from disclosing information about their
> hardware. At least such a scenario seems less grey w.r.t. GPL
> compliance.

This could be doable with a shim driver and uio, but you'd need at least
some DMA engine programming etc. in the kernel. But you want that
anyway.

johannes


Attachments:
signature.asc (828.00 B)
This is a digitally signed message part