Re: [tkined] Urgent Help- snmp set hex

Juergen Schoenwaelder (schoenw@ibr.cs.tu-bs.de)
Mon, 22 Feb 1999 21:59:05 +0100

>>>>> Jeff Buddington writes:

Jeff> Please help, I am trying to do an snmp set on an OID number (no
Jeff> mib loaded) with a hex value.

Jeff> % snmp0 set {{1.3.6.1.4.1.45.1.2.3.1.2.10.1.10.71 {OCTET STRING}
Jeff> \x0a\x01\x0a\x47}}

Jeff> I always get the message : illegal octet string value

The snmp(n) manual page says:

: OCTET STRING An OCTET STRING is a sequence of octect
: (= bytes). The primitive Tcl string
: representation for an OCTET STRING value
: is a string containing hexadecimal
: numbers (from 00 to ff) separated by
: colons. For example, the ASCII string
: "rose" is represented as "72:6f:73:65".

You should use 0a:01:0a:47 instead of \x0a\x01\x0a\x47. Scotty had to
deal with binary octet strings way before binary strings were added to
the Tcl core and it was therefore necessary to invent our own format.

Juergen

-- 
Juergen Schoenwaelder  schoenw@ibr.cs.tu-bs.de http://www.cs.tu-bs.de/~schoenw
Technical University Braunschweig, Dept. Operating Systems & Computer Networks
Bueltenweg 74/75, 38106 Braunschweig, Germany.        (Tel. +49 531 / 391 3289)
--
!! 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.