我想显示我所连接的WIFI AP的信息,怎么做?
+ (Reachability*) reachabilityForLocalWiFi;
{//NSLog(@"cheking all addresss ");
struct sockaddr_in localWifiAddress;
bzero(&localWifiAddress, sizeof(localWifiAddress));
localWifiAddress.sin_len = sizeof(localWifiAddress);
localWifiAddress.sin_family = AF_INET;
//NSLog(@"Destination%@",localWifiAddress.sin_len);
// IN_LINKLOCALNETNUM is defined in <netinet/in.h> as 169.254.0.0
localWifiAddress.sin_addr.s_addr = htonl(IN_LINKLOCALNETNUM);
Reachability* retVal = [self reachabilityWithAddress: &localWifiAddress];
if(retVal!= NULL)
{
retVal->localWiFiRef = YES;
//printf("%i",localWifiAddress);
}
return retVal;
}