<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.2668" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Dear all:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>I tried to use the hostap user daemon to control the terminal
to exchange association relation between two AP, and it is a hack and I
just want to try out if it works, So I just modified the hostapd.c (it just
includes the full hostapd.c file without main() function) and then design my own
main(function):(it's aim is to verify whether and how I can send out
reassociation mgmt frame)</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>int main()</FONT></DIV>
<DIV><FONT size=2>{</FONT></DIV>
<DIV><FONT size=2> struct hostapd *hapd1;</FONT></DIV>
<DIV><FONT size=2> hapd1=malloc(sizeof(struct
hostapd_data));</FONT></DIV>
<DIV><FONT size=2> register_drivers();</FONT></DIV>
<DIV><FONT size=2>
hapd1=hostapd_init("hostapd.conf");</FONT></DIV>
<DIV><FONT size=2>
hostapd_setup_interface(hapd1);</FONT></DIV>
<DIV><FONT size=2>
ieee802_11_sta_associate(hapd1,NULL);</FONT></DIV>
<DIV><FONT size=2> return(0)</FONT></DIV>
<DIV><FONT size=2>}</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>Compile and running shows no error. wlan0ap and
wlan0sta can be seen from the output of "iwconfig", but the associate
frame was not sent, and the hostapd_send_mgmt_frame function in the
"ieee802_11_sta_associate" function didn't show any message. </FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>what is the error in my little hack program? anyone
and any help is welcome.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>If someone can describe the framework on how to change
the associated AP with the hostap user daemon for a station, I 'll
appreciate very much!</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Anyway, Thanks a lot!</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Best
Regards,<BR> <BR>---------------------------------------------------------<BR>Zhang
Yanfeng <BR></FONT></DIV></BODY></HTML>