Is it possible to get the information of a packet in hostapd just like we did in Wireshark?

Arend van Spriel arend at broadcom.com
Wed Jan 30 16:17:36 EST 2013


On 01/30/2013 08:34 PM, Sergey Ryazanov wrote:
> 2013/1/30 Chun Chien <johnyluyte at gmail.com>:
>> I used a Laptop running hostapd, with wired Internet connection eth0 and
>> wireless interface wlan2. And I used a android phone to connect to the
>> Internet via hostapd running on the laptop.
>>
>> I supposed that the packets sent from the phone to the Internet should go
>> through the following path.
>> Phone WiFi interface -> wlan2 of laptop -> Hostapd running on laptop -> eth0
>> of laptop -> The Internet
>> Is this correct?
>>
> Actually _data_ packets are never go through the hostapd. Hostapd acts
> as AP manager: constructs beacon frames, handle client
> association/authentication process, etc. Data packets travel as usual
> through the bridging or through the routing kernel subsystem. Wireless
> stack or driver inside the kernel is responsible for frame format
> conversion.
> If you use bridge, then packets go through the following path: wlan2
> -> (bridge) -> eth0.
> If your access point act as router, then packets go though then
> following path: wlan2 -> (IP router) -> eth0.
> So, if you need capture _data_ traffic from the phone then simply run
> wireshark on the wlan2 interface.

hostapd may not support it, but there is wlantest which I think could do
that. Whether that is useful probably depends on what you actually want
to do with those packets.

Gr. AvS

> --
> BR,
> Sergey
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
> 




More information about the HostAP mailing list