From owner-freebsd-hackers Sun Feb 9 00:14:40 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id AAA06413 for hackers-outgoing; Sun, 9 Feb 1997 00:14:40 -0800 (PST) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id AAA06408 for ; Sun, 9 Feb 1997 00:14:29 -0800 (PST) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id IAA10507 for hackers@freebsd.org; Sun, 9 Feb 1997 08:27:24 +0100 From: Luigi Rizzo Message-Id: <199702090727.IAA10507@labinfo.iet.unipi.it> Subject: How to get all ip addresses of a system ? To: hackers@freebsd.org Date: Sun, 9 Feb 1997 08:27:23 +0100 (MET) X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi, I was wondering, is there a system call (possibly portable to different OS's) to get all the addresses associated with a system ? Ideally, I would like something to scan the "in_ifaddr" list in the kernel. I can probably hack something using kvm_read, but would prefer a better (and more portable) way if possible. Any ideas ? Thanks Luigi -----------------------------+-------------------------------------- Luigi Rizzo | Dip. di Ingegneria dell'Informazione email: luigi@iet.unipi.it | Universita' di Pisa tel: +39-50-568533 | via Diotisalvi 2, 56126 PISA (Italy) fax: +39-50-568522 | http://www.iet.unipi.it/~luigi/ _____________________________|______________________________________