how to display the name of wifi AP using reachability wifi example on iphone
i want to display the infomation of my WIFI AP to which i am connected , how to do that ???
+ (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 开发者_JS百科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;
}
精彩评论