Re: detect client disconnecting ...


From: Jouni Malinen (jkmaline_at_cc.hut.fi)
Date: 2002-10-03 03:23:37 UTC



On Wed, Oct 02, 2002 at 06:44:40PM -0700, Jun Sun wrote:

> I have been trying to find a way of detecting WLAN client joining
> and leaving the HostAP. So I chose to monitor /proc/net/prims2/wlan0
> directory and observe the mac addresses being added or removed.

With latest version of Linux wireless ext you could also use iwevent for receiving info about registered and expired stations without needing to poll a file in proc directory.

> I notice however it takes quite long to remove the MAC address
> for a client who has already left (about 5min). Is there any
> better way of doing this? Or can I shorten that lag time?

I don't think there is a better way -- this requires AP polling the STA to get knowledge about all cases. If the STA is moving to another AP, IAPP or something similar could be used (i.e., the new AP would inform old one).

You can set the maximum inactivity time in driver/modules/hostap_wlan.h (AP_MAX_INACTIVITY) for driver-based management code or hostapd/ap.h for user space -based management code (hostapd).

-- 
Jouni Malinen                                            PGP id EFC895FA


This archive was generated by hypermail 2.1.4.