Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!munnari.oz.au!manuel!coombs!avalon From: avalon@coombs.anu.edu.au (Darren Reed) Newsgroups: comp.unix.programmer Subject: gethostent() and getnetent() Message-ID: Date: 18 Jun 91 03:58:43 GMT Sender: news@newshost.anu.edu.au Organization: Computer Services Centre, Australian National University Lines: 22 When using the gethostent() function call and its related calls, it doesnt seem to return any aliases in haliases even though, according to nslookup the hostname in question has an alias. the code follows : a = inet_addr(s); host = gethostbyaddr(&a, sizeof(a), AF_INET); Am i doing something wrong here ? I have also tried to use getnetbyaddr() in much the same manner as the above call to gethostbyaddr(), but getnetbyaddr() or getnetbyname() only ever seem to return a NULL pointer. ie: a = inet_network(s); net = getnetbyaddr(&a, sizeof(a), AF_INET); will return net as a NULL pointer. thanks, -avalon