Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 10-12-2008, 07:43 AM   #5 (permalink)
md582
Registered Member
 
Join Date: Oct 2008
Posts: 6
Default

I think the iPhone doesn't have a IPv6 Address ? I only get the IPv4 with this code ! And IPv6 is not the MAC-Address !?
I thought i can use the <in.h> like this >>
...
struct ifreq ifr;
...
a = (unsigned char *) &ifr.ifr_hwaddr.sa_data;
printf("%02x:%02x:%02x:%02x:%02x:%02x\n", a[0],a[1],a[2],a[3],a[4],a[5]);
...
but the <in.h> hasn't the "ifr_hwaddr" like Linux has !! ??


see this >> from my Mac !!!
struct ifreq {
#ifndef IFNAMSIZ
#define IFNAMSIZ IF_NAMESIZE
#endif
char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */
union {
struct sockaddr ifru_addr;
struct sockaddr ifru_dstaddr;
struct sockaddr ifru_broadaddr;
short ifru_flags;
int ifru_metric;
int ifru_mtu;
int ifru_phys;
int ifru_media;
int ifru_intval;
caddr_t ifru_data;
struct ifdevmtu ifru_devmtu;
struct ifkpi ifru_kpi;
} ifr_ifru;

and this from Linux >>>
166 union {
167 struct sockaddr ifru_addr;
168 struct sockaddr ifru_dstaddr;
169 struct sockaddr ifru_broadaddr;
170 struct sockaddr ifru_netmask;
171 struct sockaddr ifru_hwaddr;
172 short ifru_flags;
173 int ifru_ivalue;
174 int ifru_mtu;
175 struct ifmap ifru_map;
176 char ifru_slave[IFNAMSIZ]; /* Just fits the size */
177 char ifru_newname[IFNAMSIZ];
178 void __user * ifru_data;
179 struct if_settings ifru_settings;
180 } ifr_ifru;

on my MAC (and iPhone) i'm missing the "ifr_hwaddr" !!
md582 is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,626
Threads: 89,143
Posts: 380,333
Top Poster: BrianSlick (7,110)
Welcome to our newest member, vhenziel8
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:56 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.