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

Sergey Ryazanov ryazanov.s.a at gmail.com
Wed Jan 30 14:34:19 EST 2013


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.

--
BR,
Sergey


More information about the HostAP mailing list