Re: net-snmp fails to create entries with a zero in the OID

2013-07-16 Thread Magnus Fromreide
On Tue, 2013-07-16 at 17:32 +0800, zhuyj wrote: > Hi, > > Please give some advice about this patch. Don't panic. I am looking at it. /MF > Thanks. > > Best Regards! > zhuyj > > On 07/16/2013 04:49 PM, zhuyj wrote: > > Hi, Magnus > > > > Based on your patch, I made a new patch. This patch dep

Re: net-snmp fails to create entries with a zero in the OID

2013-07-16 Thread zhuyj
Hi, This is the test result. Please advise. root@localhost:/etc/snmp> snmpset -v2c -c NETMAN 127.0.0.1 .1.3.6.1.6.3.12.1.2.1.9.0.25 i 5 SNMP-TARGET-MIB::snmpTargetAddrRowStatus.'..' = INTEGER: createAndWait(5) root@localhost:/etc/snmp> snmpset -v2c -c NETMAN 127.0.0.1 .1.3.6.1.6.3.12.1.2.1.9.0.

Re: net-snmp fails to create entries with a zero in the OID

2013-07-16 Thread zhuyj
Any advice? On 07/16/2013 04:49 PM, zhuyj wrote: > Hi, Magnus > > Based on your patch, I made a new patch. This patch depends on > net-snmp5.7.2. > I made the following modifications compared with your patch: > 1.add strdup2 to replace strdup; > 2.modify addToList function; > 3.change some NUL-te

snmptrapd_handler.c and netsnmp_pdu (Trap receiver implementation)

2013-07-16 Thread Ruben Vacing
I made a trap receiver application. I just only modified the snmptrapd_handler in the next way: int print_handler( netsnmp_pdu *pdu, netsnmp_transport *transport, netsnmp_trapd_handler *handler){ int iii= ems_flush_traps(pdu,tra

snmptrapd_handler.c and netsnmp_pdu (Trap receiver implementation)

2013-07-16 Thread Ruben Vacing
I made a trap receiver application. I just only modified the snmptrapd_handler in the next way: int print_handler( netsnmp_pdu *pdu, netsnmp_transport *transport, netsnmp_trapd_handler *handler){ int iii= ems_flush_traps(pdu,tra

Re: net-snmp fails to create entries with a zero in the OID

2013-07-16 Thread zhuyj
Hi, Please give some advice about this patch. Thanks. Best Regards! zhuyj On 07/16/2013 04:49 PM, zhuyj wrote: > Hi, Magnus > > Based on your patch, I made a new patch. This patch depends on > net-snmp5.7.2. > I made the following modifications compared with your patch: > 1.add strdup2 to repla

Re: net-snmp fails to create entries with a zero in the OID

2013-07-16 Thread zhuyj
Hi, Magnus Based on your patch, I made a new patch. This patch depends on net-snmp5.7.2. I made the following modifications compared with your patch: 1.add strdup2 to replace strdup; 2.modify addToList function; 3.change some NUL-terminated strings to counted-strings, but not all; The patch is