Path: utzoo!bnr-vpa!bnrgate!bnr-fos!bmers58!davem From: davem@bmers58.UUCP (Dave Mielke) Newsgroups: comp.unix.wizards Subject: Re: Determining one's own IP address. Message-ID: <624@bmers58.UUCP> Date: 14 Dec 89 16:25:22 GMT References: <601@bmers58.UUCP> <4429@ur-cc.UUCP> <604@bmers58.UUCP> <5215@tekcrl.LABS.TEK.COM> Reply-To: davem@bmers58.UUCP (Dave Mielke) Organization: Bell-Northern Research, Ottawa, Canada Lines: 8 I thank you all for your responses and mail. The solution that works, i.e. the one which yields the local IP address without looking in the hosts file or yp is as follows: struct sockaddr_in address; get_myaddress(&address); return address.sin_addr;