SAMBA gethostbyaddr in access.log

From: Philippe PAULEAU <ppauleau@dont-contact.us>
Date: Thu, 28 Oct 1999 09:45:10 +0200

Hello,
i uses squid in my company with 300 WinPC, which
have dynamic IP by DHCP.
I always wanted to resolve IP in the access.log so,
based on SAMBA nmblookup sources, i made one .c
and several .h, added a small cache manager and
put this file in SQUID makefile.
It works fine with it.

So, i was wondering:

1 - i do not know if somebody else have done this, but
i think this can be usefull for someone else.

2 - do i have the right to post the changes ? and where ?

3 - i think the code is clean, but not 100% guaranted.

accesslog.c changed like this:

static void
accessLogSquid(AccessLogEntry * al, MemBuf * mb)
{
    const char *client = NULL;
    if (Config.onoff.log_fqdn)
/* client = fqdncache_gethostbyaddr(al->cache.caddr,
FQDN_LOOKUP_IF_MISS);
*/
        client = nmblookup( al->cache.caddr.s_addr );
    if (client == NULL)
        client = inet_ntoa(al->cache.caddr);

--
Philippe PAULEAU
Beginner SQUID hacker
Received on Thu Oct 28 1999 - 00:45:16 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:18 MST