You Are Here:

Community: Wiki

This page was last modified on 29 May 2008, at 14:18.

Reading AP(Access Point) Table

From Forum Nokia Wiki

void ReadAPTable()
{
struct ifconf ifc;
int sockfd;
 
sockfd = socket(AF_INET,SOCK_DGRAM,IPPROTO_UDP);
 
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 number of access points
ret = ioctl(sockfd, SIOCGIFCONF, &ifc);
 
// This will get only the active connection list
// Here, ifc.ifc_len will contain the number of active connections
ret = ioctl(sockfd, SIOCGIFACTIVECONF, &ifc);
 
close(sockfd);
free(ifc.ifc_buf);
return;
}

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 ).

Links

Related Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia