Commit Graph

80 Commits (master)

Author SHA1 Message Date
Ilya Etingof 0c0d054e8e
Refactor MIB state machine into asynchronous operations (#210)
Convert to async MIB instrumentation API (#210)

MIB instrumentation API changed to allow for asynchronous
managed objects access. The MIB instrumentation methods
called by the state machine now return immediately and
resume once the callback is called.

The built-in SNMPv2-SMI objects are still synchronous.

This change is a prerequisite for fully asynchronous managed objects
implementation.
2018-10-24 10:14:33 +02:00
Ilya Etingof 534a5bb810
Convert to async MIB instrumentation API (#209)
MIB instrumentation API changed to allow for asynchronous
managed objects access. Although built-in SNMPv2-SMI objects
are still synchronous, the MIB instrumentation API is async
what allows users to replace default MIB instrumentation
with their own, potentially asynchronous.

CommandResponder refactored to facilitate asynchronous
MIB instrumentation routines. The `readVars`, `readNextVars`
and `writeVars` MIB controller methods return immediately and
deliver their results via a call back.

SMI/MIB managed objects API overhauled for simplicity and
flexibility breaking backward compatibility.
2018-10-13 20:21:31 +02:00
Ilya Etingof 1537699336 Simplify SNMPv3 TRAP receiver example 2018-09-02 08:45:31 +02:00
Ilya Etingof da4539e34c
Overhaul SMI/MIB instrumentation API (#161)
Overhaul SMI/MIB instrumentation API

SMI/MIB managed objects API overhauled for simplicity and
flexibility breaking backward compatibility.

This change would allow way more control over custom MIB
managed objects and also is the prerequisite for
asynchronous MIB instrumentation.
2018-06-30 20:14:57 +02:00
Ilya Etingof 9f6230113e
encode IPv6 requirement into example scripts names (#102) 2017-11-06 14:32:00 +01:00
Ilya Etingof c383f2de5b Sphinx theme changed to Alabaster, minor documentation tweaks 2017-10-06 18:39:51 +02:00
Ilya Etingof 9d35779f1c NotificationReceiver reports SNMPv1 TRAP community string 2017-10-05 23:21:30 +02:00
Ilya Etingof 9c55a5293c fail gracefully when sha2 suite is not available 2017-08-03 23:52:48 +02:00
Ilya Etingof f63149c938 updated IP address for demo.snmplabs.com in examples 2016-07-30 23:30:35 +02:00
Ilya Etingof 5d43d5f36a fixes to end-of-docstring sentinel 2016-04-08 08:23:42 +02:00
Ilya Etingof aa91642cc3 pep8 reformatted 2016-04-05 23:06:55 +02:00
Ilya Etingof 020791a972 pep8 reformatted 2016-04-01 22:58:56 +02:00
Ilya Etingof 8e655f46e3 pep8 fixes 2016-03-30 23:29:55 +02:00
Ilya Etingof 84001b6939 example on implicit notification objects initialization improved 2016-03-08 22:13:34 +01:00
elie 912c8fe4dc changed/removed quotes 2015-12-19 21:23:46 +00:00
elie 986c0a7f58 notification origination examples debugged and adjusted to work
with demo.snmplabs.com out-of-the-box
2015-12-19 21:07:51 +00:00
elie ac82aea8e9 fix to snmptrap c/l 2015-12-19 13:34:00 +00:00
elie 1090a68028 notification originator examples re-pointed to Notification Receiver
at demo.snmplabs.com
2015-12-13 12:05:03 +00:00
elie 9cabcd7b81 proper markup and fixes 2015-09-17 19:55:00 +00:00
elie ddc989155d * synchronous oneliner apps redesigned to offer Python generator-based
API along with a more comprehensive set of accepted parameters.
* massively documented (in Sphinx, NumPy style)
2015-09-14 05:20:24 +00:00
elie 9fb3a1416d use named enumerarion for clarity 2015-07-05 16:44:45 +00:00
elie 8c3fc5080d RowStatus needs initialization 2015-07-05 15:04:43 +00:00
elie 7e2076a1e0 - original asynsock transport and AsyncsockDispatcher renamed into
asyncore and AsyncoreDispatcher respectively to provide better hint
  to fellow devs on the underlying transport being used
- backward compatibility preserved through dummy asynsock symbols
2015-07-05 14:22:26 +00:00
elie acbac40624 * default /usr/share/mibs MIB source added
* compiler.addMibCompiler() now supports ifAvailable and ifNotAdded flags
* rfc1902.ObjectIdentity() now always tries to instantiate and attach
  MIB compiler to snmpEngine (if not done yet), also .addMibCompiler()
  renamed to .addAsn1MibSource() to signify the fact that MIB compiler
  is attached behind the scene
2015-07-04 16:30:27 +00:00
elie 10f50a7910 ignore send notification ID when sending trap 2015-06-03 16:12:26 +00:00
elie ee5f447825 initial revision 2015-06-01 18:11:22 +00:00
elie 27c1c8ef97 Major overhaul related to PySMI integration and Standard SNMP Applications
API redesign:
* MibVariable becomes ObjectIdentity and moves to pysnmp.smi.rfc1902
* ObjectType and NotificationType classes resempling corresponding MIB MACROs
  implemented
* SNMP Standard Applications and examples modified to support ObjectType
  and NotificationType parameters
2015-05-31 19:35:10 +00:00
elie 38f96de6a8 make config.delTransport() returning detached transport object 2015-03-07 22:39:30 +00:00
elie c317a13711 - The asyncore-based transport subsystem extended to support POSIX
sendmsg()/recvmsg() based socket communication what could be used,
  among other things, in the context of a transparent SNMP proxy
  application. Technically, the following features were brought
  into pysnmp with this update:
  * Sending SNMP packets from a non-local IP address
  * Receiving IP packets for non-local IP addresses
  * Responding to SNMP requests from exactly the same IP address
    the query was sent to. This proves to be useful when listening
    on both primary and secondary IP interfaces.
2015-01-20 16:57:59 +00:00
elie 6cd4e8ad5e note on python version added 2014-11-16 18:50:59 +00:00
elie 963a6d644e initial support for asyncio network transport added 2014-11-04 20:21:48 +00:00
elie 483c99653c converted to the latest API that supports more data to be used 2014-06-17 05:46:57 +00:00
elie 99def7a087 converted to the latest PDU-level API 2014-06-15 15:10:47 +00:00
elie bfd8265873 echo back an OCTET STRING, not request values 2014-06-15 12:45:12 +00:00
elie fb2b229bfc fix to test OIDs 2014-06-15 12:32:45 +00:00
elie 620d1ca714 updated 2014-01-25 16:45:36 +00:00
elie 3472620af5 example script explaining incoming message's communityName re-writing added 2014-01-25 16:01:53 +00:00
elie 9bd09df18c updated to include agent-side table population 2014-01-25 10:11:28 +00:00
elie 6e4ed4bc8a minor fixes 2013-11-10 11:42:31 +00:00
elie ce56f1b40f Execution Observer facility implemented to give app an inside view
of SNMP engine inner workings. This is thought to be a generic
framework for viewing (and modifying) various internal states
of pysnmp engine. Previously introduced non-RFC APIs (like
getting peer's transport endpoint) will be gradually migrated to
this new framework.
2013-11-09 22:01:33 +00:00
elie 7a821af6de memory leak fixed 2013-10-25 07:22:54 +00:00
elie 0f190c6a38 examples adjusted to work with fixed-EngineID SNMP simulator 2013-09-30 21:10:52 +00:00
elie 0804b3cae3 fix to snmptrap c/l 2013-09-29 21:23:44 +00:00
elie 146fece069 minor fix 2013-09-29 19:05:02 +00:00
elie 12b43b4f54 move local port to a less conflicting value 2013-09-23 12:46:48 +00:00
elie 1717da979f query existing OID 2013-09-23 12:46:25 +00:00
elie 893c64eec3 minor edit 2013-09-07 15:45:06 +00:00
elie f077c66ade minor cleanups 2013-09-07 15:14:52 +00:00
elie 5d9959a455 addresses corrected 2013-09-07 14:42:32 +00:00
elie 690ea8ee6a * A single instance of transport dispatcher can now serve multiple
receivers (identified by IDs) chosen by a public data routing method.
* SnmpEngine.[un]registerTransportDispatcher() methods now accept optional
  receiver ID token to be used by transport dispatcher's data router. This
  allows for multiple SNMP engines registration with a single transport
  dispatcher.
* Relevant example added
2013-09-07 14:20:04 +00:00