Disassociation support...

Raghavendra. S raghavendra.akkasali
Tue Dec 11 16:33:06 PST 2007

    My requirement is something like this...let me explain with small
piece of code.

int main()
     printf("1- scan\n
                2 - enable esecurity\n
                3 - disable security\n
                4 - edit config\n");

    //after taking input from user - say 'choice'


case SCAN:
                 // here i want to scan using wpa supplicant. and get result.

                // user will enter inputs after seeing scan result and
then i will configure wpa_supplicant.conf as per users requirement.

             // here i will enable supplicant. as below
            system("./wpa_supplicant -c ./wpa_supplicant.conf");
//assume I will enable successfully with required command line
            //if successfully enabled i will work here...say getting
ip...ping etc..

            //here i should disable to do that...
            // I have to disassociate first.
            // then i will kill wpa supplicant.


return 0;

My code will look as above. I would like to understand following things here.

 1. for scanning - I will modify wpa supplicant code to take command
line argument say  '-s' which indicates enable wpa supplicant only to
scan. so I will enable wpa supplicant like this,
system("./wpa_supplicant   -s  -c ./dummy_wpa_supplicant.conf"). I
think using this I will get scan result. Let me know if there's any
better approach. My objective here is to get scan result and i should
fill this scan result in some structure.

2. For disable security. - First I will disassociate. problem here is
how i will get control on socket opened by wpa_supplicant, to
disassociate it? If I able to to that then...my problem is solved.
After this I will simply kill wpa supplicant.

I am not planning to use, wpa_cli.


On 12/11/07, Jouni Malinen <j at w1.fi> wrote:
> On Tue, Dec 11, 2007 at 06:51:01AM +0530, Raghavendra. S wrote:
> >     In below mailing list link you have mentioned that wpa supplicant
> > snapshot version has provided command to disassociate.
> >
> >     http://lists.shmoo.com/pipermail/hostap/2003-November/004852.html
> That message has nothing to do with wpa_supplicant (it was about the
> Host AP driver).
> >    I downloaded snapshot 0.6.0. But could not find command for
> > disassociation. Will you plz tell me where can I get wpa supplicant code
> > that supports disassociation command.
> What exactly do you mean with "disassociation command"? Would 'wpa_cli
> disconnect' meet your needs?
> --
> Jouni Malinen                                            PGP id EFC895FA
> _______________________________________________
> HostAP mailing list
> HostAP at shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap

Regards & Thanks
Raghavendra. S

More information about the Hostap mailing list