Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

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

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

 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX