Re: Problem in snmpget

2013-09-11 Thread Anish
well to check the sematics before coming to an conclusion. -- Anish From: Geet Bhatia To: Anish Cc: Net-snmp-coders Sent: Tuesday, 10 September 2013 2:38 PM Subject: Re: Problem in snmpget Hi Anish, Thanks for responding. The output of print_variable

Re: Problem in snmpget

2013-09-10 Thread Geet Bhatia
Hi, I am not using any str* functions. Its only memcpy. Please check the code below: for(vars=response->variables;vars;vars=vars->next_variable) { if(vars->type == ASN_OCTET_STR) { char *sp = (char*)malloc(1+vars->val_len); memcpy(sp,vars->val.string,vars->v

Re: Problem in snmpget

2013-09-10 Thread Geet Bhatia
;variables; vars; vars = vars->next_variable) >print_variable(vars->name, vars->name_length, vars); > > > > -- > *From:* Geet Bhatia > *To:* Net-snmp-coders@lists.sourceforge.net > *Sent:* Monday, 9 September 2013 2:22 PM > *S

Re: Problem in snmpget

2013-09-09 Thread Anish
9 September 2013 2:22 PM Subject: Problem in snmpget Hi, I have written a code to send snmp request and receive response from agent. The program is also processing the response. For this I memcpy the response in a buffer. I am using the following code to copy the response after rece

Re: Problem in snmpget

2013-09-09 Thread Niels Baggesen
Den 09-09-2013 10:52, Geet Bhatia skrev: > The value sent by agent is correct. I have checked it on wireshark. Even > the print_variable is printing correct value on console. But I am not > able to get this value copied in buffer. This does not make sense. If print_variable can print it, then the

Problem in snmpget

2013-09-09 Thread Geet Bhatia
Hi, I have written a code to send snmp request and receive response from agent. The program is also processing the response. For this I memcpy the response in a buffer. I am using the following code to copy the response after receiving it in "response" snmp_pdu variable: for(vars=response->variab

Problem in snmpget

2013-09-06 Thread Geet Bhatia
Hi, I have written a code to send snmp request and receive response from agent. The program is also processing the response. For this I memcpy the response in a buffer. I am using the following code to copy the response after receiving it in "response" snmp_pdu variable: for(vars=response->variab

Re: Memory leak problem in snmpget

2008-06-05 Thread Dave Shield
김성환 wrote: > > I am using the following function modified from the main function of > 'snmpget' program. > Bear in mind that this code is a "use once" program. It doesn't necessarily try to tidy up cleanly, since all memory will be released automatically when the program exits. > When I call the

Memory leak problem in 'snmpget'

2008-06-04 Thread 김성환
Hello, I am using the following function modified from the main function of 'snmpget' program. The SNMP library version is 5.4.1. But, it has a memory leak problem. When I call the functions infinitely, the memory size of the program grows. How can I solve the problem? Please, let me know. Thank

Memory leak problem in snmpget

2008-06-04 Thread 김성환
Hello,   I am using the following function modified from the main function of 'snmpget' program. The SNMP library version is 5.4.1. But, it has a memory leak problem. When I call the functions infinitely, the memory size of the program grows. How can I solve the problem? Please, let m