[AGENT++] Usage of gethostbyname and gethostbyaddr in SNMP++v3.2.1b.

Gopi Krishna Bhavaraju gopi at persistent.co.in
Wed Apr 14 08:41:22 CEST 2004


Hi,

We are currently using SNMP 3.2.1b version for our SNMP Agent implementation. Our agent is supported on Windows, Solaris, Linux, HP-UX and AIX.

We have observed that IpAddress class (address.cpp) uses non-thread safe functions gethostbyname and  gethostbyaddr.  I found that this problem has been fixed in current version (SNMP++v3.2.11).  However we can't upgrade to this newer version as our product is too close for a release. Also I cannot use the newer version of this file as it uses macros (HAVE_GETHOSTBYADDR_R, HAVE_GETHOSTBYNAME_R and other macros) from config_snmp_pp.h (this file does not exist in 3.2.1b).

It would be great if anyone can provide me a version of this file in which this problem has been addressed and works with SNMP 3.2.1b version without much code changes.

Thanks in advance,
Regards,
--Gopi.





More information about the AGENTPP mailing list