Re: win32 snmptrapd installation and name resolving
Bart Van Assche <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <CAO+b5-qpRzxpGMK_HhT+cLZw3VmQmZNRiRNu3gKQtuE4L74Nag@mail.gmail.com> |
On Tue, Aug 16, 2011 at 11:41 AM, Roland Klein Overmeer [GISS] < [email protected]> wrote: > I just installed version 5.7 of net-snmp and activated the snmptrapd as a > service. Traps are received and nicely logged to the event log. Only problem > is that the sending ip isn't resolved to a host name. I also get an error in > the event log: > > net-snmp trap handler error 100 gethostbyname not available > > What can I do to get the snmptrapd to convert the incomming ip to name > before logging it to the ventlog? > Does the attached patch help ? Bart. ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
0001-CHANGES-Windows-snmptrapd-Make-the-IP-address-to-hos.patch
(application/octet-stream, 1.7 KB)
From 049e7e064210006cdbd77b28a877c1ccaf375613 Mon Sep 17 00:00:00 2001 From: Bart Van Assche <[email protected]> Date: Wed, 17 Aug 2011 12:53:27 +0200 Subject: [PATCH] CHANGES: Windows: snmptrapd: Make the IP address to hostname conversion work --- snmplib/system.c | 2 +- win32/net-snmp/net-snmp-config.h | 3 +++ win32/net-snmp/net-snmp-config.h.in | 3 +++ 3 files changed, 7 insertions(+), 1 deletions(-) diff --git a/snmplib/system.c b/snmplib/system.c index 2c3c6bf..cec6c34 100644 --- a/snmplib/system.c +++ b/snmplib/system.c @@ -972,7 +972,7 @@ netsnmp_gethostbyaddr(const void *addr, socklen_t len, int type) } return hp; #else - NETSNMP_LOGONCE((LOG_ERR, "gethostbyname not available")); + NETSNMP_LOGONCE((LOG_ERR, "gethostbyaddr not available")); return NULL; #endif } diff --git a/win32/net-snmp/net-snmp-config.h b/win32/net-snmp/net-snmp-config.h index f52224e..8e9b8e4 100644 --- a/win32/net-snmp/net-snmp-config.h +++ b/win32/net-snmp/net-snmp-config.h @@ -1402,6 +1402,9 @@ /* define if you have gethostbyname */ #define HAVE_GETHOSTBYNAME 1 +/* define if you have gethostbyaddr */ +#define HAVE_GETHOSTBYADDR 1 + /* printing system */ /* #undef HAVE_LPSTAT */ /* #undef LPSTAT_PATH */ diff --git a/win32/net-snmp/net-snmp-config.h.in b/win32/net-snmp/net-snmp-config.h.in index 41a6433..735a8c9 100644 --- a/win32/net-snmp/net-snmp-config.h.in +++ b/win32/net-snmp/net-snmp-config.h.in @@ -1402,6 +1402,9 @@ /* define if you have gethostbyname */ #define HAVE_GETHOSTBYNAME 1 +/* define if you have gethostbyaddr */ +#define HAVE_GETHOSTBYADDR 1 + /* printing system */ /* #undef HAVE_LPSTAT */ /* #undef LPSTAT_PATH */ -- 1.7.5.1