Hello All, We are using NetSNMP trap formatting routines realloc_format_plain_trap and realloc_format_trap to format the received traps. Its observed that gethostbyaddr() routine is used for resolving the trap source ip address in these trap formatting routines. For unresolved hostnames this routine is taking approximately 5 seconds and the trap formatting routine returns after 5 seconds only.
In our environment, we continually adds hosts and this resulted in delay in trap processing due to failed name resolutions. I have checked NetSNMP code and it’s observed that the hostname resolution is made configurable with snmptrapd. netsnmp_ds_booleans array index obtained from NETSNMP_DS_APPLICATION_ID and NETSNMP_DS_APP_NUMERIC_IP is set as TRUE when snmptrapd is started with –n option. So when we receive a trap, if this array index is set as TRUE, then it does not attempt to translate source addresses of incoming packets into hostnames, hence gethostbyaddr() is not invoked. I have tried to modify to set this array index from my application, similar way as done in snmptrapd code using NetSNMP snmplib routine netsnmp_ds_set_boolean(). Also I tried to retrieve the value using netsnmp_ds_get_boolean () routine and verified that the value retrieved is 1. But it is observed that the value is not visible in NetSNMP trap formatting routines when the value is retrieved using netsnmp_ds_get_boolean () routine. Could you please add two new routines in NetSNMP apps code to set and get netsnmp_ds_booleans array values, similar to NetSNMP snmplib routines netsnmp_ds_set_boolean() and netsnmp_ds_get_boolean (). Thanks and Regards, Jobin Joseph ------------------------------------------------------------------------------ Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users