From 79bc88de67e7ac68e89807acce689d8755685ec2 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Mon, 5 Dec 2005 18:38:11 +0000 Subject: [PATCH] filter network interfaces to just loopback and ethernet --- src/os/darwin/darwin_sigar.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/os/darwin/darwin_sigar.c b/src/os/darwin/darwin_sigar.c index 409d7409..ad9b7cba 100644 --- a/src/os/darwin/darwin_sigar.c +++ b/src/os/darwin/darwin_sigar.c @@ -1591,6 +1591,11 @@ static int sigar_ifmsg_iter(sigar_t *sigar, ifmsg_iter_t *iter) if (sdl->sdl_family != AF_LINK) { continue; } + if (!((sdl->sdl_type == IFT_ETHER) || + (sdl->sdl_type == IFT_LOOP))) + { + continue; /* XXX deal w/ other weirdo interfaces */ + } switch (iter->type) { case IFMSG_ITER_LIST: