/* -*-c-*-
*
- * $Id: identify.c,v 1.1 1999/07/01 08:56:23 mdw Exp $
+ * $Id: identify.c,v 1.2 1999/07/03 13:56:59 mdw Exp $
*
* Identifies and logs the client of a connection
*
/*----- Revision history --------------------------------------------------*
*
* $Log: identify.c,v $
- * Revision 1.1 1999/07/01 08:56:23 mdw
- * Initial revision
+ * Revision 1.2 1999/07/03 13:56:59 mdw
+ * Log connections to syslog or stderr as appropriate.
+ *
+ * Revision 1.1.1.1 1999/07/01 08:56:23 mdw
+ * Initial revision.
*
*/
tm = localtime(&i->when);
strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", tm);
- syslog(LOG_NOTICE, "%s %s %s from %s@%s\n",
- buf, i->q.desc, i->q.act, i->user, i->host);
+ if (flags & FW_SYSLOG) {
+ syslog(LOG_NOTICE, "%s %s %s from %s@%s [%s]\n",
+ buf, i->q.desc, i->q.act,
+ i->user, i->host, inet_ntoa(i->q.rsin.sin_addr));
+ } else {
+ fprintf(stderr, "%s %s %s from %s@%s [%s]\n",
+ buf, i->q.desc, i->q.act,
+ i->user, i->host, inet_ntoa(i->q.rsin.sin_addr));
+ }
/* --- Dispose of the block --- */