rfc1901.py 443 B

12345678910111213141516
  1. #
  2. # SNMPv2c message syntax
  3. #
  4. # ASN.1 source from:
  5. # http://www.ietf.org/rfc/rfc1901.txt
  6. #
  7. from pyasn1.type import univ, namedtype, namedval
  8. class Message(univ.Sequence):
  9. componentType = namedtype.NamedTypes(
  10. namedtype.NamedType('version', univ.Integer(namedValues = namedval.NamedValues(('version-2c', 1)))),
  11. namedtype.NamedType('community', univ.OctetString()),
  12. namedtype.NamedType('data', univ.Any())
  13. )