2010-01-19 21:19:43

by Frank W. Miller

[permalink] [raw]
Subject: wireless for manet experiments



Greetings,

I'm interested in using my 802.11 interface to do some experimenting with
manet protocols. To that end I'd like to do two things:

1) disconnect the wireless interface from the IP stack and access it
directly from user space

2) later, I'd like to interpose the Layer 2 protocol between the wireless
interface and the IP network stack.

What is the best way to go about these things?

Thanks,
FM




2010-01-19 23:09:28

by Bob Copeland

[permalink] [raw]
Subject: Re: wireless for manet experiments

On Tue, Jan 19, 2010 at 6:07 PM, Bob Copeland <[email protected]> wrote:
> On Tue, Jan 19, 2010 at 4:19 PM, Frank W. Miller

>
> I have some code to make mac80211_hwsim controllable from user space.
> Basically, you get a queue of packets in the driver that you can read
> from a file descriptor and write to a different file descriptor to
> simulate reception by a peer. ?You can then make the user space part
> probabilistically drop packets or whatever you like (I have code for
> this too).
>
> I'm not sure how well this meets your use case but I can post patches
> if you're interested.

Just a follow-up in case it wasn't clear: the above uses no hardware,
since I was mostly interested in the upper levels. There's also
libmac by the ORBIT folks that adds some hooks into real hardware
drivers (I have never used it personally).

--
Bob Copeland %% http://www.bobcopeland.com

2010-01-20 16:57:25

by Frank W. Miller

[permalink] [raw]
Subject: RE: wireless for manet experiments



Thanks for the reply. Is there documentation on the injection and monitor
interfaces you mention? Where would I learn about how to paste in a tun
interface later on?

Thanks,
FM


> -----Original Message-----
> From: [email protected] [mailto:linux-wireless-
> [email protected]] On Behalf Of Johannes Berg
> Sent: Wednesday, January 20, 2010 3:17 AM
> To: Frank W. Miller
> Cc: [email protected]
> Subject: Re: wireless for manet experiments
>
> On Tue, 2010-01-19 at 14:19 -0700, Frank W. Miller wrote:
>
> > 1) disconnect the wireless interface from the IP stack and access it
> > directly from user space
> >
> > 2) later, I'd like to interpose the Layer 2 protocol between the
> > wireless
> > interface and the IP network stack.
> >
> > What is the best way to go about these things?
>
> In addition to what Bob said, regardless of what you want to do I would
> probably just do it all in userspace with injection and monitor
> interfaces, and then for IP offer tun interfaces to the kernel again. At
> least for a prototype.
>
> johannes


2010-01-20 10:16:52

by Johannes Berg

[permalink] [raw]
Subject: Re: wireless for manet experiments

On Tue, 2010-01-19 at 14:19 -0700, Frank W. Miller wrote:

> 1) disconnect the wireless interface from the IP stack and access it
> directly from user space
>
> 2) later, I'd like to interpose the Layer 2 protocol between the
> wireless
> interface and the IP network stack.
>
> What is the best way to go about these things?

In addition to what Bob said, regardless of what you want to do I would
probably just do it all in userspace with injection and monitor
interfaces, and then for IP offer tun interfaces to the kernel again. At
least for a prototype.

johannes


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

2010-01-20 18:05:00

by Johannes Berg

[permalink] [raw]
Subject: RE: wireless for manet experiments

On Wed, 2010-01-20 at 09:57 -0700, Frank W. Miller wrote:
>
> Thanks for the reply. Is there documentation on the injection and monitor
> interfaces you mention?

Yes, in Documentation/

> Where would I learn about how to paste in a tun
> interface later on?

You google for tun device setup or something, I don't have sample code
ready but any VPN client (e.g. vpnc) does.

johannes


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

2010-01-19 23:07:18

by Bob Copeland

[permalink] [raw]
Subject: Re: wireless for manet experiments

On Tue, Jan 19, 2010 at 4:19 PM, Frank W. Miller
<[email protected]> wrote:
>
>
> Greetings,
>
> I'm interested in using my 802.11 interface to do some experimenting with
> manet protocols. ?To that end I'd like to do two things:
>
> 1) disconnect the wireless interface from the IP stack and access it
> directly from user space
>
> 2) later, I'd like to interpose the Layer 2 protocol between the wireless
> interface and the IP network stack.
>
> What is the best way to go about these things?
>
> Thanks,
> FM

I have some code to make mac80211_hwsim controllable from user space.
Basically, you get a queue of packets in the driver that you can read
from a file descriptor and write to a different file descriptor to
simulate reception by a peer. You can then make the user space part
probabilistically drop packets or whatever you like (I have code for
this too).

I'm not sure how well this meets your use case but I can post patches
if you're interested.

--
Bob Copeland %% http://www.bobcopeland.com