Subject: Re: minimal code for a telnet-like daemon?
To: None <netbsd-help@netbsd.org>
From: David Wetzel <dave@turbocat.de>
List: netbsd-help
Date: 12/28/1999 05:15:45
Thanks for all the hints so far.

I want to get the IP adress and host name of the remote box. The following  
is from the current fingerd.c file:

-------------------------------
	if (logging) {
		sval = sizeof(ss);
		if (getpeername(0, (struct sockaddr *)&ss, &sval) < 0)
			err("getpeername: %s", strerror(errno));
		(void)getnameinfo((struct sockaddr *)&ss, sval,
				hostbuf, sizeof(hostbuf), NULL, 0, 0);
		lp = hostbuf;
-------------------------------

But getnameinfo does not exist on my netbsd 1.4.1 machine. Is there an other  
simple way to find this out?

Thanks.

---
   _  _
 _(_)(_)_  David Wetzel, Turbocat's Development,
(_) __ (_) Buchhorster Strasse, D-16567 Muehlenbeck/Berlin, FRG,
  _/  \_   Fax +49 33056 82835 NeXTmail dave@turbocat.de
 (______)  http://www.turbocat.de/
           DEVELOPMENT * CONSULTING * ADMINISTRATION