etingof / pysnmp

Python SNMP library
http://snmplabs.com/pysnmp/
BSD 2-Clause "Simplified" License
576 stars 197 forks source link

Question: send crafted TRAP PDU in SNMPv1 #129

Open jeffd-dev opened 6 years ago

jeffd-dev commented 6 years ago

Hi,

Example available in documentation is for v2.

My problem is I didn't find example to send Trap with EnterpriseOID so I do: pdu.setComponentByName('enterprise', mytrap.getEnterpriseOid())

As read in #78 : "when you are sending v1 TRAPs you still need to pass v2 TRAPs to pysnmp"

So I don't know if I should:

Or there is a way to set EnterpriseOid using sendNotification? Thank you

lextm commented 1 month ago

TRAP v1 messages can be sent via high-level API, according to the documentation,