How to register a timeout to disconnect a sta after a given time?
arnekeller at gmx.de
Tue Jan 6 10:02:16 EST 2009
first of all i want to wish everyone a happy new year!
Now back to business ;) I'm trying to implement a new function in
hostapd to disconnect a STA after a given time. The goal is to connect a
client let's say via PSK to the AP fetch a file from the network and
then AP based disconnect the client from WLAN after two seconds.
I have found the function eloop_register_timeout but right now I don't
understand how and where to use it.
Can someone give me a short introduction?
out of eloop.h:
int eloop_register_timeout(unsigned int secs, unsigned int usecs,
void *eloop_data, void *user_data);
// secs: Number of seconds to the timeout
// usecs: Number of microseconds to the timeout
OK I think I understand this so far ;)
// handler: Callback function to be called when timeout occurs
this should be the function to be called to disconnect the STA could
// eloop_data: Callback context data (eloop_ctx)
// user_data: Callback context data (sock_ctx)
I have no idea what this is :D
Is it possible to register the timeout at the end of:
thanks in advance
More information about the HostAP