Re: [tkined] Problem handling engineId on the tcl interface in scotty

Peder Chr. Norgaard (pcn@tbit.dk)
Mon, 8 Mar 1999 09:19:13 +0100 (MET)

On Mon, 8 Mar 1999, Juergen Schoenwaelder wrote:

>
> >>>>> Peder Chr Norgaard writes:
>
> Peder> SNMP Engine IDs are, according to RFC 2271, octet strings that
> Peder> are "binary" in nature, i.e., they are usually not printable.
> Peder> Scotty 3.0.0 beta (I use the version from November 4th 1998)
> Peder> seems to treat the "engineID" session option as a printable
> Peder> text - and this does not work very well when scotty discovers
> Peder> an engine when an unprintable id. Scotty discovers and uses
> Peder> the the engine id correctly, but if you use the "<session>
> Peder> configure" or "<session> cget engineID" you don't get what you
> Peder> expect.
>
> The engineID is stored in a Tcl_Obj. This means that there is no
> problem with the "binary" in nature of an engineID since Tcl 8.0 and
> above claim to handle binary data stored in Tcl_Obj's. Yes, the
> printed value (e.g. puts [$s cget -engineID] looks ugly. You can
> format it into something human readable using the Tcl binary command.

OK, I see. Yes, that works. Thank you for pointing this out.

>
> The big question is whether the approach of representing engineIDs in
> binary within Tcl is a good or bad idea. There are still a number of
> Tcl commands that will not deal correctly with binary data and using a
> binary representation makes it harder to debug things. On the other
> hand, using a native representations sometimes avoids conversions.
> Comments on which path to go are welcome.

For pure programming, the current path is fine. For interactive use -
which I personally do a lot during development - the binary is a nuisance
- for instance, in my case, the "$s config" command used interactively
fails to print all the stuff that comes after the engineID option.

What about an supplementing command, intended for interactive use: $s
configure-printable (or something shorter). Works like $s configure,
except that any binary strings are printed/parsed as strings in hex
encoding.

best regards
--peder chr.

Peder Chr. Nørgaard System Developer, M. Sc.
Telebit Communications A/S tel: +45 86 28 81 77 - 49
Fabrikvej 11 fax: +45 86 28 81 86
DK-8260 Viby J Denmark e-mail: pcn@tbit.dk

--
!! 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.