From owner-freebsd-net Sat Feb 16 21: 2:25 2002 Delivered-To: freebsd-net@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id 4924337B405 for ; Sat, 16 Feb 2002 21:02:23 -0800 (PST) Received: by elvis.mu.org (Postfix, from userid 1192) id 203A8AE4AC; Sat, 16 Feb 2002 21:02:18 -0800 (PST) Date: Sat, 16 Feb 2002 21:02:18 -0800 From: Alfred Perlstein To: Nuno Miguel Fernandes Sucena Almeida Cc: freebsd-net@freebsd.org Subject: Re: getifaddrs usage (bug?) Message-ID: <20020217050218.GE12136@elvis.mu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.27i Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org * Nuno Miguel Fernandes Sucena Almeida [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