¡@

Home 

2014/10/15 ¤U¤È 10:14:16

iphone Programming Glossary: sockaddr_dl

What to use if not “IPHONE UDID”?

http://stackoverflow.com/questions/3860751/what-to-use-if-not-iphone-udid

Category here NSString macaddress int mib 6 size_t len char buf unsigned char ptr struct if_msghdr ifm struct sockaddr_dl sdl mib 0 CTL_NET mib 1 AF_ROUTE mib 2 0 mib 3 AF_LINK mib 4 NET_RT_IFLIST if mib 5 if_nametoindex en0 0 printf Error if_nametoindex.. NULL if sysctl mib 6 buf len NULL 0 0 printf Error sysctl take 2 return NULL ifm struct if_msghdr buf sdl struct sockaddr_dl ifm 1 ptr unsigned char LLADDR sdl NSString outstring NSString stringWithFormat @ 02X 02X 02X 02X 02X 02X ptr ptr 1 ptr..

iPhone Data Usage Tracking/Monitoring

http://stackoverflow.com/questions/7946699/iphone-data-usage-tracking-monitoring

getDataCountersForType int type BOOL success struct ifaddrs addrs nil const struct ifaddrs cursor nil const struct sockaddr_dl dlAddr nil const struct if_data networkStatisc nil int dataSent 0 int dataReceived 0 success getifaddrs addrs 0 if success.. addrs 0 if success cursor addrs while cursor NULL if cursor ifa_addr sa_family AF_LINK dlAddr const struct sockaddr_dl cursor ifa_addr networkStatisc const struct if_data cursor ifa_data if type WiFi dataSent networkStatisc ifi_opackets.. or understanding. Need someone to help me out. Edit Instead of AF_LINK I tried AF_INET sockaddr_in instead of sockaddr_dl . This crashes the application. iphone ios sockets share improve this question The thing is that pdp_ip0 is one of..