[Mono-list] Getting list of IPAddress available

Matt Nuzum matt@followers.net
Mon, 29 Nov 2004 22:21:23 -0500

On Mon, 29 Nov 2004 12:14:59 -0800, Jim P. <mono@cinemanage.com> wrote:
> Dns.GetHostByName (Dns.GetHostName()); 

I tried it on my computer and get the correct output. On my computer:
~/ $ hostname
~/ $ host domain name pointer matt.
~/ $ host matt
matt.newz.gotdns.com has address

$ mono gethostname.exe
Local Machine's Host Name: matt
Number of available IPs: 1
IP Address 0:

Note that your code merely asks the computer what it refers to itself
as and then does a DNS lookup on that info.  This is heavily dependent
on a well-maintained network. (not that I know another way though)
Matthew Nuzum <matt@followers.net>
www.followers.net - Makers of "Elite Content Management System"
View samples of Elite CMS in action by visiting