2013-11-12 06:28:42

by shankar swaminathan

[permalink] [raw]
Subject: [mac80211] hooking all 802.11 packets to user space without conversion

Hi,

I would like to know if 802.11 packets could be hooked from the mac80211
module to the user space.

Basically, I run a module that needs the 802.11 pkts without converting
them to 802.3.

I am able to register for MLME pkts but not sure whether I can register for
data pkts and get them to user space.



Please clarify.

Would be very helpful if you could get back ASAP.



thanks and regards,

-shankar


2013-11-12 08:25:05

by shankar swaminathan

[permalink] [raw]
Subject: Re: [mac80211] hooking all 802.11 packets to user space without conversion

No. I am trying to build an AP. Hence, the interface is in AP mode.
Can an interface be put in both AP and Monitor so that i just have one
interface which i can use to get packets in user space in 802.11
format?

Some form of netfilter for wifi packets would help.

On Tue, Nov 12, 2013 at 1:31 PM, Kalle Valo <[email protected]> wrote:
> shankar swaminathan <[email protected]> writes:
>
>> I would like to know if 802.11 packets could be hooked from the mac80211
>> module to the user space.
>>
>> Basically, I run a module that needs the 802.11 pkts without converting
>> them to 802.3.
>>
>> I am able to register for MLME pkts but not sure whether I can register for
>> data pkts and get them to user space.
>
> Have you tried adding a monitor interface and taking packets from that?
>
> --
> Kalle Valo

2013-11-12 08:01:15

by Kalle Valo

[permalink] [raw]
Subject: Re: [mac80211] hooking all 802.11 packets to user space without conversion

shankar swaminathan <[email protected]> writes:

> I would like to know if 802.11 packets could be hooked from the mac80211
> module to the user space.
>
> Basically, I run a module that needs the 802.11 pkts without converting
> them to 802.3.
>
> I am able to register for MLME pkts but not sure whether I can register for
> data pkts and get them to user space.

Have you tried adding a monitor interface and taking packets from that?

--
Kalle Valo

2013-11-12 08:57:49

by Kalle Valo

[permalink] [raw]
Subject: Re: [mac80211] hooking all 802.11 packets to user space without conversion

shankar swaminathan <[email protected]> writes:

> No. I am trying to build an AP. Hence, the interface is in AP mode.
> Can an interface be put in both AP and Monitor so that i just have one
> interface which i can use to get packets in user space in 802.11
> format?

With mac80211 you can add a second monitor mode interface:

http://wireless.kernel.org/en/users/Documentation/modes#Monitor_.28MON.29_mode

Never tried that myself, though.

--
Kalle Valo