[Pysnmp-dev] Definition of Opaque class
Brought to you by:
elie
From: Fero K. <fer...@gm...> - 2010-07-21 08:23:23
|
Hi, I am new to PySNMP, I am trying to use it in my application. I am unsure, whether definition of following class in pysnmp/proto/rfc1155.py is correct: class Opaque(univ.OctetString): tagSet = univ.Integer.tagSet.tagImplicitly( tag.Tag(tag.tagClassApplication, tag.tagFormatSimple, 0x04) ) Definition of Opaque in RFC 1155 is: 3.2.3.6. Opaque This application-wide type supports the capability to pass arbitrary ASN.1 syntax. A value is encoded using the ASN.1 basic rules into a string of octets. This, in turn, is encoded as an OCTET STRING, in effect "double-wrapping" the original ASN.1 value. I believe that definition of this class should be: class Opaque(univ.OctetString): tagSet = univ.OctetString.tagSet.tagImplicitly( tag.Tag(tag.tagClassApplication, tag.tagFormatSimple, 0x04) ) Am I correct? ** Fero |