Re: Tcl wrapper over net-snmp library

This is a discussion on Re: Tcl wrapper over net-snmp library within the SNMP Coders forums, part of the Networking and Network Related category; On Tue, 2005-11-22 at 14:29 -0500, cnelson@nycap.rr.com wrote: SNC> The library uses fprintf(...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-23-2005
Dave Shield
 
Posts: n/a
Default Re: Tcl wrapper over net-snmp library

On Tue, 2005-11-22 at 14:29 -0500, cnelson@nycap.rr.com 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
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:19 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0