On Tue, 2005-11-22 at 14:29 -0500, [EMAIL PROTECTED] wrote:
SNC> The library uses fprintf(stderr,...) statements to print the 
SNC> ouput.

Robert> Use shell redirects or pipes to re-route the output.

Chris> I think you misunderstand the problem.  Or maybe I do.  If he's built a
Chris> Tcl extension which calls Net-SNMP API functions and those functions
Chris> fprintf(stderr, ...), there's no where to apply the redirection.

I concur.
The answer might be to do a blitz on 'snmplib', and convert all
mentions of "fprintf(stderr,...)" into equivalent "snmp_perror"
or "snmp_log" calls.

A quick scan indicates that there are only a handful of files
where "stderr" is used - only 9 in total, many of which are
in testing code.

But a closer examination seems to indicate that the remaining
direct uses of stderr are mostly concerned with parsing
command-line arguments (snmp_parse_args.c, snmpv3.c, getopt.c,
snmp_logging.c) - or logging specifically to stderr
(snmp_logging.c, winservice.c).   In most/all of these cases,
it seems reasonable to print to stderr directly.


Sanjit - are you actually running into practical problems with
this issue, or is this mostly a concern arising from looking
at the code?

Dave


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to