[tkined] scotty and BITS syntax

Mark Ellison (ellison@world.std.com)
Tue, 09 Dec 1997 09:16:09 -0500

I'm having a problem using the BITS syntax with scotty (version 2.1.7).

I believe a varBind with a syntax of BITS is supposed to be encoded as an OCTET
STRING(4) on the wire, per sxn 8.3 of RFC 1906. What I'm seeing with scotty is
a syntax of NULL(5), and a value length of 0.

Here's an example using snmp session, snmp0, created with -version SNMPv2c:

snmp0 set { {1.3.6.1.4.1.36.2.15.2.98.14.0 BITS 07:ff:80 } } { }
set-request 29651 noError
1. t4Bits.0 BITS 07:ff:80
send 45 bytes [127.0.0.1:161]:

302b 0201 0104 0670 7562 6c69 63a3 1e02
0273 d302 0100 0201 0030 1230 1006 0c2b
0601 0401 2402 0f02 620e 0005 00

I've noticed in tnmSnmpSend.c scotty source file, at line 862

case ASN1_BIT_STRING:
packet = Tnm_BerEncNull(packet, packetlen, ASN1_NULL);
break;

So it may appear that objects with a syntax of BITS are explicitly being put on
the wire as NULL.

My question is this: Is this a known scotty issue that is on a list for a fix
in a future release? Or, am I misunderstanding how the BITS syntax is supposed
to work?

Any insight into this issue is greatly appreciated.

Best Regards,

Mark Ellison
Ellison Software Consulting, Inc.
(latest resume always at: http://www.scguild.com/usr/1321I.html)

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