diff options
author | elie <elie> | 2015-11-20 20:57:28 +0000 |
---|---|---|
committer | elie <elie> | 2015-11-20 20:57:28 +0000 |
commit | 87a7a35d1e9f762210c7520315158ceb5f5487d9 (patch) | |
tree | 6237737a13112a151e5c04917e8f64cb5158cc8b | |
parent | 0d55f58dcef1d8b3b9a044ec805575fb3b06d343 (diff) | |
download | pysnmp-git-87a7a35d1e9f762210c7520315158ceb5f5487d9.tar.gz |
copyright notice added to source code
137 files changed, 806 insertions, 109 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 61236f91..0add53f9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,7 +4,7 @@ Revision 4.3.2, work in progress Repository `tarball download <http://pysnmp.cvs.sourceforge.net/viewvc/pysnmp/pysnmp/?view=tar>`_ -- No changes yet +- Copyright notice added to non-trivial source code files. Revision 4.3.1, released 12-11-2015 ----------------------------------- diff --git a/docs/source/contents.rst b/docs/source/contents.rst index 5e7fc545..3bfd8048 100644 --- a/docs/source/contents.rst +++ b/docs/source/contents.rst @@ -17,10 +17,10 @@ multilingual capabilities, remote configuration and other features. PySNMP implementation closely follows intricate system details and features bringing most possible power and flexibility to its users. -Current PySNMP stable version is 4.3.0. It runs with Python 2.4 through 3.5 +Current PySNMP stable version is 4.3. It runs with Python 2.4 through 3.5 and is recommended for new applications as well as for migration from older, now obsolete, PySNMP releases. All site documentation and examples are written -for the 4.3.0 and later versions in mind. Older materials are still +for the 4.3 and later versions in mind. Older materials are still available under the obsolete section. Besides the libraries, a set of pure-Python diff --git a/pysnmp/__init__.py b/pysnmp/__init__.py index 17874aef..ae57b26a 100644 --- a/pysnmp/__init__.py +++ b/pysnmp/__init__.py @@ -1,5 +1,5 @@ # http://www.python.org/dev/peps/pep-0396/ -__version__ = '4.3.1' +__version__ = '4.3.2' # backward compatibility version = tuple([int(x) for x in __version__.split('.')]) majorVersionId = version[0] diff --git a/pysnmp/cache.py b/pysnmp/cache.py index d7380ded..46ad6020 100644 --- a/pysnmp/cache.py +++ b/pysnmp/cache.py @@ -1,5 +1,11 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # Limited-size dictionary-like class to use for caches - +# class Cache: def __init__(self, maxSize=256): self.__maxSize = maxSize diff --git a/pysnmp/carrier/asyncio/base.py b/pysnmp/carrier/asyncio/base.py index 08902ed8..e2360bf4 100644 --- a/pysnmp/carrier/asyncio/base.py +++ b/pysnmp/carrier/asyncio/base.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # Copyright (C) 2014, Zebra Technologies # Authors: Matt Hooks <me@matthooks.com> # Zachary Lorusso <zlorusso@gmail.com> diff --git a/pysnmp/carrier/asyncio/dgram/base.py b/pysnmp/carrier/asyncio/dgram/base.py index 2052b442..4e3fe033 100644 --- a/pysnmp/carrier/asyncio/dgram/base.py +++ b/pysnmp/carrier/asyncio/dgram/base.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # Copyright (C) 2014, Zebra Technologies # Authors: Matt Hooks <me@matthooks.com> # Zachary Lorusso <zlorusso@gmail.com> diff --git a/pysnmp/carrier/asyncio/dgram/udp.py b/pysnmp/carrier/asyncio/dgram/udp.py index b6d1c4c1..bf0aae4c 100644 --- a/pysnmp/carrier/asyncio/dgram/udp.py +++ b/pysnmp/carrier/asyncio/dgram/udp.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # Copyright (C) 2014, Zebra Technologies # Authors: Matt Hooks <me@matthooks.com> # Zachary Lorusso <zlorusso@gmail.com> diff --git a/pysnmp/carrier/asyncio/dgram/udp6.py b/pysnmp/carrier/asyncio/dgram/udp6.py index b80187d2..d287e648 100644 --- a/pysnmp/carrier/asyncio/dgram/udp6.py +++ b/pysnmp/carrier/asyncio/dgram/udp6.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import socket from pysnmp.carrier.base import AbstractTransportAddress from pysnmp.carrier.asyncio.dgram.base import DgramAsyncioProtocol diff --git a/pysnmp/carrier/asyncio/dispatch.py b/pysnmp/carrier/asyncio/dispatch.py index 4bc54b62..4365f792 100644 --- a/pysnmp/carrier/asyncio/dispatch.py +++ b/pysnmp/carrier/asyncio/dispatch.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # Copyright (C) 2014, Zebra Technologies # Authors: Matt Hooks <me@matthooks.com> # Zachary Lorusso <zlorusso@gmail.com> diff --git a/pysnmp/carrier/asyncore/base.py b/pysnmp/carrier/asyncore/base.py index 006ca6ea..28d532e4 100644 --- a/pysnmp/carrier/asyncore/base.py +++ b/pysnmp/carrier/asyncore/base.py @@ -1,4 +1,9 @@ -# Defines standard API to asyncore-based transport +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import socket, sys import asyncore from pysnmp.carrier import error diff --git a/pysnmp/carrier/asyncore/dgram/base.py b/pysnmp/carrier/asyncore/dgram/base.py index 537a281d..930feb3f 100644 --- a/pysnmp/carrier/asyncore/dgram/base.py +++ b/pysnmp/carrier/asyncore/dgram/base.py @@ -1,4 +1,9 @@ -# Implements asyncore-based generic DGRAM transport +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import socket, errno, sys from pysnmp.carrier.asyncore.base import AbstractSocketTransport from pysnmp.carrier import sockfix, sockmsg, error diff --git a/pysnmp/carrier/asyncore/dgram/udp.py b/pysnmp/carrier/asyncore/dgram/udp.py index d35aab61..e0391676 100644 --- a/pysnmp/carrier/asyncore/dgram/udp.py +++ b/pysnmp/carrier/asyncore/dgram/udp.py @@ -1,4 +1,9 @@ -# Implements asyncore-based UDP transport domain +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from socket import AF_INET from pysnmp.carrier.base import AbstractTransportAddress from pysnmp.carrier.asyncore.dgram.base import DgramSocketTransport diff --git a/pysnmp/carrier/asyncore/dgram/udp6.py b/pysnmp/carrier/asyncore/dgram/udp6.py index c6a69c0a..9c43e073 100644 --- a/pysnmp/carrier/asyncore/dgram/udp6.py +++ b/pysnmp/carrier/asyncore/dgram/udp6.py @@ -1,4 +1,9 @@ -# Implements asyncore-based UDP6 transport domain +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.carrier import sockfix from pysnmp.carrier.base import AbstractTransportAddress from pysnmp.carrier.asyncore.dgram.base import DgramSocketTransport diff --git a/pysnmp/carrier/asyncore/dgram/unix.py b/pysnmp/carrier/asyncore/dgram/unix.py index 8e297934..2b0de5ca 100644 --- a/pysnmp/carrier/asyncore/dgram/unix.py +++ b/pysnmp/carrier/asyncore/dgram/unix.py @@ -1,4 +1,9 @@ -# Implements asyncore-based UNIX transport domain +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import os import random try: diff --git a/pysnmp/carrier/asyncore/dispatch.py b/pysnmp/carrier/asyncore/dispatch.py index 2124bfd8..ee04330a 100644 --- a/pysnmp/carrier/asyncore/dispatch.py +++ b/pysnmp/carrier/asyncore/dispatch.py @@ -1,4 +1,9 @@ -# Implements I/O over asynchronous sockets +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from time import time from sys import exc_info from traceback import format_exception diff --git a/pysnmp/carrier/asynsock/dgram/udp.py b/pysnmp/carrier/asynsock/dgram/udp.py index d4498374..9a61eeab 100644 --- a/pysnmp/carrier/asynsock/dgram/udp.py +++ b/pysnmp/carrier/asynsock/dgram/udp.py @@ -1,2 +1,7 @@ -# Obsolete, compatibility interface +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.carrier.asyncore.dgram.udp import * diff --git a/pysnmp/carrier/asynsock/dgram/udp6.py b/pysnmp/carrier/asynsock/dgram/udp6.py index d57044b1..a1de18db 100644 --- a/pysnmp/carrier/asynsock/dgram/udp6.py +++ b/pysnmp/carrier/asynsock/dgram/udp6.py @@ -1,2 +1,7 @@ -# Obsolete, compatibility interface +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.carrier.asyncore.dgram.udp6 import * diff --git a/pysnmp/carrier/asynsock/dgram/unix.py b/pysnmp/carrier/asynsock/dgram/unix.py index 86cacdc2..5af01123 100644 --- a/pysnmp/carrier/asynsock/dgram/unix.py +++ b/pysnmp/carrier/asynsock/dgram/unix.py @@ -1,2 +1,7 @@ -# Obsolete, compatibility interface +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.carrier.asyncore.dgram.unix import * diff --git a/pysnmp/carrier/asynsock/dispatch.py b/pysnmp/carrier/asynsock/dispatch.py index a09db93e..66e46f63 100644 --- a/pysnmp/carrier/asynsock/dispatch.py +++ b/pysnmp/carrier/asynsock/dispatch.py @@ -1,4 +1,9 @@ -# Obsolete, compatibility interface +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.carrier.asyncore.dispatch import * AsynsockDispatcher = AsyncoreDispatcher diff --git a/pysnmp/carrier/base.py b/pysnmp/carrier/base.py index e7f09bc0..cdd08c2b 100644 --- a/pysnmp/carrier/base.py +++ b/pysnmp/carrier/base.py @@ -1,4 +1,9 @@ -# Abstract I/O dispatcher. Defines standard dispatcher API +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.carrier import error class TimerCallable: diff --git a/pysnmp/carrier/error.py b/pysnmp/carrier/error.py index c3c28d51..721040e9 100644 --- a/pysnmp/carrier/error.py +++ b/pysnmp/carrier/error.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp import error class CarrierError(error.PySnmpError): diff --git a/pysnmp/carrier/sockfix.py b/pysnmp/carrier/sockfix.py index 9d36e28d..a7513636 100644 --- a/pysnmp/carrier/sockfix.py +++ b/pysnmp/carrier/sockfix.py @@ -1,5 +1,8 @@ # -# Add some of the missing socket module symbols +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html # import socket diff --git a/pysnmp/carrier/sockmsg.py b/pysnmp/carrier/sockmsg.py index d84c6aa6..a125770a 100644 --- a/pysnmp/carrier/sockmsg.py +++ b/pysnmp/carrier/sockmsg.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # The following routines act like sendto()/recvfrom() calls but additionally # support local address retrieval (what can be useful when listening on # 0.0.0.0 or [::]) and source address spoofing (for transparent proxying). diff --git a/pysnmp/carrier/twisted/base.py b/pysnmp/carrier/twisted/base.py index b3024468..3bf03bbb 100644 --- a/pysnmp/carrier/twisted/base.py +++ b/pysnmp/carrier/twisted/base.py @@ -1,11 +1,16 @@ # -# Copyright (C) 2008 Truelite Srl <info@truelite.it> -# Author: Filippo Giunchedi <filippo@truelite.it> +# This file is part of pysnmp software. # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the BSD 2-Clause License as shipped with pysnmp. +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html # -# Description: twisted DatagramProtocol UDP transport +# Copyright (C) 2008 Truelite Srl <info@truelite.it> +# Author: Filippo Giunchedi <filippo@truelite.it> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the BSD 2-Clause License as shipped with pysnmp. +# +# Description: twisted DatagramProtocol UDP transport # from pysnmp.carrier.twisted.dispatch import TwistedDispatcher from pysnmp.carrier.base import AbstractTransport diff --git a/pysnmp/carrier/twisted/dgram/base.py b/pysnmp/carrier/twisted/dgram/base.py index 883311a6..3f26be71 100644 --- a/pysnmp/carrier/twisted/dgram/base.py +++ b/pysnmp/carrier/twisted/dgram/base.py @@ -1,4 +1,9 @@ -# Implements twisted-based generic DGRAM transport +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import sys from twisted.internet.protocol import DatagramProtocol from twisted.internet import reactor diff --git a/pysnmp/carrier/twisted/dgram/udp.py b/pysnmp/carrier/twisted/dgram/udp.py index ef1c2e54..006ff5ea 100644 --- a/pysnmp/carrier/twisted/dgram/udp.py +++ b/pysnmp/carrier/twisted/dgram/udp.py @@ -1,4 +1,9 @@ -# Implements twisted-based UDP transport +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import sys from twisted.internet import reactor from pysnmp.carrier.base import AbstractTransportAddress diff --git a/pysnmp/carrier/twisted/dgram/unix.py b/pysnmp/carrier/twisted/dgram/unix.py index 31324b74..6ed7bec1 100644 --- a/pysnmp/carrier/twisted/dgram/unix.py +++ b/pysnmp/carrier/twisted/dgram/unix.py @@ -1,4 +1,9 @@ -# Implements twisted-based UNIX domain socket transport +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import sys from twisted.internet import reactor from pysnmp.carrier.base import AbstractTransportAddress diff --git a/pysnmp/carrier/twisted/dispatch.py b/pysnmp/carrier/twisted/dispatch.py index 858bbd0f..1ec0f114 100644 --- a/pysnmp/carrier/twisted/dispatch.py +++ b/pysnmp/carrier/twisted/dispatch.py @@ -1,11 +1,16 @@ # -# Copyright (C) 2008 Truelite Srl <info@truelite.it> -# Author: Filippo Giunchedi <filippo@truelite.it> +# This file is part of pysnmp software. # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the BSD 2-Clause License as shipped with pysnmp. +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html # -# Description: Transport dispatcher based on twisted.internet.reactor +# Copyright (C) 2008 Truelite Srl <info@truelite.it> +# Author: Filippo Giunchedi <filippo@truelite.it> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the BSD 2-Clause License as shipped with pysnmp. +# +# Description: Transport dispatcher based on twisted.internet.reactor # import sys, time, traceback from twisted.internet import reactor, task diff --git a/pysnmp/debug.py b/pysnmp/debug.py index da5101d0..f5f99a9c 100644 --- a/pysnmp/debug.py +++ b/pysnmp/debug.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import logging from pyasn1.compat.octets import octs2ints from pysnmp import error diff --git a/pysnmp/entity/config.py b/pysnmp/entity/config.py index 8be32e4f..d1de809a 100644 --- a/pysnmp/entity/config.py +++ b/pysnmp/entity/config.py @@ -1,5 +1,9 @@ -# Initial SNMP engine configuration functions. During further operation, -# SNMP engine might be configured remotely (through SNMP). +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pyasn1.compat.octets import null from pysnmp.carrier.asyncore.dgram import udp, udp6, unix from pysnmp.proto.secmod.rfc3414.auth import hmacmd5, hmacsha, noauth diff --git a/pysnmp/entity/engine.py b/pysnmp/entity/engine.py index 90d1df71..a3036fd0 100644 --- a/pysnmp/entity/engine.py +++ b/pysnmp/entity/engine.py @@ -1,4 +1,9 @@ -# SNMP engine +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import os import sys import tempfile diff --git a/pysnmp/entity/observer.py b/pysnmp/entity/observer.py index 8bd0b301..56c5e5b0 100644 --- a/pysnmp/entity/observer.py +++ b/pysnmp/entity/observer.py @@ -1,21 +1,26 @@ # -# This is a simple facility for exposing internal SNMP Engine -# working details to pysnmp applications. These details are -# basically local scope variables at a fixed point of execution. +# This file is part of pysnmp software. # -# Two modes of operations are offered: -# 1. App can request an execution point context by execution point ID. -# 2. App can register its callback function (and context) to be invoked -# once execution reaches specified point. All local scope variables -# will be passed to the callback as in #1. -# -# It's important to realize that execution context is only guaranteed -# to exist to functions that are at the same or deeper level of invocation -# relative to execution point specified. +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html # from pysnmp import error class MetaObserver: + """This is a simple facility for exposing internal SNMP Engine + working details to pysnmp applications. These details are + basically local scope variables at a fixed point of execution. + + Two modes of operations are offered: + 1. App can request an execution point context by execution point ID. + 2. App can register its callback function (and context) to be invoked + once execution reaches specified point. All local scope variables + will be passed to the callback as in #1. + + It's important to realize that execution context is only guaranteed + to exist to functions that are at the same or deeper level of invocation + relative to execution point specified. + """ def __init__(self): self.__observers = {} self.__contexts = {} diff --git a/pysnmp/entity/rfc3413/cmdgen.py b/pysnmp/entity/rfc3413/cmdgen.py index ab68148e..9e4837fb 100644 --- a/pysnmp/entity/rfc3413/cmdgen.py +++ b/pysnmp/entity/rfc3413/cmdgen.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import sys from pysnmp.entity.rfc3413 import config from pysnmp.proto import rfc1905, errind diff --git a/pysnmp/entity/rfc3413/cmdrsp.py b/pysnmp/entity/rfc3413/cmdrsp.py index 2b30e8e8..457f90ef 100644 --- a/pysnmp/entity/rfc3413/cmdrsp.py +++ b/pysnmp/entity/rfc3413/cmdrsp.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import sys from pysnmp.proto import rfc1902, rfc1905, rfc3411, errind, error from pysnmp.proto.api import v2c # backend is always SMIv2 compliant diff --git a/pysnmp/entity/rfc3413/config.py b/pysnmp/entity/rfc3413/config.py index 98733d0b..f8944efe 100644 --- a/pysnmp/entity/rfc3413/config.py +++ b/pysnmp/entity/rfc3413/config.py @@ -1,4 +1,9 @@ -# Shortcuts to MIB instrumentation items used internally in SNMP applications +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.smi.error import SmiError, NoSuchInstanceError from pysnmp.entity import config diff --git a/pysnmp/entity/rfc3413/context.py b/pysnmp/entity/rfc3413/context.py index 565bb3c2..a6ca7c3b 100644 --- a/pysnmp/entity/rfc3413/context.py +++ b/pysnmp/entity/rfc3413/context.py @@ -1,4 +1,9 @@ -# SNMP entity context +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pyasn1.type import univ from pyasn1.compat.octets import null from pysnmp import error diff --git a/pysnmp/entity/rfc3413/mibvar.py b/pysnmp/entity/rfc3413/mibvar.py index 65b4653c..69f547ca 100644 --- a/pysnmp/entity/rfc3413/mibvar.py +++ b/pysnmp/entity/rfc3413/mibvar.py @@ -1,8 +1,12 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # THESE FUNCTIONS ARE OBSOLETE AND MUST NOT BE USED! # USE pysnmp.entity.rfc3413.oneliner.mibvar INSTEAD # -# MIB variable pretty printers/parsers from pyasn1.type import univ from pysnmp.smi.error import NoSuchObjectError diff --git a/pysnmp/entity/rfc3413/ntforg.py b/pysnmp/entity/rfc3413/ntforg.py index a57397fb..5af3fe90 100644 --- a/pysnmp/entity/rfc3413/ntforg.py +++ b/pysnmp/entity/rfc3413/ntforg.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import sys from pyasn1.compat.octets import null from pysnmp.entity.rfc3413 import config diff --git a/pysnmp/entity/rfc3413/ntfrcv.py b/pysnmp/entity/rfc3413/ntfrcv.py index e78c512a..1a27222c 100644 --- a/pysnmp/entity/rfc3413/ntfrcv.py +++ b/pysnmp/entity/rfc3413/ntfrcv.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import sys from pyasn1.compat.octets import null from pysnmp.proto import rfc3411, error diff --git a/pysnmp/entity/rfc3413/oneliner/cmdgen.py b/pysnmp/entity/rfc3413/oneliner/cmdgen.py index 827ca08b..21d7d7a8 100644 --- a/pysnmp/entity/rfc3413/oneliner/cmdgen.py +++ b/pysnmp/entity/rfc3413/oneliner/cmdgen.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # All code in this file belongs to obsolete, compatibility wrappers. # Never use interfaces below for new applications! # diff --git a/pysnmp/entity/rfc3413/oneliner/ntforg.py b/pysnmp/entity/rfc3413/oneliner/ntforg.py index 737dbf23..0b67adb9 100644 --- a/pysnmp/entity/rfc3413/oneliner/ntforg.py +++ b/pysnmp/entity/rfc3413/oneliner/ntforg.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # All code in this file belongs to obsolete, compatibility wrappers. # Never use interfaces below for new applications! # diff --git a/pysnmp/error.py b/pysnmp/error.py index 3c482f7e..a62a863d 100644 --- a/pysnmp/error.py +++ b/pysnmp/error.py @@ -1,2 +1,8 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# class PySnmpError(Exception): pass diff --git a/pysnmp/hlapi/asyncio/cmdgen.py b/pysnmp/hlapi/asyncio/cmdgen.py index 50388f30..eb021eb7 100644 --- a/pysnmp/hlapi/asyncio/cmdgen.py +++ b/pysnmp/hlapi/asyncio/cmdgen.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # Copyright (C) 2014, Zebra Technologies # Authors: Matt Hooks <me@matthooks.com> # Zachary Lorusso <zlorusso@gmail.com> diff --git a/pysnmp/hlapi/asyncio/ntforg.py b/pysnmp/hlapi/asyncio/ntforg.py index 208942d8..f0f09b53 100644 --- a/pysnmp/hlapi/asyncio/ntforg.py +++ b/pysnmp/hlapi/asyncio/ntforg.py @@ -1,30 +1,12 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # Copyright (C) 2014, Zebra Technologies # Authors: Matt Hooks <me@matthooks.com> # Zachary Lorusso <zlorusso@gmail.com> -# Modified by Ilya Etingof <ilya@snmplabs.com> -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -# THE POSSIBILITY OF SUCH DAMAGE. # from pysnmp.smi.rfc1902 import * from pysnmp.hlapi.auth import * diff --git a/pysnmp/hlapi/asyncio/transport.py b/pysnmp/hlapi/asyncio/transport.py index 655454ce..3cd8b357 100644 --- a/pysnmp/hlapi/asyncio/transport.py +++ b/pysnmp/hlapi/asyncio/transport.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import socket, sys from pysnmp.carrier.asyncio.dgram import udp, udp6 from pysnmp.hlapi.transport import AbstractTransportTarget diff --git a/pysnmp/hlapi/asyncore/cmdgen.py b/pysnmp/hlapi/asyncore/cmdgen.py index 4d7afbda..c6a68e8e 100644 --- a/pysnmp/hlapi/asyncore/cmdgen.py +++ b/pysnmp/hlapi/asyncore/cmdgen.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.entity.rfc3413 import cmdgen from pysnmp.smi.rfc1902 import * from pysnmp.hlapi.auth import * diff --git a/pysnmp/hlapi/asyncore/ntforg.py b/pysnmp/hlapi/asyncore/ntforg.py index c5adf97e..f4bdcdd5 100644 --- a/pysnmp/hlapi/asyncore/ntforg.py +++ b/pysnmp/hlapi/asyncore/ntforg.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.smi.rfc1902 import * from pysnmp.entity.rfc3413 import ntforg from pysnmp.hlapi.auth import * diff --git a/pysnmp/hlapi/asyncore/sync/cmdgen.py b/pysnmp/hlapi/asyncore/sync/cmdgen.py index 60910b86..84195020 100644 --- a/pysnmp/hlapi/asyncore/sync/cmdgen.py +++ b/pysnmp/hlapi/asyncore/sync/cmdgen.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.hlapi.asyncore import cmdgen from pysnmp.hlapi.varbinds import * from pysnmp.proto.rfc1905 import endOfMibView diff --git a/pysnmp/hlapi/asyncore/sync/compat/cmdgen.py b/pysnmp/hlapi/asyncore/sync/compat/cmdgen.py index 57923c40..7c4cfa98 100644 --- a/pysnmp/hlapi/asyncore/sync/compat/cmdgen.py +++ b/pysnmp/hlapi/asyncore/sync/compat/cmdgen.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # This is a Python 2.6- version of the same file at level up # from pysnmp.hlapi.asyncore import cmdgen diff --git a/pysnmp/hlapi/asyncore/sync/compat/ntforg.py b/pysnmp/hlapi/asyncore/sync/compat/ntforg.py index 605b37b4..c324700e 100644 --- a/pysnmp/hlapi/asyncore/sync/compat/ntforg.py +++ b/pysnmp/hlapi/asyncore/sync/compat/ntforg.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # This is a Python 2.6- version of the same file at level up # from pysnmp.hlapi.asyncore import ntforg diff --git a/pysnmp/hlapi/asyncore/sync/ntforg.py b/pysnmp/hlapi/asyncore/sync/ntforg.py index 2629c673..6d97be50 100644 --- a/pysnmp/hlapi/asyncore/sync/ntforg.py +++ b/pysnmp/hlapi/asyncore/sync/ntforg.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.hlapi.asyncore import ntforg __all__ = ['sendNotification'] diff --git a/pysnmp/hlapi/asyncore/transport.py b/pysnmp/hlapi/asyncore/transport.py index 75958009..c91c6ac7 100644 --- a/pysnmp/hlapi/asyncore/transport.py +++ b/pysnmp/hlapi/asyncore/transport.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import socket, sys from pysnmp.carrier.asyncore.dgram import udp, udp6, unix from pysnmp.hlapi.transport import AbstractTransportTarget diff --git a/pysnmp/hlapi/auth.py b/pysnmp/hlapi/auth.py index 5990c8c2..3d097a45 100644 --- a/pysnmp/hlapi/auth.py +++ b/pysnmp/hlapi/auth.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.entity import config from pysnmp import error from pyasn1.compat.octets import null diff --git a/pysnmp/hlapi/context.py b/pysnmp/hlapi/context.py index 2b6f0f5b..e6e1e8b0 100644 --- a/pysnmp/hlapi/context.py +++ b/pysnmp/hlapi/context.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pyasn1.compat.octets import null __all__ = ['ContextData'] diff --git a/pysnmp/hlapi/lcd.py b/pysnmp/hlapi/lcd.py index f6cfbf45..45519a34 100644 --- a/pysnmp/hlapi/lcd.py +++ b/pysnmp/hlapi/lcd.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.entity import config from pysnmp import nextid, error from pysnmp.hlapi.auth import * diff --git a/pysnmp/hlapi/transport.py b/pysnmp/hlapi/transport.py index e62ff526..c16d5cc8 100644 --- a/pysnmp/hlapi/transport.py +++ b/pysnmp/hlapi/transport.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pyasn1.compat.octets import null from pysnmp.carrier.base import AbstractTransport from pysnmp import error diff --git a/pysnmp/hlapi/twisted/cmdgen.py b/pysnmp/hlapi/twisted/cmdgen.py index b4a9d157..6f229802 100644 --- a/pysnmp/hlapi/twisted/cmdgen.py +++ b/pysnmp/hlapi/twisted/cmdgen.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.smi.rfc1902 import * from pysnmp.hlapi.auth import * from pysnmp.hlapi.context import * diff --git a/pysnmp/hlapi/twisted/ntforg.py b/pysnmp/hlapi/twisted/ntforg.py index 2a633179..0749f0e7 100644 --- a/pysnmp/hlapi/twisted/ntforg.py +++ b/pysnmp/hlapi/twisted/ntforg.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.smi.rfc1902 import * from pysnmp.hlapi.auth import * from pysnmp.hlapi.context import * diff --git a/pysnmp/hlapi/twisted/transport.py b/pysnmp/hlapi/twisted/transport.py index 1af1d2df..c948adfe 100644 --- a/pysnmp/hlapi/twisted/transport.py +++ b/pysnmp/hlapi/twisted/transport.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import socket, sys from pysnmp.carrier.twisted.dgram import udp from pysnmp.hlapi.transport import AbstractTransportTarget diff --git a/pysnmp/hlapi/varbinds.py b/pysnmp/hlapi/varbinds.py index 420ba942..a8715fdf 100644 --- a/pysnmp/hlapi/varbinds.py +++ b/pysnmp/hlapi/varbinds.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.smi import view from pysnmp.smi.rfc1902 import * diff --git a/pysnmp/nextid.py b/pysnmp/nextid.py index a30eb0d9..aa46eced 100644 --- a/pysnmp/nextid.py +++ b/pysnmp/nextid.py @@ -1,9 +1,15 @@ -# Return a next value in a reasonably MT-safe manner +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import random random.seed() class Integer: + """Return a next value in a reasonably MT-safe manner""" def __init__(self, maximum, increment=256): self.__maximum = maximum if increment >= maximum: diff --git a/pysnmp/proto/acmod/rfc3415.py b/pysnmp/proto/acmod/rfc3415.py index 5538800e..498c015c 100644 --- a/pysnmp/proto/acmod/rfc3415.py +++ b/pysnmp/proto/acmod/rfc3415.py @@ -1,4 +1,9 @@ -# View-based Access Control Model +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.smi.error import NoSuchInstanceError from pysnmp.proto import errind, error from pysnmp import debug @@ -7,6 +12,7 @@ __powOfTwoSeq = [128, 64, 32, 16, 8, 4, 2, 1] # 3.2 class Vacm: + """View-based Access Control Model""" accessModelID = 3 def isAccessAllowed(self, snmpEngine, diff --git a/pysnmp/proto/acmod/void.py b/pysnmp/proto/acmod/void.py index 6e0652ee..2a665d70 100644 --- a/pysnmp/proto/acmod/void.py +++ b/pysnmp/proto/acmod/void.py @@ -1,9 +1,15 @@ -# Void Access Control Model +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.proto import errind, error from pysnmp import debug # rfc3415 3.2 class Vacm: + """Void Access Control Model""" accessModelID = 0 def isAccessAllowed(self, snmpEngine, diff --git a/pysnmp/proto/api/v1.py b/pysnmp/proto/api/v1.py index 2dbb7c94..f8a237de 100644 --- a/pysnmp/proto/api/v1.py +++ b/pysnmp/proto/api/v1.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pyasn1.type import univ from pysnmp.proto import rfc1155, rfc1157, error from pysnmp import nextid diff --git a/pysnmp/proto/api/v2c.py b/pysnmp/proto/api/v2c.py index d7425bb5..4c9495c2 100644 --- a/pysnmp/proto/api/v2c.py +++ b/pysnmp/proto/api/v2c.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.proto import rfc1901, rfc1902, rfc1905 from pysnmp.proto.api import v1 from pyasn1.type import univ, constraint diff --git a/pysnmp/proto/api/verdec.py b/pysnmp/proto/api/verdec.py index 8895f274..39c70f86 100644 --- a/pysnmp/proto/api/verdec.py +++ b/pysnmp/proto/api/verdec.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pyasn1.type import univ from pyasn1.codec.ber import decoder, eoo from pyasn1.error import PyAsn1Error diff --git a/pysnmp/proto/cache.py b/pysnmp/proto/cache.py index 98a986cc..c40662ad 100644 --- a/pysnmp/proto/cache.py +++ b/pysnmp/proto/cache.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.proto import error class Cache: diff --git a/pysnmp/proto/errind.py b/pysnmp/proto/errind.py index e18ec1ed..41238125 100644 --- a/pysnmp/proto/errind.py +++ b/pysnmp/proto/errind.py @@ -1,8 +1,11 @@ -# SNMPv3 error-indication values. -# Object below could be compared with literals thus are backward-compatible -# with original pysnmperror-indication values. - +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# class ErrorIndication: + """SNMPv3 error-indication values""" def __init__(self, descr=None): self.__value = self.__descr = self.__class__.__name__[0].lower() + self.__class__.__name__[1:] if descr: diff --git a/pysnmp/proto/error.py b/pysnmp/proto/error.py index 583ddc7a..18e5e993 100644 --- a/pysnmp/proto/error.py +++ b/pysnmp/proto/error.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pyasn1.error import PyAsn1Error from pysnmp.error import PySnmpError from pysnmp import debug diff --git a/pysnmp/proto/mpmod/base.py b/pysnmp/proto/mpmod/base.py index dd714a28..0149389f 100644 --- a/pysnmp/proto/mpmod/base.py +++ b/pysnmp/proto/mpmod/base.py @@ -1,4 +1,9 @@ -# MP-specific cache management +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.proto.mpmod import cache from pysnmp.proto import error diff --git a/pysnmp/proto/mpmod/cache.py b/pysnmp/proto/mpmod/cache.py index bad7788e..d7f6acd4 100644 --- a/pysnmp/proto/mpmod/cache.py +++ b/pysnmp/proto/mpmod/cache.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.proto import error from pysnmp import nextid diff --git a/pysnmp/proto/mpmod/rfc2576.py b/pysnmp/proto/mpmod/rfc2576.py index 8e2b502a..605d01ca 100644 --- a/pysnmp/proto/mpmod/rfc2576.py +++ b/pysnmp/proto/mpmod/rfc2576.py @@ -1,4 +1,9 @@ -# SNMP v1 & v2c message processing models implementation +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import sys from pyasn1.codec.ber import decoder, eoo from pyasn1.type import univ diff --git a/pysnmp/proto/mpmod/rfc3412.py b/pysnmp/proto/mpmod/rfc3412.py index a76458d2..3624286a 100644 --- a/pysnmp/proto/mpmod/rfc3412.py +++ b/pysnmp/proto/mpmod/rfc3412.py @@ -1,4 +1,9 @@ -# SNMP v3 message processing model implementation +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import sys from pysnmp.proto.mpmod.base import AbstractMessageProcessingModel from pysnmp.proto import rfc1905, rfc3411, api, errind, error diff --git a/pysnmp/proto/proxy/rfc2576.py b/pysnmp/proto/proxy/rfc2576.py index 61110656..c7c0fc73 100644 --- a/pysnmp/proto/proxy/rfc2576.py +++ b/pysnmp/proto/proxy/rfc2576.py @@ -1,4 +1,9 @@ -# PDU v1/v2c two-way proxy +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.proto import rfc1905, rfc3411, error from pysnmp.proto.api import v1, v2c from pysnmp import debug diff --git a/pysnmp/proto/rfc1155.py b/pysnmp/proto/rfc1155.py index 4018e924..dd1025f8 100644 --- a/pysnmp/proto/rfc1155.py +++ b/pysnmp/proto/rfc1155.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pyasn1.type import univ, tag, constraint, namedtype from pyasn1.error import PyAsn1Error from pysnmp.proto import error diff --git a/pysnmp/proto/rfc1157.py b/pysnmp/proto/rfc1157.py index 2b584b75..9ff47f35 100644 --- a/pysnmp/proto/rfc1157.py +++ b/pysnmp/proto/rfc1157.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pyasn1.type import univ, tag, namedtype, namedval from pysnmp.proto import rfc1155 diff --git a/pysnmp/proto/rfc1901.py b/pysnmp/proto/rfc1901.py index 86e757d0..7b6e340f 100644 --- a/pysnmp/proto/rfc1901.py +++ b/pysnmp/proto/rfc1901.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pyasn1.type import univ, namedtype, namedval from pysnmp.proto import rfc1905 diff --git a/pysnmp/proto/rfc1902.py b/pysnmp/proto/rfc1902.py index 76052cf7..046e435b 100644 --- a/pysnmp/proto/rfc1902.py +++ b/pysnmp/proto/rfc1902.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pyasn1.type import univ, tag, constraint, namedtype, namedval from pysnmp.proto import rfc1155, error diff --git a/pysnmp/proto/rfc1905.py b/pysnmp/proto/rfc1905.py index 94ea2637..48b93ab5 100644 --- a/pysnmp/proto/rfc1905.py +++ b/pysnmp/proto/rfc1905.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pyasn1.type import univ, tag, constraint, namedtype, namedval from pysnmp.proto import rfc1902 diff --git a/pysnmp/proto/rfc3411.py b/pysnmp/proto/rfc3411.py index 74ee4d01..826396a1 100644 --- a/pysnmp/proto/rfc3411.py +++ b/pysnmp/proto/rfc3411.py @@ -1,4 +1,9 @@ -# SNMP PDU taxonomy +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.proto import rfc1157, rfc1905 readClassPDUs = { diff --git a/pysnmp/proto/rfc3412.py b/pysnmp/proto/rfc3412.py index c05bb188..26052c68 100644 --- a/pysnmp/proto/rfc3412.py +++ b/pysnmp/proto/rfc3412.py @@ -1,4 +1,9 @@ -"""SNMP v3 Message Processing and Dispatching (RFC3412)""" +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import sys from pyasn1.compat.octets import null from pysnmp.smi import builder, instrum diff --git a/pysnmp/proto/secmod/base.py b/pysnmp/proto/secmod/base.py index b3b55820..78ba0f20 100644 --- a/pysnmp/proto/secmod/base.py +++ b/pysnmp/proto/secmod/base.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.proto.secmod import cache from pysnmp.proto import error diff --git a/pysnmp/proto/secmod/cache.py b/pysnmp/proto/secmod/cache.py index 2fe245b7..37f4a779 100644 --- a/pysnmp/proto/secmod/cache.py +++ b/pysnmp/proto/secmod/cache.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp import nextid from pysnmp.proto import error diff --git a/pysnmp/proto/secmod/eso/priv/aes192.py b/pysnmp/proto/secmod/eso/priv/aes192.py index 1d846f8f..5c943fc4 100644 --- a/pysnmp/proto/secmod/eso/priv/aes192.py +++ b/pysnmp/proto/secmod/eso/priv/aes192.py @@ -1,7 +1,15 @@ -# AES 192/256 bit encryption (Internet draft) -# http://tools.ietf.org/html/draft-blumenthal-aes-usm-04 +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.proto.secmod.eso.priv import aesbase class Aes192(aesbase.AbstractAes): + """AES 192/256 bit encryption (Internet draft) + + http://tools.ietf.org/html/draft-blumenthal-aes-usm-04 + """ serviceID = (1, 3, 6, 1, 4, 1, 9, 12, 6, 1, 1) # cusmAESCfb192PrivProtocol keySize = 24 diff --git a/pysnmp/proto/secmod/eso/priv/aes256.py b/pysnmp/proto/secmod/eso/priv/aes256.py index 2b638ee6..9febf51c 100644 --- a/pysnmp/proto/secmod/eso/priv/aes256.py +++ b/pysnmp/proto/secmod/eso/priv/aes256.py @@ -1,7 +1,15 @@ -# AES 192/256 bit encryption (Internet draft) -# http://tools.ietf.org/html/draft-blumenthal-aes-usm-04 +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.proto.secmod.eso.priv import aesbase class Aes256(aesbase.AbstractAes): + """AES 192/256 bit encryption (Internet draft) + + http://tools.ietf.org/html/draft-blumenthal-aes-usm-04 + """ serviceID = (1, 3, 6, 1, 4, 1, 9, 12, 6, 1, 2) # cusmAESCfb256PrivProtocol keySize = 32 diff --git a/pysnmp/proto/secmod/eso/priv/aesbase.py b/pysnmp/proto/secmod/eso/priv/aesbase.py index 0cd92b29..43ee0fb8 100644 --- a/pysnmp/proto/secmod/eso/priv/aesbase.py +++ b/pysnmp/proto/secmod/eso/priv/aesbase.py @@ -1,5 +1,9 @@ -# AES 192/256 bit encryption (Internet draft) -# http://tools.ietf.org/html/draft-blumenthal-aes-usm-04 +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.proto.secmod.rfc3826.priv import aes from pysnmp.proto.secmod.rfc3414.auth import hmacmd5, hmacsha from pysnmp.proto.secmod.rfc3414 import localkey diff --git a/pysnmp/proto/secmod/eso/priv/des3.py b/pysnmp/proto/secmod/eso/priv/des3.py index 8a48d444..70d93f46 100644 --- a/pysnmp/proto/secmod/eso/priv/des3.py +++ b/pysnmp/proto/secmod/eso/priv/des3.py @@ -1,5 +1,9 @@ -# Reeder 3DES-EDE for USM (Internet draft) -# http://www.snmp.com/eso/draft-reeder-snmpv3-usm-3desede-00.txt +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import random from pysnmp.proto.secmod.rfc3414.priv import base from pysnmp.proto.secmod.rfc3414.auth import hmacmd5, hmacsha @@ -26,6 +30,10 @@ random.seed() # 5.1.1 class Des3(base.AbstractEncryptionService): + """Reeder 3DES-EDE for USM (Internet draft). + + http://www.snmp.com/eso/draft-reeder-snmpv3-usm-3desede-00.txt + """ serviceID = (1, 3, 6, 1, 6, 3, 10, 1, 2, 3) # usm3DESEDEPrivProtocol keySize = 32 _localInt = random.randrange(0, 0xffffffff) diff --git a/pysnmp/proto/secmod/rfc2576.py b/pysnmp/proto/secmod/rfc2576.py index f7aba191..1aa8cded 100644 --- a/pysnmp/proto/secmod/rfc2576.py +++ b/pysnmp/proto/secmod/rfc2576.py @@ -1,4 +1,9 @@ -# SNMP v1 & v2c security models implementation +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import sys from pyasn1.codec.ber import encoder from pyasn1.error import PyAsn1Error diff --git a/pysnmp/proto/secmod/rfc3414/auth/base.py b/pysnmp/proto/secmod/rfc3414/auth/base.py index 0145652f..9f51c986 100644 --- a/pysnmp/proto/secmod/rfc3414/auth/base.py +++ b/pysnmp/proto/secmod/rfc3414/auth/base.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.proto import errind, error class AbstractAuthenticationService: diff --git a/pysnmp/proto/secmod/rfc3414/auth/hmacmd5.py b/pysnmp/proto/secmod/rfc3414/auth/hmacmd5.py index 97b1c7e0..51ba45d5 100644 --- a/pysnmp/proto/secmod/rfc3414/auth/hmacmd5.py +++ b/pysnmp/proto/secmod/rfc3414/auth/hmacmd5.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# try: from hashlib import md5 except ImportError: diff --git a/pysnmp/proto/secmod/rfc3414/auth/hmacsha.py b/pysnmp/proto/secmod/rfc3414/auth/hmacsha.py index 2e1298a4..59bcce1f 100644 --- a/pysnmp/proto/secmod/rfc3414/auth/hmacsha.py +++ b/pysnmp/proto/secmod/rfc3414/auth/hmacsha.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# try: from hashlib import sha1 except ImportError: diff --git a/pysnmp/proto/secmod/rfc3414/auth/noauth.py b/pysnmp/proto/secmod/rfc3414/auth/noauth.py index b8dc700b..6a004f6e 100644 --- a/pysnmp/proto/secmod/rfc3414/auth/noauth.py +++ b/pysnmp/proto/secmod/rfc3414/auth/noauth.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.proto.secmod.rfc3414.auth import base from pysnmp.proto import errind, error diff --git a/pysnmp/proto/secmod/rfc3414/localkey.py b/pysnmp/proto/secmod/rfc3414/localkey.py index 7157c435..ed091f8e 100644 --- a/pysnmp/proto/secmod/rfc3414/localkey.py +++ b/pysnmp/proto/secmod/rfc3414/localkey.py @@ -1,4 +1,9 @@ -# Convert plaintext passphrase into a localized key +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# try: from hashlib import md5, sha1 except ImportError: diff --git a/pysnmp/proto/secmod/rfc3414/priv/base.py b/pysnmp/proto/secmod/rfc3414/priv/base.py index fd409037..f743c900 100644 --- a/pysnmp/proto/secmod/rfc3414/priv/base.py +++ b/pysnmp/proto/secmod/rfc3414/priv/base.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.proto import error class AbstractEncryptionService: diff --git a/pysnmp/proto/secmod/rfc3414/priv/des.py b/pysnmp/proto/secmod/rfc3414/priv/des.py index 19057492..25ec4dcd 100644 --- a/pysnmp/proto/secmod/rfc3414/priv/des.py +++ b/pysnmp/proto/secmod/rfc3414/priv/des.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import random from pysnmp.proto.secmod.rfc3414.priv import base from pysnmp.proto.secmod.rfc3414.auth import hmacmd5, hmacsha diff --git a/pysnmp/proto/secmod/rfc3414/priv/nopriv.py b/pysnmp/proto/secmod/rfc3414/priv/nopriv.py index b7f0a194..e076fcfa 100644 --- a/pysnmp/proto/secmod/rfc3414/priv/nopriv.py +++ b/pysnmp/proto/secmod/rfc3414/priv/nopriv.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.proto.secmod.rfc3414.priv import base from pysnmp.proto import errind, error diff --git a/pysnmp/proto/secmod/rfc3414/service.py b/pysnmp/proto/secmod/rfc3414/service.py index 8445bd29..cc3edf73 100644 --- a/pysnmp/proto/secmod/rfc3414/service.py +++ b/pysnmp/proto/secmod/rfc3414/service.py @@ -1,4 +1,9 @@ -# SNMP v3 USM model services +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import time, sys from pysnmp.proto.secmod.base import AbstractSecurityModel from pysnmp.proto.secmod.rfc3414.auth import hmacmd5, hmacsha, noauth diff --git a/pysnmp/proto/secmod/rfc3826/priv/aes.py b/pysnmp/proto/secmod/rfc3826/priv/aes.py index 2d860d89..f0159ee3 100644 --- a/pysnmp/proto/secmod/rfc3826/priv/aes.py +++ b/pysnmp/proto/secmod/rfc3826/priv/aes.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import random from pyasn1.type import univ from pysnmp.proto.secmod.rfc3414.priv import base diff --git a/pysnmp/smi/builder.py b/pysnmp/smi/builder.py index 7f9db701..ec2311c7 100644 --- a/pysnmp/smi/builder.py +++ b/pysnmp/smi/builder.py @@ -1,4 +1,9 @@ -# MIB modules loader +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import os, sys, imp, struct, marshal, time, traceback try: from errno import ENOENT diff --git a/pysnmp/smi/compiler.py b/pysnmp/smi/compiler.py index 3bd59019..bfb793bc 100644 --- a/pysnmp/smi/compiler.py +++ b/pysnmp/smi/compiler.py @@ -1,6 +1,8 @@ # -# Attach PySMI MIB compiler to PySNMP MIB builder and configure -# both accordingly. +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html # import os import sys diff --git a/pysnmp/smi/error.py b/pysnmp/smi/error.py index b14e356f..9368be16 100644 --- a/pysnmp/smi/error.py +++ b/pysnmp/smi/error.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pyasn1.error import PyAsn1Error from pysnmp.error import PySnmpError diff --git a/pysnmp/smi/exval.py b/pysnmp/smi/exval.py index 3fc1e727..8b096a6a 100644 --- a/pysnmp/smi/exval.py +++ b/pysnmp/smi/exval.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pysnmp.proto import rfc1905 noSuchObject = rfc1905.noSuchObject diff --git a/pysnmp/smi/indices.py b/pysnmp/smi/indices.py index a7fddc13..2bad1e61 100644 --- a/pysnmp/smi/indices.py +++ b/pysnmp/smi/indices.py @@ -1,7 +1,13 @@ -"""Ordered dictionaries classes used for indices""" +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from bisect import bisect class OrderedDict(dict): + """Ordered dictionary used for indices""" def __init__(self, **kwargs): self.__keys = [] self.__dirty = True @@ -86,6 +92,7 @@ class OrderedDict(dict): return self.__keysLens class OidOrderedDict(OrderedDict): + """OID-ordered dictionary used for indices""" def __init__(self, **kwargs): self.__keysCache = {} OrderedDict.__init__(self, **kwargs) diff --git a/pysnmp/smi/instrum.py b/pysnmp/smi/instrum.py index 98285beb..6285e7ba 100644 --- a/pysnmp/smi/instrum.py +++ b/pysnmp/smi/instrum.py @@ -1,4 +1,9 @@ -# MIB modules management +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import sys import traceback from pysnmp.smi import error diff --git a/pysnmp/smi/mibs/ASN1-ENUMERATION.py b/pysnmp/smi/mibs/ASN1-ENUMERATION.py index ee3f37b9..af1f2535 100644 --- a/pysnmp/smi/mibs/ASN1-ENUMERATION.py +++ b/pysnmp/smi/mibs/ASN1-ENUMERATION.py @@ -1,4 +1,9 @@ -# ASN.1 types enumeration tools +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pyasn1.type import namedval mibBuilder.exportSymbols( diff --git a/pysnmp/smi/mibs/ASN1-REFINEMENT.py b/pysnmp/smi/mibs/ASN1-REFINEMENT.py index 9db38e70..22ac2668 100644 --- a/pysnmp/smi/mibs/ASN1-REFINEMENT.py +++ b/pysnmp/smi/mibs/ASN1-REFINEMENT.py @@ -1,4 +1,9 @@ -# ASN.1 types refinement tools +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pyasn1.type import constraint mibBuilder.exportSymbols( diff --git a/pysnmp/smi/mibs/ASN1.py b/pysnmp/smi/mibs/ASN1.py index c36ccc89..1156b842 100644 --- a/pysnmp/smi/mibs/ASN1.py +++ b/pysnmp/smi/mibs/ASN1.py @@ -1,4 +1,9 @@ -# ASN.1 objects used in SNMP +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from pyasn1.type import univ from pysnmp.proto import rfc1902 diff --git a/pysnmp/smi/mibs/PYSNMP-MIB.py b/pysnmp/smi/mibs/PYSNMP-MIB.py index 73176aaf..ee8f4b0c 100644 --- a/pysnmp/smi/mibs/PYSNMP-MIB.py +++ b/pysnmp/smi/mibs/PYSNMP-MIB.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # PySNMP MIB module PYSNMP-MIB (http://pysnmp.sf.net) # ASN.1 source file:///Users/ilya/src/py/pysnmp/docs/mibs/PYSNMP-MIB.txt # Produced by pysmi-0.0.5 at Sat Sep 19 16:21:43 2015 diff --git a/pysnmp/smi/mibs/PYSNMP-SOURCE-MIB.py b/pysnmp/smi/mibs/PYSNMP-SOURCE-MIB.py index 7e513853..56b176ee 100644 --- a/pysnmp/smi/mibs/PYSNMP-SOURCE-MIB.py +++ b/pysnmp/smi/mibs/PYSNMP-SOURCE-MIB.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # PySNMP MIB module PYSNMP-SOURCE-MIB (http://pysnmp.sf.net) # ASN.1 source file:///Users/ilya/src/py/pysnmp/docs/mibs/PYSNMP-SOURCE-MIB.txt # Produced by pysmi-0.0.5 at Sat Sep 19 16:25:01 2015 diff --git a/pysnmp/smi/mibs/PYSNMP-USM-MIB.py b/pysnmp/smi/mibs/PYSNMP-USM-MIB.py index 4786ae17..44827fe3 100644 --- a/pysnmp/smi/mibs/PYSNMP-USM-MIB.py +++ b/pysnmp/smi/mibs/PYSNMP-USM-MIB.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # PySNMP MIB module PYSNMP-USM-MIB (http://pysnmp.sf.net) # ASN.1 source file:///Users/ilya/src/py/pysnmp/docs/mibs/PYSNMP-USM-MIB.txt # Produced by pysmi-0.0.5 at Sat Sep 19 16:26:08 2015 diff --git a/pysnmp/smi/mibs/RFC1158-MIB.py b/pysnmp/smi/mibs/RFC1158-MIB.py index 96a964b3..990b1d7c 100644 --- a/pysnmp/smi/mibs/RFC1158-MIB.py +++ b/pysnmp/smi/mibs/RFC1158-MIB.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # PySNMP MIB module RFC1158-MIB (http://pysnmp.sf.net) # It is a stripped version of MIB that contains only symbols that is # unique to SMIv1 and have no analogues in SMIv2 diff --git a/pysnmp/smi/mibs/RFC1213-MIB.py b/pysnmp/smi/mibs/RFC1213-MIB.py index af4356b3..23388a5d 100644 --- a/pysnmp/smi/mibs/RFC1213-MIB.py +++ b/pysnmp/smi/mibs/RFC1213-MIB.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # PySNMP MIB module RFC1158-MIB (http://pysnmp.sf.net) # It is a stripped version of MIB that contains only symbols that is # unique to SMIv1 and have no analogues in SMIv2 diff --git a/pysnmp/smi/mibs/SNMP-COMMUNITY-MIB.py b/pysnmp/smi/mibs/SNMP-COMMUNITY-MIB.py index 4867b2be..69a0ce26 100644 --- a/pysnmp/smi/mibs/SNMP-COMMUNITY-MIB.py +++ b/pysnmp/smi/mibs/SNMP-COMMUNITY-MIB.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # PySNMP MIB module SNMP-COMMUNITY-MIB (http://pysnmp.sf.net) # ASN.1 source file:///usr/share/snmp/mibs/SNMP-COMMUNITY-MIB.txt # Produced by pysmi-0.0.5 at Sat Sep 19 16:28:11 2015 diff --git a/pysnmp/smi/mibs/SNMP-FRAMEWORK-MIB.py b/pysnmp/smi/mibs/SNMP-FRAMEWORK-MIB.py index b5bcbeb8..0070c038 100644 --- a/pysnmp/smi/mibs/SNMP-FRAMEWORK-MIB.py +++ b/pysnmp/smi/mibs/SNMP-FRAMEWORK-MIB.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # PySNMP MIB module SNMP-FRAMEWORK-MIB (http://pysnmp.sf.net) # ASN.1 source file:///usr/share/snmp/mibs/SNMP-FRAMEWORK-MIB.txt # Produced by pysmi-0.0.5 at Sat Sep 19 19:37:28 2015 diff --git a/pysnmp/smi/mibs/SNMP-MPD-MIB.py b/pysnmp/smi/mibs/SNMP-MPD-MIB.py index 688f2d19..1c76f44c 100644 --- a/pysnmp/smi/mibs/SNMP-MPD-MIB.py +++ b/pysnmp/smi/mibs/SNMP-MPD-MIB.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # PySNMP MIB module SNMP-MPD-MIB (http://pysnmp.sf.net) # ASN.1 source file:///usr/share/snmp/mibs/SNMP-MPD-MIB.txt # Produced by pysmi-0.0.5 at Sat Sep 19 16:31:46 2015 diff --git a/pysnmp/smi/mibs/SNMP-NOTIFICATION-MIB.py b/pysnmp/smi/mibs/SNMP-NOTIFICATION-MIB.py index 96efcdb7..bfa2dc2a 100644 --- a/pysnmp/smi/mibs/SNMP-NOTIFICATION-MIB.py +++ b/pysnmp/smi/mibs/SNMP-NOTIFICATION-MIB.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # PySNMP MIB module SNMP-NOTIFICATION-MIB (http://pysnmp.sf.net) # ASN.1 source file:///usr/share/snmp/mibs/SNMP-NOTIFICATION-MIB.txt # Produced by pysmi-0.0.5 at Sat Sep 19 23:00:18 2015 diff --git a/pysnmp/smi/mibs/SNMP-PROXY-MIB.py b/pysnmp/smi/mibs/SNMP-PROXY-MIB.py index 676eeda8..588dabda 100644 --- a/pysnmp/smi/mibs/SNMP-PROXY-MIB.py +++ b/pysnmp/smi/mibs/SNMP-PROXY-MIB.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # PySNMP MIB module SNMP-PROXY-MIB (http://pysnmp.sf.net) # ASN.1 source file:///usr/share/snmp/mibs/SNMP-PROXY-MIB.txt # Produced by pysmi-0.0.5 at Sat Sep 19 23:02:14 2015 diff --git a/pysnmp/smi/mibs/SNMP-TARGET-MIB.py b/pysnmp/smi/mibs/SNMP-TARGET-MIB.py index 48864cb7..feb9f715 100644 --- a/pysnmp/smi/mibs/SNMP-TARGET-MIB.py +++ b/pysnmp/smi/mibs/SNMP-TARGET-MIB.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # PySNMP MIB module SNMP-TARGET-MIB (http://pysnmp.sf.net) # ASN.1 source file:///usr/share/snmp/mibs/SNMP-TARGET-MIB.txt # Produced by pysmi-0.0.5 at Sat Sep 19 23:04:28 2015 diff --git a/pysnmp/smi/mibs/SNMP-USER-BASED-SM-3DES-MIB.py b/pysnmp/smi/mibs/SNMP-USER-BASED-SM-3DES-MIB.py index 27323276..1cd0918b 100644 --- a/pysnmp/smi/mibs/SNMP-USER-BASED-SM-3DES-MIB.py +++ b/pysnmp/smi/mibs/SNMP-USER-BASED-SM-3DES-MIB.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # PySNMP MIB module SNMP-USER-BASED-SM-3DES-MIB (http://pysnmp.sf.net) # ASN.1 source http://mibs.snmplabs.com:80/asn1/SNMP-USER-BASED-SM-3DES-MIB # Produced by pysmi-0.0.5 at Sat Sep 19 23:09:40 2015 diff --git a/pysnmp/smi/mibs/SNMP-USER-BASED-SM-MIB.py b/pysnmp/smi/mibs/SNMP-USER-BASED-SM-MIB.py index 5046e1cd..7de6ec45 100644 --- a/pysnmp/smi/mibs/SNMP-USER-BASED-SM-MIB.py +++ b/pysnmp/smi/mibs/SNMP-USER-BASED-SM-MIB.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # PySNMP MIB module SNMP-USER-BASED-SM-MIB (http://pysnmp.sf.net) # ASN.1 source file:///usr/share/snmp/mibs/SNMP-USER-BASED-SM-MIB.txt # Produced by pysmi-0.0.5 at Sat Sep 19 23:10:57 2015 diff --git a/pysnmp/smi/mibs/SNMP-USM-AES-MIB.py b/pysnmp/smi/mibs/SNMP-USM-AES-MIB.py index 4b5c2d75..263f3052 100644 --- a/pysnmp/smi/mibs/SNMP-USM-AES-MIB.py +++ b/pysnmp/smi/mibs/SNMP-USM-AES-MIB.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # PySNMP MIB module SNMP-USM-AES-MIB (http://pysnmp.sf.net) # ASN.1 source file:///usr/share/snmp/mibs/SNMP-USM-AES-MIB.txt # Produced by pysmi-0.0.5 at Sat Sep 19 23:11:55 2015 diff --git a/pysnmp/smi/mibs/SNMP-VIEW-BASED-ACM-MIB.py b/pysnmp/smi/mibs/SNMP-VIEW-BASED-ACM-MIB.py index 4446804d..7a5283fe 100644 --- a/pysnmp/smi/mibs/SNMP-VIEW-BASED-ACM-MIB.py +++ b/pysnmp/smi/mibs/SNMP-VIEW-BASED-ACM-MIB.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # PySNMP MIB module SNMP-VIEW-BASED-ACM-MIB (http://pysnmp.sf.net) # ASN.1 source file:///usr/share/snmp/mibs/SNMP-VIEW-BASED-ACM-MIB.txt # Produced by pysmi-0.0.5 at Sat Sep 19 23:12:54 2015 diff --git a/pysnmp/smi/mibs/SNMPv2-CONF.py b/pysnmp/smi/mibs/SNMPv2-CONF.py index aaaf17a4..d4a200cd 100644 --- a/pysnmp/smi/mibs/SNMPv2-CONF.py +++ b/pysnmp/smi/mibs/SNMPv2-CONF.py @@ -1,5 +1,8 @@ # -# WARNING: some of the classes below are manually implemented +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html # MibNode, = mibBuilder.importSymbols('SNMPv2-SMI', 'MibNode') diff --git a/pysnmp/smi/mibs/SNMPv2-MIB.py b/pysnmp/smi/mibs/SNMPv2-MIB.py index 5e1307cb..770e3d0c 100644 --- a/pysnmp/smi/mibs/SNMPv2-MIB.py +++ b/pysnmp/smi/mibs/SNMPv2-MIB.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # PySNMP MIB module SNMPv2-MIB (http://pysnmp.sf.net) # ASN.1 source file:///usr/share/snmp/mibs/SNMPv2-MIB.txt # Produced by pysmi-0.0.5 at Sat Sep 19 23:15:24 2015 diff --git a/pysnmp/smi/mibs/SNMPv2-SMI.py b/pysnmp/smi/mibs/SNMPv2-SMI.py index 1260350b..bdc26997 100644 --- a/pysnmp/smi/mibs/SNMPv2-SMI.py +++ b/pysnmp/smi/mibs/SNMPv2-SMI.py @@ -1,5 +1,8 @@ # -# WARNING: this is NOT an autogenerated MIB module +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html # import sys import traceback diff --git a/pysnmp/smi/mibs/SNMPv2-TC.py b/pysnmp/smi/mibs/SNMPv2-TC.py index 81d0796d..63b09b57 100644 --- a/pysnmp/smi/mibs/SNMPv2-TC.py +++ b/pysnmp/smi/mibs/SNMPv2-TC.py @@ -1,5 +1,8 @@ # -# WARNING: some of the classes below are manually implemented +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html # import sys from pysnmp.smi.error import * diff --git a/pysnmp/smi/mibs/SNMPv2-TM.py b/pysnmp/smi/mibs/SNMPv2-TM.py index 81397d4d..904012f3 100644 --- a/pysnmp/smi/mibs/SNMPv2-TM.py +++ b/pysnmp/smi/mibs/SNMPv2-TM.py @@ -1,5 +1,8 @@ # -# WARNING: some of the classes below are manually implemented +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html # try: from socket import inet_ntop, inet_pton, AF_INET diff --git a/pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.py b/pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.py index 909ca5a3..e15e3314 100644 --- a/pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.py +++ b/pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.py @@ -1,4 +1,9 @@ # +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# # PySNMP MIB module TRANSPORT-ADDRESS-MIB (http://pysnmp.sf.net) # ASN.1 source file:///usr/share/snmp/mibs/TRANSPORT-ADDRESS-MIB.txt # Produced by pysmi-0.0.5 at Sat Sep 19 23:19:08 2015 diff --git a/pysnmp/smi/mibs/instances/__PYSNMP-USM-MIB.py b/pysnmp/smi/mibs/instances/__PYSNMP-USM-MIB.py index 4fb7fb5e..56f30829 100644 --- a/pysnmp/smi/mibs/instances/__PYSNMP-USM-MIB.py +++ b/pysnmp/smi/mibs/instances/__PYSNMP-USM-MIB.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# MibScalarInstance, = mibBuilder.importSymbols('SNMPv2-SMI', 'MibScalarInstance') (pysnmpUsmDiscoverable, diff --git a/pysnmp/smi/mibs/instances/__SNMP-FRAMEWORK-MIB.py b/pysnmp/smi/mibs/instances/__SNMP-FRAMEWORK-MIB.py index 3f25d431..1d3180d3 100644 --- a/pysnmp/smi/mibs/instances/__SNMP-FRAMEWORK-MIB.py +++ b/pysnmp/smi/mibs/instances/__SNMP-FRAMEWORK-MIB.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import time MibScalarInstance, = mibBuilder.importSymbols('SNMPv2-SMI', 'MibScalarInstance') diff --git a/pysnmp/smi/mibs/instances/__SNMP-MPD-MIB.py b/pysnmp/smi/mibs/instances/__SNMP-MPD-MIB.py index 66429474..fa80c43a 100644 --- a/pysnmp/smi/mibs/instances/__SNMP-MPD-MIB.py +++ b/pysnmp/smi/mibs/instances/__SNMP-MPD-MIB.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# MibScalarInstance, = mibBuilder.importSymbols('SNMPv2-SMI', 'MibScalarInstance') (snmpUnknownSecurityModels, diff --git a/pysnmp/smi/mibs/instances/__SNMP-TARGET-MIB.py b/pysnmp/smi/mibs/instances/__SNMP-TARGET-MIB.py index bcafea95..631a278c 100644 --- a/pysnmp/smi/mibs/instances/__SNMP-TARGET-MIB.py +++ b/pysnmp/smi/mibs/instances/__SNMP-TARGET-MIB.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# MibScalarInstance, = mibBuilder.importSymbols( 'SNMPv2-SMI', 'MibScalarInstance' diff --git a/pysnmp/smi/mibs/instances/__SNMP-USER-BASED-SM-MIB.py b/pysnmp/smi/mibs/instances/__SNMP-USER-BASED-SM-MIB.py index c55dda2d..1b05abec 100644 --- a/pysnmp/smi/mibs/instances/__SNMP-USER-BASED-SM-MIB.py +++ b/pysnmp/smi/mibs/instances/__SNMP-USER-BASED-SM-MIB.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# MibScalarInstance, = mibBuilder.importSymbols('SNMPv2-SMI', 'MibScalarInstance') (usmStatsUnsupportedSecLevels, diff --git a/pysnmp/smi/mibs/instances/__SNMP-VIEW-BASED-ACM-MIB.py b/pysnmp/smi/mibs/instances/__SNMP-VIEW-BASED-ACM-MIB.py index fc617bde..67fa8560 100644 --- a/pysnmp/smi/mibs/instances/__SNMP-VIEW-BASED-ACM-MIB.py +++ b/pysnmp/smi/mibs/instances/__SNMP-VIEW-BASED-ACM-MIB.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# MibScalarInstance, = mibBuilder.importSymbols('SNMPv2-SMI', 'MibScalarInstance') vacmViewSpinLock, = mibBuilder.importSymbols('SNMP-VIEW-BASED-ACM-MIB', 'vacmViewSpinLock') diff --git a/pysnmp/smi/mibs/instances/__SNMPv2-MIB.py b/pysnmp/smi/mibs/instances/__SNMPv2-MIB.py index bef4ab71..a347861e 100644 --- a/pysnmp/smi/mibs/instances/__SNMPv2-MIB.py +++ b/pysnmp/smi/mibs/instances/__SNMPv2-MIB.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# from sys import version from time import time from pysnmp import __version__ diff --git a/pysnmp/smi/rfc1902.py b/pysnmp/smi/rfc1902.py index 495d0048..4d0f6cac 100644 --- a/pysnmp/smi/rfc1902.py +++ b/pysnmp/smi/rfc1902.py @@ -1,3 +1,9 @@ +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import sys from pysnmp.proto import rfc1902, rfc1905 from pysnmp.proto.api import v2c @@ -725,7 +731,7 @@ class ObjectType: try: self.__args[1] = self.__args[0].getMibNode().getSyntax().clone(self.__args[1]) except PyAsn1Error: - raise SmiError('Value %r to type %r convertion failure: %s' % (self.__args[1], self.__args[0].getMibNode().getSyntax().__class__.__name__, sys.exc_info()[1])) + raise SmiError('MIB object %r having type %r failed to cast value %r: %s' % (self.__args[0].prettyPrint(), self.__args[0].getMibNode().getSyntax().__class__.__name__, self.__args[1], sys.exc_info()[1])) if self.__args[1].isSuperTypeOf(rfc1902.ObjectIdentifier()): self.__args[1] = ObjectIdentity(self.__args[1]).resolveWithMib(mibViewController) diff --git a/pysnmp/smi/view.py b/pysnmp/smi/view.py index e0e49d2c..0a2206a4 100644 --- a/pysnmp/smi/view.py +++ b/pysnmp/smi/view.py @@ -1,4 +1,9 @@ -# MIB modules management +# +# This file is part of pysnmp software. +# +# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net> +# License: http://pysnmp.sf.net/license.html +# import sys from pysnmp.smi.indices import OrderedDict, OidOrderedDict from pysnmp.smi import error |