Re: Plea for insight

Juergen Schoenwaelder (schoenw@gaertner.de)
Mon, 19 May 1997 00:21:28 +0200

Cameron Laird <claird@Starbase.NeoSoft.COM> said:

Cameron> Juergen, how did you decide what to return as a Tcl
Cameron> diagnostic, and what to send directly to stderr?

In general, a Tcl extension should never generate messages. There are
however some exceptions. ;-)

Cameron> Here's the proximate inspiration of my question: I'm
Cameron> on a platform which doesn't support multi-casting. I've
Cameron> written a Scotty application (I'm fudging the details in
Cameron> small ways which are not material to this discussion).
Cameron> What my users see when they launch is a "straps: unable
Cameron> to join multicast group: Invalid argument". It scares
Cameron> them. I know it's only a diagnostic, but it's hard com-
Cameron> municating that to them. I can't conveniently filter
Cameron> it, because you're writing it directly to stderr, so
Cameron> it's un-catch-able.

This message comes from the straps daemon and not from the Tnm
extension itself. Configure with --disable-multicast and the message
should go away.

Cameron> I could modify the Scotty sources, or I could even write
Cameron> my own extension to turn stderr off and on. Compared to
Cameron> those alternatives, I'd rather talk to my customers.

Cameron> Juergen, I see in the 2.1.5 sources 213 instances of
Cameron> "fprintf(stderr, ..." Do you understand the challenge
Cameron> this presents me? Can you give me any advice on this
Cameron> subject?

I see the problem. The next version of straps and ntping (they will
have new names anyway) write messages to the system logger, instead of
writing to stderr. There are some more places in the MIB parser which
are a bit harder to fix. I prefer not to touch them until I have time
to replace the MIB parser with a lex/yacc based one.
Juergen

-- 
Juergen Schoenwaelder     <schoenw@gaertner.de>     (Tel: +49-531-23873-0)
Gaertner Datensysteme, Hamburger Strasse 273a, 38114 Braunschweig, Germany
--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.