diff -r 5e66e2b7b953 configure.ac --- a/configure.ac Tue Mar 09 15:08:00 2010 +0100 +++ b/configure.ac Wed Mar 10 14:53:31 2010 +0900 @@ -1105,7 +1105,12 @@ LIBS="$LIBS $SNMPLIBS" AC_CHECK_FUNCS(netsnmp_transport_open_client) if test $ac_cv_func_netsnmp_transport_open_client != yes; then - SUPPORT_SNMP=no + AC_CHECK_FUNCS(netsnmp_tdomain_transport) + if test $ac_cv_func_netsnmp_tdomain_transport != yes; then + SUPPORT_SNMP=no + fi + else + AC_DEFINE_UNQUOTED([NETSNMPV54], $NETSNMP_NEW_SUPPORT, [have net-snmp5.4 over]) fi LIBS=$savedLibs fi diff -r 5e66e2b7b953 tools/crm_mon.c --- a/tools/crm_mon.c Tue Mar 09 15:08:00 2010 +0100 +++ b/tools/crm_mon.c Wed Mar 10 14:53:31 2010 +0900 @@ -1194,6 +1194,10 @@ static netsnmp_session *crm_snmp_init(const char *target) { static netsnmp_session *session = NULL; +#ifndef NETSNMPV54 + char default_port[128]; + snprintf(default_port,sizeof(default_port),"%s:162",target); +#endif if(session) { return session; @@ -1216,7 +1220,11 @@ session->callback_magic = NULL; session = snmp_add(session, +#ifdef NETSNMPV54 netsnmp_transport_open_client("snmptrap", target), +#else + netsnmp_tdomain_transport(default_port, 0, "udp"), +#endif NULL, NULL); if (session == NULL) {