On Thu, 2011-03-03 at 10:14 +0530, Ravi Kumar Kodam wrote: > Dear Sir/Madam > > when iam issuing the snmpget command through code it is printing the result. > But i want to return the value to some function. > See the following code it is just printing but i want to hold the result > value. the print_variable function is just printing the output to the stdout. > but i want to catch the value and return it to some other function. Awating > for your reply.
Well, you could refrain from calling print_variable and instead call that other function? print_variable doesn't invent anything, it just prints the data that is in the variable. If you want to get hold of the output that print_variable would have produced then I think either of sprint_realloc_variable and snprint_variable is the function you are looking for. /MF -- - Doctor, doctor, it hurts when I do like this! - Well, then don't do like that! ------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders