Subject: Re: libwrap
To: Erik Huizing <>
From: Jeremy C. Reed <>
List: netbsd-users
Date: 02/13/2001 19:23:03
On Tue, 13 Feb 2001, Erik Huizing wrote:

> I'm writing a socket-based program, and was wondering if there's a builtin
> way to log all connections like ftpd, telnetd & co. do?  Is that an
> inetd-only thing? I've looked for 'wrap' in all the header files, but
> found nothing describing what I'm looking for. I suppose I could use
> syslog, but I'd rather not reinvent the wheel if possible.

inetd does the connection logging with syslog (when inetd has the
"-l" switch).

inetd.c has:
                if (lflag) {
                            "connection from %.500s, service %s (%s)",
                            eval_client(&req), service, sep->se_proto);

So if I understand you (and this) correctly, it looks like using syslog is
the correct way and using syslog wouldn't be reinventing the wheel.

Tell us more about your project.

(On a related note, this needs to be documented better in the inetd manual
page and I believe that manual pages for tcpd and libwrap need to be made 
or at least linked to /usr/share/man/cat3/hosts_access.0.)

   Jeremy C. Reed