Thread (8 messages) 8 messages, 4 authors, 2015-08-28

Identify Beacon Frame

From: Anand Moon <hidden>
Date: 2015-08-28 19:11:09

Hi All,


On Friday, August 28, 2015 11:44 PM, Avinash Patil [off-list ref] wrote:
Well..from userspace application you need to register which subtype of
frames you want to receive.
This is done with netlink sockets. You can check
hostapd/wpa_supplicant sources to see how this is done.

http://w1.fi/wpa_supplicant/

I assume you are using newer kernel e.g. 3.0 onwards.
Old kernels did not support cfg80211; also your WLAN device driver
needs to support mgmt register and mgmt rx.

https://www.kernel.org/doc/htmldocs/80211/API-struct-cfg80211-ops.html


Thanks,
Avinash


On Fri, Aug 28, 2015 at 10:57 AM, Gunjan Mehta [off-list ref] wrote:
Avinash,

Ya m talking about the WLAN.
can you just throw some more light on cfg802.11 handlers.

On Fri, Aug 28, 2015 at 11:24 PM, Avinash Patil [off-list ref]
wrote:
quoted
Hi Gunjan,

Are you talking about WLAN beacon frames? If so, you can you cfg80211
handlers to register management frames and once frame is received
parse frame type/subtype to check if its beacon.
I dont think beacon frames are delievered to netdev.

Thanks,
Avinash

On Fri, Aug 28, 2015 at 10:51 AM, Gunjan Mehta [off-list ref]
wrote:
quoted
Then how do i capture the beacon frames?

On Fri, Aug 28, 2015 at 10:40 PM, Jeff Haran [off-list ref]
wrote:
quoted




From: kernelnewbies-bounces at kernelnewbies.org
[mailto:kernelnewbies-bounces at kernelnewbies.org] On Behalf Of Gunjan
Mehta
Sent: Friday, August 28, 2015 9:21 AM
To: kernelnewbies; netfilter-devel at vger.kernel.org
Subject: Identify Beacon Frame



Hi All,



I am new to kernel development. I am writing a kernel module that
captures
packet at the netfilter pre - routing hook.



I only want to capture the BEACON FRAME.



I have few queries:



1>When the beacon frame comes to receiving machine do the sk_buff gets
allocated?

2> How can i identify the beacon frame at the pre routing hook?

3> Beacon frame consist of a string for authentication of client with
the
server, can i use sk_buff pointers to get access to that string, if
sk_buff
is allocated?



Regards

Gunjan



These beacon frames do not appear to be IP packets. If that is true, I
don?t think you are going to see them in any netfilter hooks.



Jeff Haran
quoted
quoted

If the interface support monitor mode. Then you can capture any packet.

iw dev wlan0 interface add mon0 type monitor flags none
ifconfig mon0 up

Now you can capture all the packets on mon0 interface.

-Anand Moon


quoted
quoted
quoted
quoted
quoted
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help