problem with ifnet_get_address_list_family on Lion
problem with ifnet_get_address_list_family on Lion
- Subject: problem with ifnet_get_address_list_family on Lion
- From: Richard Hood <email@hidden>
- Date: Fri, 22 Jul 2011 17:26:56 -0400
now that we can talk about Lion . . .
I'm having some problems with ifnet_get_address_list_family() on Lion.
at startup my kext gets all the active IP interfaces on the system.
the problem is that on Lion I'm getting an ENXIO (device not configured) error whereas on Snow Leopard this code is working fine.
however, once the systems has booted, if I stop the kext and restart it the call seems to work fine.
anyone know what has changed in Lion with-respect-to ifnet_get_address_list_family()?
the code looks something like this . . .
ifnet_t *interfaces = NULL;
u_int32_t cnt = nInfos;
int err = ifnet_list_get(IFNET_FAMILY_ETHERNET, &interfaces, &cnt);
if (err)
{
NETLOG(("ifnet_list_get: error=%d\n", err));
return 0;
}
NETLOG(("Interface count=%d\n", cnt));
int i;
int mm=0;
for (i=0;i<cnt;i++)
{
u_int16_t flags = ifnet_flags(interfaces[i]);
NETLOG(("Interface %p flags=0x%x\n", interfaces[i], flags));
if (!(flags & IFF_UP))
continue;
ifaddr_t *addrList;
err = ifnet_get_address_list_family(interfaces[i], &addrList, PF_INET);
if (err)
{
NETLOG(("ifnet_get_address_list_family: error=%d\n", err));
continue;
}
[ code snipped ]
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden