statistical information about sent and received packets by hostap

zze-RIVOALEN Mathieu FTRD/DAC/LAN mathieu.rivoalen at
Mon Jun 7 04:01:15 EDT 2004

Le Fri, 4 Jun 2004 19:03:32 +0200, Robel Daher 
<daher at> a écrit:

> Hello everyone,
> My hostap driver version 0.1.13 is installed on Fedora core 1 and I use
> the pcmcia card Netgear 401.
> I'm working on small software to observe the date throughput on the
> WLAN-Station. To do this I need in the real time to get statistical
> information about the sent and received packets.
> As I read, it's possible to get this kind of information by opening the
> file "/proc/net/prism2/wlan0/stats". However, the information that I
> need for my implementation aren't there, like the SNR value through the
> transmission of a packet and also the transmission bit rate of this
> packet.
> I'll be very thankful, if someone has some suggestions or solution to
> this matter.
> Robel

i've added a little entry in /proc/net/hostap/wlan0/ which is like that :

[root at l-dhcp-1967-6 root]# cat /proc/net/hostap/wlan0/mesinfo
AP_0  : 00:09:5b:4c:a6:c2 flags=0x0003 AUTH ASSOC
   Supported_rates=1 2 5.5 11  tx_rate:11 Mbps
   rx_packets :     1227  rx_bytes :    44172
   tx_packets :        0  tx_bytes :        0
   last_rx: silence=0 dBm signal=123 dBm rate=1 Mbps
   last_auth:0   last_assoc:0
   last_rx=307984   last_tx=0
    last_rx=0:51:19:84 last_tx=0:0:0:0
tx[1M]=   0  tx[2M]=   0  tx[5.5M]=   0  tx[11M]=   0
rx[1M]=1226  rx[2M]=   0  rx[5.5M]=   0  rx[11M]=   0
  channel=13   ssid=tsunami
  beacon count= 1227
STA_1  : 00:02:2d:60:91:f1 flags=0x0007 AUTH ASSOC PS
   Supported_rates=1 2 5.5 11  tx_rate:11 Mbps
   rx_packets :      306  rx_bytes :     7344
   tx_packets :        2  tx_bytes :       62
   last_rx: silence=0 dBm signal=-64 dBm rate=2 Mbps
   last_auth:299818   last_assoc:299818
   last_rx=325590   last_tx=299818
    last_rx=0:54:15:90 last_tx=0:49:58:18
tx[1M]=   1  tx[2M]=   0  tx[5.5M]=   0  tx[11M]=   1
rx[1M]=   0  rx[2M]= 612  rx[5.5M]=   0  rx[11M]=   0

this entry lists the other ap depending on the other_ap_policy parameter 
and all the sta associated to the current ap.
Of course all theses informations are updated at every received beacons or 
packets from other AP or every received packet from stations.
In fact this entry is only a merge of all the 
/proc/net/hostap/wlan0/XX:XX:XX:XX:XX:XX entries.
I suppose that you search for this kind of informations ?

So look into the file hostap_proc.c. You should find some ideas. Look also 
the structure  "sta_info".

Mathieu Rivoalen

ps : sorry for my english :-)

More information about the HostAP mailing list