[tkined] resend#2: Problem with Tnm::mib pack

From: Don Goodspeed (dgoodspe@timetra.com)
Date: Tue Nov 27 2001 - 01:23:54 MET


More info,

I cannot use the work-around since I have hex strings that
are indices into tables.

What I need is some help in telling SetOctetStringFromAny()
that the string in question is a DisplayString and therefore
should not be translated to hex. Anything NOT a DisplayString
should continue to attempt to be translated via TnmHexDec().

Any coding tips would be extremely helpful,
Don

=================================================
Just a follow-up to this previous posting...

I found a problem in TnmHexDec in the file tnm/generic/tnmUtil.c.

It makes no differentation between a hex string 0xbe and the actual
string "be". Or maybe this should be done in the file tnmObj.c
in the SetOctetStringFromAny function that calls TnmHexDec().

Since I do not have MAC-address-based indices at this time, I
work around the issue by returning from TnmHexDec() with a -1
and let SetOctetStringFromAny take care of the conversion.

Cheers,
don

==========================================
Hi all,

I'm seeing the following issue with the Tnm::mib pack command.

% Tnm::mib pack snmpCommunityName BB
1.3.6.1.6.3.18.1.1.1.2.187

If I issue the command with "public" instead of "BB", I get the
proper encoding of the string-based index.

I've reproduced this with several private MIB variables as well
that all use string-based index values. Any 2-byte string of
"hex-capable" characters (A thru F) is translated to its decimal
equivalent instead of being translated character by character
to the ASCII equivalent.

I'm using the CVS copy of Tnm 3.0.0 (I recompiled last week) on RedHat
Linux 6.2 with TCL 8.3.2.

Any thoughts,
Don

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



This archive was generated by hypermail 2b29 : Thu Jan 03 2002 - 14:56:28 MET