Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Reading AP(Access Point) Table

From Wiki
Jump to: navigation, search
Article Metadata
Created: spark55 (10 Sep 2007)
Last edited: hamishwillee (27 Jul 2012)
void ReadAPTable()
struct ifconf ifc;
int sockfd;
ifc.ifc_len = sizeof(ifreq) * 20;
ifc.ifc_buf = (caddr_t)malloc( ifc.ifc_len );
// This will get the whole access points list
// Here, ifc.ifc_len will contain the size of the buffer
ret = ioctl(sockfd, SIOCGIFCONF, &ifc);
// count will contain the number of access points
count = ifc.ifc_len / sizeof(struct ifreq) ;
// This will get only the active connection list
ret = ioctl(sockfd, SIOCGIFACTIVECONF, &ifc);

The above Open C code shows that, we can either read the whole access points details(SIOCGIFCONF ) or only read active access points details(SIOCGIFACTIVECONF ).


This page was last modified on 27 July 2012, at 04:17.
62 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.