![]() When I press Ctrl+C I get: C:\user\snmp\test>python fonction.pyįile "C:\user\snmp\test\pysnmp\carrier\asyncore\dispatch.py", line 37, in runDispatcher Could someone help me ?Įverything I want is to display traps received by this receiver.ĮDIT: I added some prints and this is what I get when I run the program: C:\user\snmp\test>python fonction.py # Dispatcher will never finish as job#1 never reaches zeroīut when I test it with this command: $ snmptrap -v1 -c public 127.0. Udp6.domainName, udp6.Udp6SocketTransport().openServerMode(( '::1', 162)) Udp.domainName, udp.UdpSocketTransport().openServerMode(( 'localhost', 162)) ![]() TransportDispatcher.registerRecvCbFun(cbFun) TransportDispatcher = AsynsockDispatcher() Print( '%s = %s' % (oid.prettyPrint(), val.prettyPrint())) If reqPDU.isSameTypeWith(pMod.TrapPDU()): ![]() ![]() Print( 'Notification message from %s:%s: ' % ( Print( 'Unsupported SNMP version %s' % msgVer) MsgVer = int(api.decodeMessageVersion(wholeMsg)) Hello I'm trying to listen for traps with this code from pysnmp doc: from import AsynsockDispatcherįrom import udp, udp6ĭef cbFun( transportDispatcher, transportDomain, transportAddress, wholeMsg): ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |