delimitry/snmp-server

Add possibility to program SNMP response value

delimitry opened this issue · 2 comments

Support config file for programming the responses.
May be, it is required to support OID wildcards 🤔
For example:

{
    "*": lambda oid: str(oid),  # to return OID string value as a response to every request
}

Or:

{
   "OID1": "string",
   "OID2": 12345,
   "OID3": Timeticks(123456000),
   "OID3": random.randint(1, 10),
}

This requires ability to write values for ASN.1 types.

  • BOOLEAN
  • INTEGER
  • BIT STRING
  • OCTET STRING
  • NULL
  • OBJECT IDENTIFIER
  • REAL
  • DOUBLE
  • IP_ADDRESS
  • TIMETICKS
  • GAUGE32
  • COUNTER32
  • COUNTER64
  • ENUMERATED
  • CHARACTER STRING

Add new ASN.1 types in PR #8.

Add config file support & new ASN.1BIT STRING type in PR #9