Re: problem with ifnet_get_address_list_family on Lion
Re: problem with ifnet_get_address_list_family on Lion
- Subject: Re: problem with ifnet_get_address_list_family on Lion
- From: Vincent Lubet <email@hidden>
- Date: Tue, 9 Aug 2011 11:13:17 -0700
Hi Richard,
If you did not get a reply yet, I would suggest that you file a bug report at https://bugreporter.apple.com/
Vincent
On Jul 22, 2011, at 2:26 PM, Richard Hood wrote:
> 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