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

2013-12-10 Thread zhuyj
On 12/02/2013 12:53 AM, Magnus Fromreide wrote: > On Fri, 2013-11-29 at 11:24 +0800, yzhu1 wrote: >> On 11/26/2013 02:58 PM, Magnus Fromreide wrote: >>> On Tue, 2013-11-26 at 11:05 +0800, yzhu1 wrote: Hi, Magnus Follow your advice, I made the 3 new patches. Now the patches are in the

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

2013-12-09 Thread zhuyj
Hi Any update? Zhu Yanjun On 12/04/2013 04:48 PM, yzhu1 wrote: > On 12/02/2013 12:53 AM, Magnus Fromreide wrote: >> On Fri, 2013-11-29 at 11:24 +0800, yzhu1 wrote: >>> On 11/26/2013 02:58 PM, Magnus Fromreide wrote: On Tue, 2013-11-26 at 11:05 +0800, yzhu1 wrote: > Hi, Magnus > >

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

2013-12-06 Thread zhuyj
Hi, maintainers Any update about these patches? Zhu Yanjun On 12/04/2013 04:48 PM, yzhu1 wrote: > On 12/02/2013 12:53 AM, Magnus Fromreide wrote: >> On Fri, 2013-11-29 at 11:24 +0800, yzhu1 wrote: >>> On 11/26/2013 02:58 PM, Magnus Fromreide wrote: On Tue, 2013-11-26 at 11:05 +0800, yzhu1 w

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

2013-12-04 Thread zhuyj
Hi, maintainers Any update about these patches? Zhu Yanjun On 12/04/2013 04:48 PM, yzhu1 wrote: > On 12/02/2013 12:53 AM, Magnus Fromreide wrote: >> On Fri, 2013-11-29 at 11:24 +0800, yzhu1 wrote: >>> On 11/26/2013 02:58 PM, Magnus Fromreide wrote: On Tue, 2013-11-26 at 11:05 +0800, yzhu1 w

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

2013-12-02 Thread zhuyj
On 12/02/2013 12:53 AM, Magnus Fromreide wrote: > On Fri, 2013-11-29 at 11:24 +0800, yzhu1 wrote: >> On 11/26/2013 02:58 PM, Magnus Fromreide wrote: >>> On Tue, 2013-11-26 at 11:05 +0800, yzhu1 wrote: Hi, Magnus Follow your advice, I made the 3 new patches. Now the patches are in the

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

2013-11-28 Thread zhuyj
Thanks a lot. Zhu Yanjun On 11/28/2013 04:11 PM, zhuyj wrote: Hi, Magnus In some log, I replace nameData with the hex string of nameData. Maybe the log file can look better. The patch is in the attachment. Please check it. Best Regards! Zhu Yanjun On 11/28/2013 02:55 PM, zhuyj wrote: On 11/26/2

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

2013-11-28 Thread zhuyj
Hi, Magnus In some log, I replace nameData with the hex string of nameData. Maybe the log file can look better. The patch is in the attachment. Please check it. Best Regards! Zhu Yanjun On 11/28/2013 02:55 PM, zhuyj wrote: On 11/26/2013 02:52 PM, Magnus Fromreide wrote: On Mon, 2013-11-25 at

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

2013-11-27 Thread zhuyj
On 11/26/2013 02:52 PM, Magnus Fromreide wrote: On Mon, 2013-11-25 at 19:04 +0800, zhuyj wrote: On 11/25/2013 02:34 AM, Magnus Fromreide wrote: On Fri, 2013-11-22 at 14:27 +0800, zhuyj wrote: 4.patch -p1 < V5-7-patches-snmpTargetParam_support_zero_OID.patch snmpTargetAddrEntry.c: Chunk #2

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

2013-11-26 Thread zhuyj
On 11/26/2013 02:52 PM, Magnus Fromreide wrote: > On Mon, 2013-11-25 at 19:04 +0800, zhuyj wrote: >> On 11/25/2013 02:34 AM, Magnus Fromreide wrote: >>> On Fri, 2013-11-22 at 14:27 +0800, zhuyj wrote: >>>> 4.patch -p1 < V5-7-patches-snmpTargetParam_support_zero_OI

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

2013-11-25 Thread zhuyj
On 11/25/2013 02:34 AM, Magnus Fromreide wrote: On Fri, 2013-11-22 at 14:27 +0800, zhuyj wrote: On 11/22/2013 10:54 AM, zhuyj wrote: On 11/22/2013 02:45 AM, Bart Van Assche wrote: On 10/16/13 10:31, zhuyj wrote: If this patch is used in net-snmp-5.7.2, the following should be used, too. If

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

2013-11-25 Thread zhuyj
On 11/23/2013 09:03 PM, Bart Van Assche wrote: > On 11/22/13 07:27, zhuyj wrote: >> I prepared 3 patches based on V5-7-branch. > In the Net-SNMP project backwards compatibility is considered very > important. I think the patch "V5-7-patches-conf-su

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

2013-11-21 Thread zhuyj
On 11/22/2013 10:54 AM, zhuyj wrote: On 11/22/2013 02:45 AM, Bart Van Assche wrote: On 10/16/13 10:31, zhuyj wrote: If this patch is used in net-snmp-5.7.2, the following should be used, too. If not, snmp-trap could not work well. Hello Zhu, Please make yourself familiar with git and start

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

2013-11-21 Thread zhuyj
On 11/22/2013 02:45 AM, Bart Van Assche wrote: > On 10/16/13 10:31, zhuyj wrote: >> If this patch is used in net-snmp-5.7.2, the following should be used, >> too. If not, snmp-trap could not work well. > Hello Zhu, > > Please make yourself familiar with git and start fr

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

2013-11-21 Thread zhuyj
On 11/21/2013 10:41 PM, zhuyj wrote: On 11/18/2013 07:08 PM, Bart Van Assche wrote: On 11/18/13 11:48, zhuyj wrote: On 09/10/2013 01:41 PM, Bart Van Assche wrote: On 09/10/13 04:04, zhuyj wrote: Please help me to merge this patch into trunk. Thanks a lot. Hello Zhu, The code in

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

2013-11-21 Thread zhuyj
On 11/18/2013 07:08 PM, Bart Van Assche wrote: On 11/18/13 11:48, zhuyj wrote: On 09/10/2013 01:41 PM, Bart Van Assche wrote: On 09/10/13 04:04, zhuyj wrote: Please help me to merge this patch into trunk. Thanks a lot. Hello Zhu, The code in snmpd_parse_config_targetAddr() and

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

2013-11-18 Thread zhuyj
On 09/10/2013 01:41 PM, Bart Van Assche wrote: > On 09/10/13 04:04, zhuyj wrote: >> Please help me to merge this patch into trunk. Thanks a lot. > > Hello Zhu, > > The code in snmpd_parse_config_targetAddr() and > store_snmpTargetAddrEntry() assumes that targetAddTabl

Re: Linkear a dynamic module to a dynamic library

2013-11-08 Thread zhuyj
On 10/26/2013 04:36 AM, Juan Bússoli wrote: Hello, I am trying to create a dynamic module for SNMP, which needs use some functions that are in a dynamic library. To compile the module, I have modified the Makefile that you provide me in the tutorial "Writing a Dynamically Loadable Object", as

enable net-snmp debug

2013-11-05 Thread zhuyj
1. vi /etc/init.d/snmpd Modify the OPTIONS to the following: OPTIONS="-LS0-6d -DALL -Lf /tmp/snmpd.log -p /var/run/snmpd.pid" 2./etc/init.d/snmpd restart 3. tail -f /tmp/snmpd.log you can see all the debug logs. tests on net-snmp 5.6 Zhu Yanjun --

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

2013-10-16 Thread zhuyj
On 08/19/2013 12:58 PM, zhuyj wrote: Hi, I run the following commands: --snmpset -c NETMAN -v 2c 128.224.162.243 SNMP-TARGET-MIB::snmpTargetParamsRowStatus.0.25 i 5 SNMP-TARGET-MIB::snmpTargetParamsRowStatus.'..' = INTEGER: createAndWait(5) --snmpget -c NETMAN -v 2c 128.224.162

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

2013-09-09 Thread zhuyj
Hi, Magnus Please help me to merge this patch into trunk. Thanks a lot. Best Regards! Zhu Yanjun On 08/19/2013 12:58 PM, zhuyj wrote: > Hi, > > I run the following commands: > > --snmpset -c NETMAN -v 2c 128.224.162.243 > SNMP-TARGET-MIB::snmpTargetParamsRowStatus.0.25 i 5

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

2013-08-22 Thread zhuyj
Hi, Any update? Best Regards! zhuyj On 08/20/2013 10:23 AM, zhuyj wrote: > Hi, maintainers > > Would you like to comment on this patch? Thanks a lot. > > Best Regards! > zhuyj > On 08/19/2013 03:30 PM, zhuyj wrote: >> Hi, maintainers >> >> This patch is s

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

2013-08-19 Thread zhuyj
Hi, maintainers Would you like to comment on this patch? Thanks a lot. Best Regards! zhuyj On 08/19/2013 03:30 PM, zhuyj wrote: > Hi, maintainers > > This patch is similar with snmpTargetAddr patch. Would you like to > merge this patch into trunk? > > Best Regards! > zhuyj

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

2013-08-19 Thread zhuyj
Hi, maintainers This patch is similar with snmpTargetAddr patch. Would you like to merge this patch into trunk? Best Regards! zhuyj On 08/19/2013 12:58 PM, zhuyj wrote: > Hi, > > I run the following commands: > > --snmpset -c NETMAN -v 2c 128.224.162.243 &g

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

2013-08-18 Thread zhuyj
argetParamsRowStatus.0.25 -Ofn .1.3.6.1.6.3.12.1.3.1.7.0.25 = INTEGER: notReady(3) Now I attached the patch in the attachment. Please check it. Would you like to merge this patch into trunk? Best Regards! Zhuyj diff -urpN net-snmp-5.7.2/agent/mibgroup/notification/snmpNotifyTable.c net

Re: PDU Source Hostname:

2013-07-30 Thread zhuyj
On 07/31/2013 01:11 PM, Magnus Fromreide wrote: > On Wed, 2013-07-31 at 11:23 +0800, zhuyj wrote: >> Hi, maintainer >> >> Would you like to merge this patch into main line? >> Or you have any concern, please let me know. > Yes - I do have a concern. You have carefu

Re: PDU Source Hostname:

2013-07-30 Thread zhuyj
Hi, maintainer Would you like to merge this patch into main line? Or you have any concern, please let me know. Best Regards. Zhu Yanjun On 07/25/2013 11:00 AM, zhuyj wrote: > This patch can fix this problem. Would you like to accept this patch? > > Best Regards! > Zhuyj > On 07/2

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

2013-07-30 Thread zhuyj
What can I do for you about this problem? Best Regards! zhuyj On 07/22/2013 04:13 PM, zhuyj wrote: > On 07/20/2013 06:49 PM, Magnus Fromreide wrote: >> On Fri, 2013-07-19 at 16:09 +0800, zhuyj wrote: >>> Would you like to give me some advice to make this patch better? >&

Re: PDU Source Hostname:

2013-07-24 Thread zhuyj
This patch can fix this problem. Would you like to accept this patch? Best Regards! Zhuyj On 07/25/2013 10:55 AM, zhuyj wrote: 1. create a new file called /etc/snmp/snmptrapd.conf ---Content

PDU Source Hostname:

2013-07-24 Thread zhuyj
1. create a new file called /etc/snmp/snmptrapd.conf ---Content-- ### # # snmptrapd.conf # # - created by the snmpconf configuration program # #

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

2013-07-22 Thread zhuyj
On 07/20/2013 06:49 PM, Magnus Fromreide wrote: > On Fri, 2013-07-19 at 16:09 +0800, zhuyj wrote: >> Would you like to give me some advice to make this patch better? > I could do a partial commit of a corrected patch that covers the indices > in snmpTargetAddrTable right now,

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

2013-07-21 Thread zhuyj
On 07/20/2013 06:49 PM, Magnus Fromreide wrote: > On Fri, 2013-07-19 at 16:09 +0800, zhuyj wrote: >> Would you like to give me some advice to make this patch better? > I could do a partial commit of a corrected patch that covers the indices > in snmpTargetAddrTable right now,

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

2013-07-19 Thread zhuyj
Would you like to give me some advice to make this patch better? 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

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

2013-07-16 Thread zhuyj
2.1.2.1.9.1.25 = INTEGER: notReady(3) .1.3.6.1.6.3.12.1.2.1.9.1.25.1 = INTEGER: notReady(3) .1.3.6.1.6.3.12.1.2.1.9.1.25.1.1 = INTEGER: notReady(3) .1.3.6.1.6.3.12.1.2.1.9.1.25.1.1.1 = INTEGER: notReady(3) .1.3.6.1.6.3.12.1.2.1.9.1.26 = INTEGER: notReady(3) .1.3.6.1.6.3.12.1.2.1.9.1.27 = INTEGER: notReady(3

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

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: >

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

2013-07-16 Thread zhuyj
is in the attachment. Please check it. Best Regards! zhuyj On 07/16/2013 02:14 PM, Magnus Fromreide wrote: On Tue, 2013-07-16 at 10:27 +0800, zhuyj wrote: Thanks for your help! I agree with you. It is a big task to replace all the NUL-terminated string with counted-string. Now I have a patch that

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

2013-07-15 Thread zhuyj
Thanks for your help! I agree with you. It is a big task to replace all the NUL-terminated string with counted-string. Now I have a patch that can fix this. Would you like to merge this patch in master of net-snmp? zhuyj On 07/15/2013 09:29 PM, Bill Fenner wrote: On Thu, Jul 11, 2013 at 6:39

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

2013-07-11 Thread zhuyj
Hi, If I fix all the problems, do you want to merge this patch into master? zhuyj On 07/11/2013 05:29 PM, zhuyj wrote: > Hi, > something is wrong with these modifications. The root cause is that > strdup handles string as normal string. We should rewrite strdup > function. &

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

2013-07-11 Thread zhuyj
Hi, Magnus && Niels Thanks for your help! I am testing your patch. This patch can solve the most problems. But Ihave a question, is this a bug? I mean that '0' in snmpAdminString is a bug, or not? Would you like to discuss this with me? zhuyj On 07/10/2013 04:53 PM, Magn

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

2013-07-11 Thread zhuyj
buf); +ptr->params = strdup(buf); ptr->storageType = ST_READONLY; ptr->rowStatus = RS_ACTIVE; ptr->sess = ss; zhuyj On 07/11/2013 01:50 PM, zhuyj wrote: > Hi, > > in snprintf, we do not consider that 0 is in nameData. strdup(cptr) > doe

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

2013-07-10 Thread zhuyj
f(line)-1 ] = 0; for (i = 0; i < curr_struct->tDomainLen; i++) { snprintf(&line[strlen(line)], zhuyj On 07/10/2013 07:17 PM, zhuyj wrote: > Hi > > name is .0.25.1, we can not snmpwalk it. But .3.25.1, we can snmpwalk it. > > Maybe it is related with 0.

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

2013-07-10 Thread zhuyj
Hi name is .0.25.1, we can not snmpwalk it. But .3.25.1, we can snmpwalk it. Maybe it is related with 0. I will look into it. zhuyj user@ubuntu1004:~/net-snmp-5.7.2$ snmpset -v 2c -c NETMAN 127.0.0.1 .1.3.6.1.6.3.12.1.2.1.9.3.25.1 i 5 SNMP-TARGET-MIB::snmpTargetAddrRowStatus.'...'

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

2013-07-10 Thread zhuyj
Hi, But snmpget can work well. user@ubuntu1004:~/net-snmp-5.7.2$ snmpget -v 2c -c NETMAN 127.0.0.1 .1.3.6.1.6.3.12.1.2.1.9.0.25.1 -Ofn .1.3.6.1.6.3.12.1.2.1.9.0.25.1 = INTEGER: notReady(3) zhuyj On 07/10/2013 06:54 PM, zhuyj wrote: > Hi, > > After I applied this patch, the followi

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

2013-07-10 Thread zhuyj
Hi, After I applied this patch, the following is the test result. When we made the name bigger than 2, we can not snmpwalk it. I will look into it. Zhuyj user@ubuntu1004:~/net-snmp-5.7.2$ snmpwalk -v 2c -c NETMAN 127.0.0.1 .1.3.6.1.6.3.12.1.2.1.9 -Ofn .1.3.6.1.6.3.12.1.2.1.9.0.25 = INTEGER

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

2013-07-10 Thread zhuyj
On 07/10/2013 04:53 PM, Magnus Fromreide wrote: > On Wed, 2013-07-10 at 10:34 +0800, zhuyj wrote: >> Hi, >> >> Attempting to create a new entry with a zero index fails silently. > Ok, You want to index your entry with the string . > > The mess up is, just as usual, t

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

2013-07-10 Thread zhuyj
On 07/10/2013 04:53 PM, Magnus Fromreide wrote: > On Wed, 2013-07-10 at 10:34 +0800, zhuyj wrote: >> Hi, >> >> Attempting to create a new entry with a zero index fails silently. > Ok, You want to index your entry with the string . > > The mess up is, just as usual, t

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

2013-07-10 Thread zhuyj
OK. Thanks a lot. I will make tests about this. Zhuyj On 07/10/2013 04:53 PM, Magnus Fromreide wrote: > On Wed, 2013-07-10 at 10:34 +0800, zhuyj wrote: >> Hi, >> >> Attempting to create a new entry with a zero index fails silently. > Ok, You want to index your entry with t

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

2013-07-10 Thread zhuyj
On 07/10/2013 03:22 PM, zhuyj wrote: On 07/10/2013 02:04 PM, zhuyj wrote: On 07/10/2013 01:41 PM, Niels Baggesen wrote: On Wed, Jul 10, 2013 at 10:34:05AM +0800, zhuyj wrote: root@localhost:/root> snmpset -v 2c -c public 192.168.2.15 .1.3.6.1.6.3.12.1.2.1.9.0.25 i 5 SNMP-TARGET-

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

2013-07-10 Thread zhuyj
On 07/10/2013 02:04 PM, zhuyj wrote: On 07/10/2013 01:41 PM, Niels Baggesen wrote: On Wed, Jul 10, 2013 at 10:34:05AM +0800, zhuyj wrote: root@localhost:/root> snmpset -v 2c -c public 192.168.2.15 .1.3.6.1.6.3.12.1.2.1.9.0.25 i 5 SNMP-TARGET-MIB::snmpTargetAddrRowStatus.'..&#x

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

2013-07-09 Thread zhuyj
On 07/10/2013 01:41 PM, Niels Baggesen wrote: On Wed, Jul 10, 2013 at 10:34:05AM +0800, zhuyj wrote: root@localhost:/root> snmpset -v 2c -c public 192.168.2.15 .1.3.6.1.6.3.12.1.2.1.9.0.25 i 5 SNMP-TARGET-MIB::snmpTargetAddrRowStatus.'..' = INTEGER: createAndWait(5) root@lo

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

2013-07-09 Thread zhuyj
On 07/10/2013 01:35 PM, zhuyj wrote: > On 07/10/2013 10:44 AM, zhuyj wrote: >> On 07/10/2013 10:34 AM, zhuyj wrote: >>> Hi, >>> >>> Attempting to create a new entry with a zero index fails silently. >>> >>> root

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

2013-07-09 Thread zhuyj
On 07/10/2013 10:44 AM, zhuyj wrote: > On 07/10/2013 10:34 AM, zhuyj wrote: >> Hi, >> >> Attempting to create a new entry with a zero index fails silently. >> >> root@localhost:/root> snmpset -v 2c -c public 192.168.2.15 >> .1.3.6.1.

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

2013-07-09 Thread zhuyj
On 07/10/2013 10:34 AM, zhuyj wrote: > Hi, > > Attempting to create a new entry with a zero index fails silently. > > root@localhost:/root> snmpset -v 2c -c public 192.168.2.15 > .1.3.6.1.6.3.12.1.2.1.9.0.25 i 5 > SNMP-TARGET-MIB::snmpTargetAddrRowStatus.'..'

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

2013-07-09 Thread zhuyj
ion to? Best regards. zhuyj -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Sta