On Tue, Sep 16, 2008 at 11:27:50PM +0530, Priyank Gosalia <[EMAIL PROTECTED]> wrote: > Well, for Wifi network detection, i am thinking of using 'iwlist' and > parsing it's output to display available networks. > I am not aware of any other method of detection.. something library > based. However, if someone does know more about it, please let me know.
I think you are right. wireless_tools provides libiw, but libfwnetconfig
does not use it either - no real reasons, I just haven't looked at its
API if it is too low-level or not.
Parsing the iwlist output should not be that hard.
Here are samples about 3 kinds of connection types we support in
libfwnetconfig (none/wep/wpa):
If you see 'Encryption key:off', then it's unencrypted.
If you see 'Encryption key:on' then it's WEP.
If you see IE.*WPA (see reg_match() for example in libfwxconfig.c), then
it's not just WEP but WPA.
Actually we could have two functions in libfwnetconfig for this:
enum {
FWNET_CONN_UNENCRYPTED = 1,
FWNET_CONN_WEP,
FWNET_CONN_WPA
};
/*
* the return value is a GList of char*, you just have to set
* iface->name
*/
GList *fwnet_ifscan(fwnet_interface_t *iface);
/*
* returns the enum defined above, uses iface->name and iface->essid
*/
int fwnet_ifguess(fwnet_interface_t *iface);
Nowadays I don't use WEP just plain wifi and WPA, but I can help with
implementing these functions if you want. Or you can do it as well. :)
pgp7Vzdkixemw.pgp
Description: PGP signature
_______________________________________________ Frugalware-devel mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-devel
