Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Feb 2002 21:02:18 -0800
From:      Alfred Perlstein <bright@mu.org>
To:        Nuno Miguel Fernandes Sucena Almeida <slug@alumni.deec.uc.pt>
Cc:        freebsd-net@freebsd.org
Subject:   Re: getifaddrs usage (bug?)
Message-ID:  <20020217050218.GE12136@elvis.mu.org>
In-Reply-To: <Pine.BSF.4.21.0202170419160.1461-100000@alumni.deec.uc.pt>
References:  <Pine.BSF.4.21.0202170419160.1461-100000@alumni.deec.uc.pt>

next in thread | previous in thread | raw e-mail | index | archive | help
* Nuno Miguel Fernandes Sucena Almeida <slug@alumni.deec.uc.pt> [020216 20:29] wrote:
> Hello,
> 	i'm using getifaddrs to get the IP and HW address of an ethernet
> interface but it seems that the ifap->ifa_next pointer is never NULL so I
> end up with an infinite loop! If i uncomment the // printf's I get the
> HW address correctly but after that I get the IP address repeated ad
> eternum! Any ideas ?


>         current = ifap->ifa_next;

should be:
current = current->ifa_next;

I also do birthdays and Bar Mitvahs, let me know.

-Alfred

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020217050218.GE12136>