Roy Marples
2009-04-17 14:34:12 UTC
This happens in NetBSD-5 -> -current.
NetBSD-4 and FreeBSD-7 aren't affected.
#include <net/if.h>
#include <ifaddrs.h>
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
struct ifaddrs *ifaddrs, *ifa;
if (getifaddrs(&ifaddrs) == -1)
exit(EXIT_FAILURE);
for (ifa = ifaddrs; ifa; ifa = ifa->ifa_next) {
if (ifa->ifa_addr->sa_family != AF_LINK)
continue;
printf ("%s %p\n", ifa->ifa_name, ifa);
}
freeifaddrs(ifaddrs);
exit(0);
}
uberlaptop$ ./ifaddrs
bge0 0xbb902000
bge0 0xbb90201c
fwip0 0xbb902070
fwip0 0xbb90208c
iwi0 0xbb9020c4
iwi0 0xbb9020e0
lo0 0xbb902134
lo0 0xbb902150
Is this a bug or do I need to check something else?
Thanks
Roy
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
NetBSD-4 and FreeBSD-7 aren't affected.
#include <net/if.h>
#include <ifaddrs.h>
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
struct ifaddrs *ifaddrs, *ifa;
if (getifaddrs(&ifaddrs) == -1)
exit(EXIT_FAILURE);
for (ifa = ifaddrs; ifa; ifa = ifa->ifa_next) {
if (ifa->ifa_addr->sa_family != AF_LINK)
continue;
printf ("%s %p\n", ifa->ifa_name, ifa);
}
freeifaddrs(ifaddrs);
exit(0);
}
uberlaptop$ ./ifaddrs
bge0 0xbb902000
bge0 0xbb90201c
fwip0 0xbb902070
fwip0 0xbb90208c
iwi0 0xbb9020c4
iwi0 0xbb9020e0
lo0 0xbb902134
lo0 0xbb902150
Is this a bug or do I need to check something else?
Thanks
Roy
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de