public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* wireless for manet experiments
@ 2010-01-19 21:19 Frank W. Miller
  2010-01-19 23:07 ` Bob Copeland
  2010-01-20 10:16 ` Johannes Berg
  0 siblings, 2 replies; 6+ messages in thread
From: Frank W. Miller @ 2010-01-19 21:19 UTC (permalink / raw)
  To: linux-wireless



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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: wireless for manet experiments
  2010-01-19 21:19 wireless for manet experiments Frank W. Miller
@ 2010-01-19 23:07 ` Bob Copeland
  2010-01-19 23:09   ` Bob Copeland
  2010-01-20 10:16 ` Johannes Berg
  1 sibling, 1 reply; 6+ messages in thread
From: Bob Copeland @ 2010-01-19 23:07 UTC (permalink / raw)
  To: Frank W. Miller; +Cc: linux-wireless

On Tue, Jan 19, 2010 at 4:19 PM, Frank W. Miller
<frankwmiller@frankwmiller.net> 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 %% www.bobcopeland.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: wireless for manet experiments
  2010-01-19 23:07 ` Bob Copeland
@ 2010-01-19 23:09   ` Bob Copeland
  0 siblings, 0 replies; 6+ messages in thread
From: Bob Copeland @ 2010-01-19 23:09 UTC (permalink / raw)
  To: Frank W. Miller; +Cc: linux-wireless

On Tue, Jan 19, 2010 at 6:07 PM, Bob Copeland <me@bobcopeland.com> 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 %% www.bobcopeland.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: wireless for manet experiments
  2010-01-19 21:19 wireless for manet experiments Frank W. Miller
  2010-01-19 23:07 ` Bob Copeland
@ 2010-01-20 10:16 ` Johannes Berg
  2010-01-20 16:57   ` Frank W. Miller
  1 sibling, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2010-01-20 10:16 UTC (permalink / raw)
  To: Frank W. Miller; +Cc: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 588 bytes --]

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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: wireless for manet experiments
  2010-01-20 10:16 ` Johannes Berg
@ 2010-01-20 16:57   ` Frank W. Miller
  2010-01-20 18:04     ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Frank W. Miller @ 2010-01-20 16:57 UTC (permalink / raw)
  To: 'Johannes Berg'; +Cc: linux-wireless



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: linux-wireless-owner@vger.kernel.org [mailto:linux-wireless-
> owner@vger.kernel.org] On Behalf Of Johannes Berg
> Sent: Wednesday, January 20, 2010 3:17 AM
> To: Frank W. Miller
> Cc: linux-wireless@vger.kernel.org
> 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: wireless for manet experiments
  2010-01-20 16:57   ` Frank W. Miller
@ 2010-01-20 18:04     ` Johannes Berg
  0 siblings, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2010-01-20 18:04 UTC (permalink / raw)
  To: Frank W. Miller; +Cc: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 402 bytes --]

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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-01-20 18:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-19 21:19 wireless for manet experiments Frank W. Miller
2010-01-19 23:07 ` Bob Copeland
2010-01-19 23:09   ` Bob Copeland
2010-01-20 10:16 ` Johannes Berg
2010-01-20 16:57   ` Frank W. Miller
2010-01-20 18:04     ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox