The pysnmp.asn1 module implements a set of tools for handling ASN.1 data types used in SNMP.
Instances of these classes represent a value of corresponding ASN.1 type. The optional value parameter may be used to assign an initial value.
The decode function takes an ASN.1 value carried in a BER-encoded octet-stream data, and decodes it into a asn1.* object of matching type.
A tuple of (asn1_object, rest) is returned where asn1_object is an instance of one of asn1.py classes, and the rest is the unprocessed part of input.
Exception raised on any error in the pysnmp.asn1 module and derivatives. The reason for the exception is passed to the constructor as a string.
See documentation on the error.General base class for usage details.
The following exceptions are derived from this class:
Unknown BER tag passed to an asn1.* method occurred.
Data item does not fit the BER octet-stream.
Short BER octet-stream.
Malformed BER octet-stream.
Inappropriate argument given.
Inappropriate type for an ASN.1 object value.