PK†£=èG·EGG-INFO/top_level.txtpysnmp PK†£= `ÓL  EGG-INFO/SOURCES.txtCHANGES LICENSE MANIFEST.in README THANKS TODO setup.cfg setup.py docs/pysnmp-arch.gif docs/pysnmp-tutorial.html docs/mibs/PYSNMP-MIB.txt docs/mibs/PYSNMP-USM-MIB.txt examples/smi/backend.py examples/smi/instrum.py examples/smi/view.py examples/v1arch/agent/cmdrsp.py examples/v1arch/agent/ntforg.py examples/v1arch/manager/getgen.py examples/v1arch/manager/nextgen.py examples/v1arch/manager/ntfrcv.py examples/v1arch/manager/setgen.py examples/v3arch/agent/cmdrsp.py examples/v3arch/agent/ntforg.py examples/v3arch/manager/bulkgen.py examples/v3arch/manager/getgen.py examples/v3arch/manager/nextgen.py examples/v3arch/manager/ntfrcv.py examples/v3arch/manager/setgen.py examples/v3arch/oneliner/agent/ntforg.py examples/v3arch/oneliner/manager/bulkgen.py examples/v3arch/oneliner/manager/getgen.py examples/v3arch/oneliner/manager/nextgen.py examples/v3arch/oneliner/manager/setgen.py examples/v3arch/oneliner/manager/async/nextgen.py examples/v3arch/oneliner/manager/withmib/nextgen.py examples/v3arch/oneliner/manager/withmib/setgen.py examples/v3arch/proxy/cmdproxy.py examples/v3arch/twisted/agent/cmdrsp.py examples/v3arch/twisted/agent/ntforg.py examples/v3arch/twisted/manager/bulkgen.py examples/v3arch/twisted/manager/getgen.py examples/v3arch/twisted/manager/nextgen.py examples/v3arch/twisted/manager/ntfrcv.py examples/v3arch/twisted/manager/setgen.py pysnmp/__init__.py pysnmp/debug.py pysnmp/error.py pysnmp/nextid.py pysnmp.egg-info/PKG-INFO pysnmp.egg-info/SOURCES.txt pysnmp.egg-info/dependency_links.txt pysnmp.egg-info/requires.txt pysnmp.egg-info/top_level.txt pysnmp.egg-info/zip-safe pysnmp/carrier/__init__.py pysnmp/carrier/base.py pysnmp/carrier/error.py pysnmp/carrier/asynsock/__init__.py pysnmp/carrier/asynsock/base.py pysnmp/carrier/asynsock/dispatch.py pysnmp/carrier/asynsock/dgram/__init__.py pysnmp/carrier/asynsock/dgram/base.py pysnmp/carrier/asynsock/dgram/udp.py pysnmp/carrier/asynsock/dgram/udp6.py pysnmp/carrier/asynsock/dgram/unix.py pysnmp/carrier/twisted/__init__.py pysnmp/carrier/twisted/base.py pysnmp/carrier/twisted/dispatch.py pysnmp/carrier/twisted/dgram/__init__.py pysnmp/carrier/twisted/dgram/base.py pysnmp/carrier/twisted/dgram/udp.py pysnmp/carrier/twisted/dgram/unix.py pysnmp/entity/__init__.py pysnmp/entity/config.py pysnmp/entity/engine.py pysnmp/entity/rfc3413/__init__.py pysnmp/entity/rfc3413/cmdgen.py pysnmp/entity/rfc3413/cmdrsp.py pysnmp/entity/rfc3413/config.py pysnmp/entity/rfc3413/context.py pysnmp/entity/rfc3413/mibvar.py pysnmp/entity/rfc3413/ntforg.py pysnmp/entity/rfc3413/ntfrcv.py pysnmp/entity/rfc3413/oneliner/__init__.py pysnmp/entity/rfc3413/oneliner/cmdgen.py pysnmp/entity/rfc3413/oneliner/ntforg.py pysnmp/entity/rfc3413/twisted/__init__.py pysnmp/entity/rfc3413/twisted/cmdgen.py pysnmp/entity/rfc3413/twisted/ntforg.py pysnmp/proto/__init__.py pysnmp/proto/error.py pysnmp/proto/rfc1155.py pysnmp/proto/rfc1157.py pysnmp/proto/rfc1902.py pysnmp/proto/rfc1905.py pysnmp/proto/rfc3411.py pysnmp/proto/rfc3412.py pysnmp/proto/acmod/__init__.py pysnmp/proto/acmod/rfc3415.py pysnmp/proto/acmod/void.py pysnmp/proto/api/__init__.py pysnmp/proto/api/v1.py pysnmp/proto/api/v2c.py pysnmp/proto/api/verdec.py pysnmp/proto/mpmod/__init__.py pysnmp/proto/mpmod/base.py pysnmp/proto/mpmod/rfc2576.py pysnmp/proto/mpmod/rfc3412.py pysnmp/proto/proxy/__init__.py pysnmp/proto/proxy/rfc2576.py pysnmp/proto/secmod/__init__.py pysnmp/proto/secmod/base.py pysnmp/proto/secmod/rfc2576.py pysnmp/proto/secmod/rfc3414/__init__.py pysnmp/proto/secmod/rfc3414/localkey.py pysnmp/proto/secmod/rfc3414/service.py pysnmp/proto/secmod/rfc3414/auth/__init__.py pysnmp/proto/secmod/rfc3414/auth/base.py pysnmp/proto/secmod/rfc3414/auth/hmacmd5.py pysnmp/proto/secmod/rfc3414/auth/hmacsha.py pysnmp/proto/secmod/rfc3414/auth/noauth.py pysnmp/proto/secmod/rfc3414/priv/__init__.py pysnmp/proto/secmod/rfc3414/priv/base.py pysnmp/proto/secmod/rfc3414/priv/des.py pysnmp/proto/secmod/rfc3414/priv/nopriv.py pysnmp/proto/secmod/rfc3826/__init__.py pysnmp/proto/secmod/rfc3826/priv/__init__.py pysnmp/proto/secmod/rfc3826/priv/aes.py pysnmp/smi/__init__.py pysnmp/smi/builder.py pysnmp/smi/error.py pysnmp/smi/exval.py pysnmp/smi/indices.py pysnmp/smi/instrum.py pysnmp/smi/view.py pysnmp/smi/mibs/ASN1.py pysnmp/smi/mibs/PYSNMP-MIB.py pysnmp/smi/mibs/PYSNMP-USM-MIB.py pysnmp/smi/mibs/RFC1155-SMI.py pysnmp/smi/mibs/RFC1213-MIB.py pysnmp/smi/mibs/SNMP-COMMUNITY-MIB.py pysnmp/smi/mibs/SNMP-FRAMEWORK-MIB.py pysnmp/smi/mibs/SNMP-MPD-MIB.py pysnmp/smi/mibs/SNMP-NOTIFICATION-MIB.py pysnmp/smi/mibs/SNMP-TARGET-MIB.py pysnmp/smi/mibs/SNMP-USER-BASED-SM-MIB.py pysnmp/smi/mibs/SNMP-USM-AES-MIB.py pysnmp/smi/mibs/SNMP-VIEW-BASED-ACM-MIB.py pysnmp/smi/mibs/SNMPv2-CONF.py pysnmp/smi/mibs/SNMPv2-MIB.py pysnmp/smi/mibs/SNMPv2-SMI.py pysnmp/smi/mibs/SNMPv2-TC.py pysnmp/smi/mibs/SNMPv2-TM.py pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.py pysnmp/smi/mibs/__init__.py pysnmp/smi/mibs/instances/__PYSNMP-USM-MIB.py pysnmp/smi/mibs/instances/__SNMP-FRAMEWORK-MIB.py pysnmp/smi/mibs/instances/__SNMP-MPD-MIB.py pysnmp/smi/mibs/instances/__SNMP-TARGET-MIB.py pysnmp/smi/mibs/instances/__SNMP-USER-BASED-SM-MIB.py pysnmp/smi/mibs/instances/__SNMP-VIEW-BASED-ACM-MIB.py pysnmp/smi/mibs/instances/__SNMPv2-MIB.py pysnmp/smi/mibs/instances/__init__.py tools/.#libsmi2pysnmp.1.35 tools/build-pysnmp-mib tools/libsmi2pysnmp tools/libsmi2pysnmp.~1.35.~PK†£=8‘–|ääEGG-INFO/PKG-INFOMetadata-Version: 1.0 Name: pysnmp Version: 4.1.15a Summary: SNMP framework Home-page: http://sourceforge.net/projects/pysnmp/ Author: Ilya Etingof Author-email: ilya@glas.net License: BSD Description: UNKNOWN Platform: UNKNOWN PK†£=y–ð EGG-INFO/requires.txtpyasn1 pycryptoPK±›=“×2EGG-INFO/zip-safe PK†£=“×2EGG-INFO/dependency_links.txt PK)f}=VzÄ6))!EGG-INFO/scripts/build-pysnmp-mib#!/bin/sh # # Convert MIB text into PySNMP-compilant MIB/managed objects module. # See http://pysnmp.sf.net for more information. # basedir=$(dirname "$0") libsmi2pysnmp=$basedir/libsmi2pysnmp # part of pysnmp distro smidump=smidump # part of libsmi distro while getopts o: o do case "$o" in o) outFile=$OPTARG ;; [?]) echo >&2 "\ Convert MIB text file into PySNMP-compliant module, see http://pysnmp.sf.net. Usage: $0 [-o pysnmp-mib-file ] [ mib-text-file ]\ " exit 1;; esac done [ -n "$outFile" ] && { exec 5>"$outFile" 1>&5 || { echo >&2 "Redirection failed"; exit 1; } } shift $((OPTIND-1)) [ $# -gt 1 ] && { echo >&2 "Extra arguments given"; exit 1; } [ -z $1 ] && { mibFile="-"; } || { mibFile=$1; export SMIPATH="$SMIPATH:$(echo $mibFile | sed -e 's,[^/]*$,.,')"; } egrep -q 'FROM *RFC' $mibFile 2> /dev/null && ! egrep -q 'FROM *SNMPv2-' $mibFile 2> /dev/null && { oldMib='yes'; } || { [ $? -eq 1 ] && { oldMib='no'; } || { echo >&2 "cant open $mibFile"; exit 1; } } [ $oldMib = 'yes' ] && { # pysnmp SMI is SMIv2 [ -x "$(which mktemp)" ] && tmpFile=$(mktemp -t buildmibs.XXXXXXX) || tmpFile=/tmp/buildmibs.$$ $smidump -k -f smiv2 $mibFile > $tmpFile 2> /dev/null || { [ -f $tmpFile ] && rm -f $tmpFile; echo >&2 "$smidump -k -f smiv2 $mibFile fails"; echo >&2 "make sure you are using libsmi version > 0.4.5 (or svn)"; exit ; } $smidump -k -f python $tmpFile 2> /dev/null | $libsmi2pysnmp || { [ -f $tmpFile ] && rm -f $tmpFile; [ -n "$outFile" ] && rm -f $outFile; echo >&2 "$smidump -k -f python $mibFile | $libsmi2pysnmp fails"; echo >&2 "make sure you are using libsmi version > 0.4.5 (or svn)"; exit } rm -f $tmpFile } || { $smidump -k -f python $mibFile 2> /dev/null | $libsmi2pysnmp || { [ -n "$outFile" ] && rm -f $outFile; echo >&2 "$smidump -k -f python $mibFile | $libsmi2pysnmp fails"; echo >&2 "make sure you are using libsmi version > 0.4.5 (or svn)"; exit } } exit PK†£=|¾Š¥ccEGG-INFO/scripts/libsmi2pysnmp#!/usr/local/bin/python2.3 # Walk libsmi-generated tree of MIB symbols and build pysnmp.smi # compliant module from exceptions import StandardError from string import split, join, replace, find, atol, atoi from types import StringType, DictType import sys, time version = '0.0.10-beta' genTextLoader = 1 class Error(StandardError): pass if len(sys.argv) > 1: if sys.argv[1] == '--no-text': genTextLoader = 0 else: sys.stderr.write('SNMP MIB to pysnmp objects converter, version %s.\n\ Usage:\n\ %s [--no-text]\n\ Takes:\n\ smidump -f python \n\ program output on stdin, generates python code on stdout.\n\ The smidump tool is available at http://www.ibr.cs.tu-bs.de/projects/libsmi/\n\ The --no-text option disables code generation for MIB text comments.\n' % (version, sys.argv[0])) sys.exit(-1) inputText = '' while 1: c = sys.stdin.read() if not c: break inputText = inputText + c if not inputText: sys.stderr.write('Empty input\n') sys.exit(-1) codeObj = compile(inputText, '', 'exec') g = {} try: eval(codeObj, g) except StandardError, why: raise Error( 'MIB module load error: %s' % why ) mib = g['MIB'] dstModName = mib['moduleName'] out = sys.stdout __symsTable = { 'MODULE-IDENTITY': ('ModuleIdentity',), 'OBJECT-TYPE': ('MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn'), 'NOTIFICATION-TYPE': ('NotificationType',), 'TEXTUAL-CONVENTION': ('TextualConvention',), 'MODULE-COMPLIANCE': ('ModuleCompliance',), 'OBJECT-GROUP': ('ObjectGroup',), 'NOTIFICATION-GROUP': ('NotificationGroup',), 'AGENT-CAPABILITIES': ('AgentCapabilities',), 'OBJECT-IDENTITY': ('ObjectIdentity',), 'TRAP-TYPE': ('NotificationType',), # smidump always uses NotificationType 'NOTIFICATION-TYPE': ('NotificationType',) } def symTrans(symbol): if __symsTable.has_key(symbol): return __symsTable[symbol] return symbol, def transOpers(symbol): return replace(symbol, '-', '_') def addLabelForSymbol(symbol): if find(symbol, '-') != -1: return '.setLabel(\"%s\")' % symbol return '' __oidToTuple = lambda x: str(tuple(map(lambda y: int(y), split(x, '.')))) def __reprIntVal(value): try: intVal = atoi(value) except ValueError: try: intVal = atol(value) except ValueError: return repr(value) if -2147483647 < intVal < 2147483647: return repr(intVal) else: return repr(long(intVal)) def __genDefVal(baseType, symDef): if baseType == 'OctetString': if symDef['default'][:2] == '0x': defVal = '' for i in range(2, len(symDef['default']), 2): defVal = defVal + chr( atoi(symDef['default'][i:i+2], 16) ) else: defVal = symDef['default'] return '%s' % repr(defVal) elif baseType == 'Integer': return '%s' % __reprIntVal(symDef['default']) elif baseType == 'Integer32': return '%s' % __reprIntVal(symDef['default']) elif baseType == 'ObjectIdentifier': return '%s' % __oidToTuple(symDef['default']) elif baseType == 'IpAddress': defVal = '' for i in range(2, len(symDef['default']), 2): if defVal: defVal = defVal + '.' defVal = defVal + str( atoi(symDef['default'][i:i+2], 16) ) return '\"%s\"' % defVal elif baseType == 'Bits': defVal = '(' for bit in split(replace( replace(replace(symDef['default'], ',', ''), '(', ''), ')', '' )): defVal = defVal + '\"%s\",' % bit defVal = defVal + ')' return defVal elif baseType == 'Enumeration': if symDef['syntax']['type'].has_key(symDef['default']): return '%s' % \ symDef['syntax']['type'][symDef['default']]['number'] else: return '\"%s\"' % symDef['default'] else: sys.stderr.write('WARNING: guessing DEFVAL type \'%s\' for %s\n' % (symDef['default'], baseType)) if symDef['default'][:2] == '0x': defVal = '' for i in range(2, len(symDef['default']), 2): defVal = defVal + chr( atoi(symDef['default'][i:i+2], 16) ) else: defVal = symDef['default'] try: atol(defVal) except ValueError: pass else: return defVal return '%s' % repr(defVal) # Ugly kludge against smidump bug which does not distinguish # size/range constraints __kludgyStringTypes = { 'OctetString': 1 } __buggySmiTypes = { 'NetworkAddress': 'IpAddress' # this is up to smidump, but it does not care } def __genTypeDef((symName, symDef), classMode=0): r = '' if classMode: typeDef = symDef identFiller = ' '; identValue = 0 else: typeDef = symDef['syntax']['type'] if typeDef.has_key('name'): baseType = typeDef['name'] if typeDef.has_key('basetype'): baseType = typeDef['basetype'] if typeDef.has_key('parent module'): parentType = typeDef['parent module']['type'] else: parentType = baseType # Ugly hack to overcome smidump bug in smiv1->smiv2 convertion if __buggySmiTypes.has_key(baseType): baseType = __buggySmiTypes[baseType] if __buggySmiTypes.has_key(parentType): parentType = __buggySmiTypes[parentType] if classMode: r = r + 'class %s(' % symName if typeDef.has_key('format'): r = r + '%s, ' % symTrans('TEXTUAL-CONVENTION')[0] identValue = identValue + 1 if baseType in ('Enumeration', 'Bits'): if baseType == 'Enumeration': parentType = 'Integer' if classMode: r = r + '%s):\n' % parentType r = r + identFiller*identValue else: r = r + ', %s()' % parentType if baseType == 'Enumeration': if classMode: r = r + 'subtypeSpec = %s.subtypeSpec+' % parentType else: r = r + '.subtype(subtypeSpec=' # Python has certain limit on the number of func params if len(typeDef) > 127: r = r + 'constraint.ConstraintsUnion(' r = r + 'constraint.SingleValueConstraint(' cnt = 1 for e, v in typeDef.items(): if type(v) == DictType and v.has_key('nodetype') \ and v['nodetype'] == 'namednumber': r = r + '%s,' % v['number'] if cnt % 127 == 0: r = r + '), constraint.SingleValueConstraint(' cnt = cnt + 1 if len(typeDef) > 127: r = r + ')' if classMode: r = r + ')\n' r = r + identFiller*identValue else: r = r + '))' if classMode: r = r + 'namedValues = namedval.NamedValues(' else: r = r + '.subtype(namedValues=namedval.NamedValues(' typedesc = typeDef.items() typedesc.sort(lambda x,y: cmp(x[1],y[1])) cnt = 1 for e, v in typedesc: if type(v) == DictType and v.has_key('nodetype') \ and v['nodetype'] == 'namednumber': r = r + '(\"%s\", %s), ' % (e, v['number']) if cnt % 127 == 0: r = r + ') + namedval.NamedValues(' cnt = cnt + 1 if classMode: r = r + ')\n' r = r + identFiller*identValue else: r = r + '))' else: if classMode: r = r + '%s):\n' % parentType r = r + identFiller*identValue else: r = r + ', %s()' % parentType if classMode: if typeDef.has_key('format'): r = r + 'displayHint = \"%s\"\n' % typeDef['format'] r = r + identFiller*identValue if __kludgyStringTypes.has_key(baseType): __subtypeSpec = 'constraint.ValueSizeConstraint' else: __subtypeSpec = 'constraint.ValueRangeConstraint' single_range = 0 if typeDef.has_key('range'): single_range = 1 # ATTENTION: libsmi-0.4.5 does not support "ranges". Use libsmi # SVN version or an older patch from Randy Couey: # http://www.glas.net/~ilya/download/tools/pysnmp/libsmi-0.4.5-perl_python_range_union.patch if typeDef.has_key('ranges'): # if more than one size/range is given, then we need to # create a ContraintsUnion to hold all of them. if len(typeDef['ranges']) > 1: single_range = 0 if classMode: r = r + 'subtypeSpec = %s.subtypeSpec+constraint.ConstraintsUnion(' % parentType else: r = r + '.subtype(subtypeSpec=constraint.ConstraintsUnion(' for range in typeDef['ranges']: r = r + '%s(%s,%s),' % (__subtypeSpec, __reprIntVal(range['min']), __reprIntVal(range['max'])) if classMode: r = r + ')\n' r = r + identFiller*identValue else: r = r + '))' # only one size/range contraint was given if single_range: if classMode: r = r + 'subtypeSpec = %s.subtypeSpec+%s(%s,%s)\n' % (parentType, __subtypeSpec, __reprIntVal(typeDef['range']['min']), __reprIntVal(typeDef['range']['max'])) r = r + identFiller*identValue if __kludgyStringTypes.has_key(baseType) and \ typeDef['range']['min'] == typeDef['range']['max']: r = r + 'fixedLength = %s\n' % typeDef['range']['min'] r = r + identFiller*identValue else: r = r + '.subtype(subtypeSpec=%s(%s, %s))' % (__subtypeSpec, __reprIntVal(typeDef['range']['min']), __reprIntVal(typeDef['range']['max'])) if __kludgyStringTypes.has_key(baseType) and \ typeDef['range']['min'] == typeDef['range']['max']: r = r + '.setFixedLength(%s)' % typeDef['range']['min'] if symDef.has_key('default') and not symDef.has_key('basetype'): defVal = __genDefVal(baseType, symDef) if classMode: if defVal is not None: r = r + 'defaultValue = %s\n' % defVal else: if defVal is not None: r = r + '.clone(%s)' % defVal if classMode: r = r + 'pass\n\n' return r out.write( "# PySNMP SMI module. Autogenerated from smidump -f python %s\n" % dstModName ) out.write( "# by libsmi2pysnmp-%s at %s,\n" % (version, time.asctime(time.localtime())) ) out.write("# Python version %s\n\n" % str(sys.version_info)) out.write('# Imported just in case new ASN.1 types would be created\n') out.write('from pyasn1.type import constraint, namedval\n\n') out.write('# Imports\n\n') imports = {} for imp in ( { 'module': 'ASN1', 'name': 'Integer' }, { 'module': 'ASN1', 'name': 'OctetString' }, { 'module': 'ASN1', 'name': 'ObjectIdentifier' }, { 'module': 'SNMPv2-SMI', 'name': 'Bits' }, # XXX { 'module': 'SNMPv2-SMI', 'name': 'Integer32' }, # libsmi bug { 'module': 'SNMPv2-SMI', 'name': 'TimeTicks' }, # bug in some IETF MIB { 'module': 'SNMPv2-SMI', 'name': 'MibIdentifier' }, # OBJECT IDENTIFIER ) + mib.get('imports', ()): if not imports.has_key(imp['module']): imports[imp['module']] = [] if not imp['module']: sys.stderr.write('WARNING: empty MIB module name seen in smidump output at %s\n' % dstModName) imports[imp['module']].append(imp['name']) map(lambda x:x.sort(), imports.values()) modNames = imports.keys(); modNames.sort() for modName in modNames: out.write('( ') for symName in imports[modName]: for s in symTrans(symName): out.write('%s, ' % transOpers(s)) out.write(') = mibBuilder.importSymbols(\"%s\"' % modName) for symName in imports[modName]: for s in symTrans(symName): out.write(', \"%s\"' % s) out.write(')\n') if mib.has_key('typedefs'): typedefs = mib['typedefs'].items(); typedefs.sort() else: typedefs = () if typedefs: out.write('\n# Types\n\n') for symName, symDef in typedefs: out.write('%s' % __genTypeDef((symName, symDef), 1)) if mib.has_key(dstModName) and mib[dstModName].has_key('identity node'): moduleIdentityNode = mib[dstModName]['identity node'] else: moduleIdentityNode = '' if mib.has_key('nodes'): nodes = mib['nodes'].items() __oid2num = lambda o: map(lambda x: atol(x), split(o, '.')) nodes.sort(lambda x,y,f=__oid2num: cmp( f(x[1].get('oid')), f(y[1].get('oid')) )) else: nodes = () if nodes: out.write('\n# Objects\n\n') row_create = {} for symName, symDef in nodes: if symDef['nodetype'] == 'node': out.write('%s = ' % transOpers(symName)) if symName == moduleIdentityNode: out.write('ModuleIdentity(%s)' % __oidToTuple(symDef['oid'])) if mib.has_key(dstModName): m = mib[dstModName] if m.has_key("revisions"): out.write('.setRevisions((') for r in m["revisions"]: out.write('\"%s\",' % r["date"]) out.write('))') out.write('%s' % addLabelForSymbol(symName)) if genTextLoader: if m.has_key('organization'): out.write('\nif mibBuilder.loadTexts: %s.setOrganization("%s")' % (transOpers(symName), replace(m['organization'], '\n', '\\n'))) if m.has_key('contact'): out.write('\nif mibBuilder.loadTexts: %s.setContactInfo("%s")' % (transOpers(symName), replace(m['contact'], '\n', '\\n'))) if m.has_key('description'): out.write('\nif mibBuilder.loadTexts: %s.setDescription("%s")' % (transOpers(symName), replace(m['description'], '\n', '\\n'))) out.write('\n') continue elif symDef.has_key("description"): out.write('ObjectIdentity(%s)' % __oidToTuple(symDef['oid'])) else: out.write('MibIdentifier(%s)' % __oidToTuple(symDef['oid'])) elif symDef['nodetype'] == 'scalar': out.write('%s = ' % transOpers(symName)) out.write('MibScalar(%s' % __oidToTuple(symDef['oid'])) out.write('%s)' % __genTypeDef((symName, symDef))) out.write('.setMaxAccess(\"%s\")' % symDef['access']) if symDef.has_key('units'): out.write('.setUnits(\"%s\")' % symDef['units']) elif symDef['nodetype'] == 'table': out.write('%s = ' % transOpers(symName)) out.write('MibTable(%s)' % __oidToTuple(symDef['oid'])) elif symDef['nodetype'] == 'row': out.write('%s = ' % transOpers(symName)) # determine if row creation is permitted, and store # status for later inspection by column nodes. if symDef.has_key('create'): row_create[symDef['oid']] = symDef['create'] else: row_create[symDef['oid']] = 'false' out.write('MibTableRow(%s)' % __oidToTuple(symDef['oid'])) if symDef['linkage'] and type(symDef['linkage'][0]) == StringType: out.write('.setIndexNames(') cnt = 0 for idx in symDef['linkage']: if cnt: out.write(', ') else: cnt = cnt + 1 # smidump does not distinguish outer/inner indices for _modName, _symNames in imports.items(): for _symName in _symNames: if _symName == idx: modName = _modName break else: continue break else: modName = dstModName if idx == symDef['linkage'][-1] and \ symDef.has_key("implied") and \ symDef["implied"] == "true": impliedFlag = 1 else: impliedFlag = 0 out.write('(%d, \"%s\", \"%s\")' % ( impliedFlag, modName, idx )) out.write(')') elif symDef['nodetype'] == 'column': out.write('%s = ' % transOpers(symName)) out.write('MibTableColumn(%s' % __oidToTuple(symDef['oid'])) out.write('%s)' % __genTypeDef((symName, symDef))) # smidump does not tag columns as read-create. # we must check the parent row object to determine if column is # createable parent = join(split(symDef['oid'], '.')[:-1], '.') if row_create[parent] == 'true' and symDef['access']=='readwrite': out.write('.setMaxAccess(\"%s\")' % 'readcreate') else: out.write('.setMaxAccess(\"%s\")' % symDef['access']) elif symDef['nodetype'] == 'capabilities': out.write('%s = ' % transOpers(symName)) out.write('AgentCapabilities(%s)' % __oidToTuple(symDef['oid'])) else: sys.stderr.write('Warning: skipping unknown node type %s, oid %s\n' % (symDef['nodetype'], symName)) continue out.write('%s' % addLabelForSymbol(symName)) if genTextLoader: if symDef.has_key("description"): out.write('\nif mibBuilder.loadTexts: %s.setDescription("%s")' % (transOpers(symName), replace(symDef['description'], '\n', '\\n'))) out.write('\n') out.write('\n# Augmentions\n') for symName, symDef in mib['nodes'].items(): if symDef['nodetype'] == 'row': if symDef['linkage'] and type(symDef['linkage'][0]) == DictType: for idx in symDef['linkage']: for m, indices in idx.items(): if m != dstModName: out.write( '%s, = mibBuilder.importSymbols(\"%s\", \"%s\")\n'%( transOpers(indices['relatedNode']), m, indices['relatedNode'] )) out.write( '%s.registerAugmentions((\"%s\", \"%s\"))\n' % ( indices['relatedNode'], dstModName, symName )) out.write( 'apply(%s.setIndexNames, %s.getIndexNames())\n' % ( symName, transOpers(indices['relatedNode']) )) if mib.has_key('notifications'): notifications = mib['notifications'].items() __oid2num = lambda o: map(lambda x: atol(x), split(o, '.')) notifications.sort(lambda x,y,f=__oid2num: cmp( f(x[1].get('oid')), f(y[1].get('oid')) )) else: notifications = () if notifications: out.write('\n# Notifications\n\n') for symName, symDef in notifications: out.write('%s = ' % transOpers(symName)) if symDef['nodetype'] == 'notification': out.write('NotificationType(%s)' % __oidToTuple(symDef['oid'])) out.write('.setObjects(') for objName, objDef in symDef['objects'].items(): out.write('(\"%s\", \"%s\"), ' % (objDef['module'], objName)) out.write(')') out.write('%s' % addLabelForSymbol(symName)) if genTextLoader: if symDef.has_key("description"): out.write('\nif mibBuilder.loadTexts: %s.setDescription("%s")' % (transOpers(symName), replace(symDef['description'], '\n', '\\n'))) out.write('\n') if mib.has_key('groups'): groups = mib['groups'].items() __oid2num = lambda o: map(lambda x: atol(x), split(o, '.')) groups.sort(lambda x,y,f=__oid2num: cmp( f(x[1].get('oid')), f(y[1].get('oid')) )) else: groups = () if groups: out.write('\n# Groups\n\n') for symName, symDef in groups: out.write('%s = ' % transOpers(symName)) if symDef['nodetype'] == 'group': if find(symName, 'otification') < 0: # hackerish out.write('ObjectGroup(') else: out.write('NotificationGroup(') out.write('%s)' % __oidToTuple(symDef['oid'])) out.write('.setObjects(') for objName, objDef in symDef['members'].items(): out.write('(\"%s\", \"%s\"), ' % (objDef['module'], objName)) out.write(')') out.write('%s' % addLabelForSymbol(symName)) if genTextLoader: if symDef.has_key("description"): out.write('\nif mibBuilder.loadTexts: %s.setDescription("%s")' % (transOpers(symName), replace(symDef['description'], '\n', '\\n'))) out.write('\n') if mib.has_key('compliances'): compliances = mib['compliances'].items() __oid2num = lambda o: map(lambda x: atol(x), split(o, '.')) compliances.sort(lambda x,y,f=__oid2num: cmp( f(x[1].get('oid')), f(y[1].get('oid')) )) else: compliances = () if compliances: out.write('\n# Compliances\n\n') for symName, symDef in compliances: out.write('%s = ' % transOpers(symName)) if symDef['nodetype'] == 'compliance': out.write('ModuleCompliance(') out.write('%s)' % __oidToTuple(symDef['oid'])) if symDef.has_key('requires'): out.write('.setObjects(') for objName, objDef in symDef['requires'].items(): # XXX nodetype not stored out.write('(\"%s\", \"%s\"), ' % (objDef['module'], objName)) out.write(')') # XXX refinements not stored out.write('%s' % addLabelForSymbol(symName)) if genTextLoader: if symDef.has_key("description"): out.write('\nif mibBuilder.loadTexts: %s.setDescription("%s")' % (transOpers(symName), replace(symDef['description'], '\n', '\\n'))) out.write('\n') out.write('\n# Exports\n\n') if moduleIdentityNode: out.write('# Module identity\n') out.write('mibBuilder.exportSymbols(\"%s\"' % dstModName) out.write(', PYSNMP_MODULE_ID=%s' % transOpers(moduleIdentityNode)) out.write(')\n\n') if typedefs: out.write('# Types\n') out.write('mibBuilder.exportSymbols(\"%s\"' % dstModName) idx = 1L for symName, symObj in typedefs: if idx % 127 == 0: out.write(')\n') out.write('mibBuilder.exportSymbols(\"%s\"' % dstModName) out.write(', %s=%s' % (symName, symName)) idx = idx + 1 out.write(')\n\n') if nodes: out.write('# Objects\n') out.write('mibBuilder.exportSymbols(\"%s\"' % dstModName) idx = 1L for symName, symObj in nodes: if idx % 127 == 0: out.write(')\n') out.write('mibBuilder.exportSymbols(\"%s\"' % dstModName) out.write(', %s=%s' % ((transOpers(symTrans(symName)[0]),)*2)) idx = idx + 1 out.write(')\n\n') if notifications: out.write('# Notifications\n') out.write('mibBuilder.exportSymbols(\"%s\"' % dstModName) idx = 1L for symName, symObj in notifications: if idx % 127 == 0: out.write(')\n') out.write('mibBuilder.exportSymbols(\"%s\"' % dstModName) out.write(', %s=%s' % ((transOpers(symName),)*2)) idx = idx + 1 out.write(')\n\n') if groups: out.write('# Groups\n') out.write('mibBuilder.exportSymbols(\"%s\"' % dstModName) idx = 1L for symName, symObj in groups: if idx % 127 == 0: out.write(')\n') out.write('mibBuilder.exportSymbols(\"%s\"' % dstModName) out.write(', %s=%s' % ((transOpers(symName),)*2)) idx = idx + 1 out.write(')\n\n') if compliances: out.write('# Compliances\n') out.write('mibBuilder.exportSymbols(\"%s\"' % dstModName) idx = 1L for symName, symObj in compliances: if idx % 127 == 0: out.write(')\n') out.write('mibBuilder.exportSymbols(\"%s\"' % dstModName) out.write(', %s=%s' % ((transOpers(symName),)*2)) idx = idx + 1 out.write(')\n') # XXX # implement API version checking PK)o=îçY”>>pysnmp/__init__.py# PySNMP, version 4 majorVersionId = '4' version = (4, 1, 15) PK†£=²H¾—pppysnmp/error.pyc;ò ”Ÿ®Bc@sdefd„ƒYZdS(s PySnmpErrorcBstZRS(N(s__name__s __module__(((s*build/bdist.linux-i686/egg/pysnmp/error.pys PySnmpErrorsN(s StandardErrors PySnmpError(s PySnmpError((s*build/bdist.linux-i686/egg/pysnmp/error.pys?sPK0kê= maximum: increment = maximum self.__increment = increment self.__threshold = increment/2 self.__bank = range(self.__increment) def __repr__(self): return '%s(%d, %d)' % ( self.__class__.__name__, self.__maximum, self.__increment ) def __call__(self): v = self.__bank.pop(0) if v % self.__threshold: return v else: # this is MT-safe unless too many (~ increment/2) threads # bump into this code simultaneously e = self.__bank[-1]+1 if e > self.__maximum: e = 0 self.__bank.extend(range(e, e+self.__threshold)) return v PK†£=ßDåDççpysnmp/__init__.pyc;ò žsàLc@sdZdddfZdS(s4iiiN(smajorVersionIdsversion(smajorVersionIdsversion((s-build/bdist.linux-i686/egg/pysnmp/__init__.pys?sPK†£=‘™÷ü²²pysnmp/nextid.pyc;ò ) ËIc@sdfd„ƒYZdS(sIntegercBs&tZdd„Zd„Zd„ZRS(NicCsL||_||jo |}n||_|d|_t|iƒ|_dS(Ni(smaximumsselfs_Integer__maximums increments_Integer__increments_Integer__thresholdsranges_Integer__bank(sselfsmaximums increment((s+build/bdist.linux-i686/egg/pysnmp/nextid.pys__init__s      cCs!d|ii|i|ifSdS(Ns %s(%d, %d)(sselfs __class__s__name__s_Integer__maximums_Integer__increment(sself((s+build/bdist.linux-i686/egg/pysnmp/nextid.pys__repr__ scCs{|iidƒ}||io|SnP|idd}||ijo d}n|iit|||iƒƒ|SdS(Niiÿÿÿÿi( sselfs_Integer__bankspopsvs_Integer__thresholdses_Integer__maximumsextendsrange(sselfsesv((s+build/bdist.linux-i686/egg/pysnmp/nextid.pys__call__s  (s__name__s __module__s__init__s__repr__s__call__(((s+build/bdist.linux-i686/egg/pysnmp/nextid.pysIntegers  N(sInteger(sInteger((s+build/bdist.linux-i686/egg/pysnmp/nextid.pys?sPK®Šl1 „ÄL¾¾pysnmp/proto/__init__.py""" SNMP framework for Python. The pysnmp.proto sub-package implements various SNMP protocols. Copyright 1999-2004 by Ilya Etingof . See LICENSE for details. """ PK†£=:'÷kí í pysnmp/proto/error.pyc;ò “fHKc@sÈdklZdklZdklZdeefd„ƒYZdefd„ƒYZdefd„ƒYZd efd „ƒYZ d efd „ƒYZ d efd„ƒYZ defd„ƒYZ dS((s PyAsn1Error(s PySnmpError(sdebugs ProtocolErrorcBstZRS(N(s__name__s __module__(((s0build/bdist.linux-i686/egg/pysnmp/proto/error.pys ProtocolErrorss SnmpV3ErrorcBstZRS(N(s__name__s __module__(((s0build/bdist.linux-i686/egg/pysnmp/proto/error.pys SnmpV3Error ssStatusInformationcBs8tZd„Zd„Zd„Zd„Zed„ZRS(NcKsQti|ƒ||_tititiBti Bti B@otid|ƒdS(NsStatusInformation: %s( s SnmpV3Errors__init__sselfskwargss#_StatusInformation__errorIndicationsdebugsloggersflagDspsflagMPsflagSMsflagACL(sselfskwargs((s0build/bdist.linux-i686/egg/pysnmp/proto/error.pys__init__ s  cCst|iƒSdS(N(sstrsselfs#_StatusInformation__errorIndication(sself((s0build/bdist.linux-i686/egg/pysnmp/proto/error.pys__str__scCs|i|SdS(N(sselfs#_StatusInformation__errorIndicationskey(sselfskey((s0build/bdist.linux-i686/egg/pysnmp/proto/error.pys __getitem__scCs|ii|ƒSdS(N(sselfs#_StatusInformation__errorIndicationshas_keyskey(sselfskey((s0build/bdist.linux-i686/egg/pysnmp/proto/error.pyshas_keyscCs|ii||ƒSdS(N(sselfs#_StatusInformation__errorIndicationsgetskeysdefVal(sselfskeysdefVal((s0build/bdist.linux-i686/egg/pysnmp/proto/error.pysgets(s__name__s __module__s__init__s__str__s __getitem__shas_keysNonesget(((s0build/bdist.linux-i686/egg/pysnmp/proto/error.pysStatusInformation s     sCacheExpiredErrorcBstZRS(N(s__name__s __module__(((s0build/bdist.linux-i686/egg/pysnmp/proto/error.pysCacheExpiredErrorss InternalErrorcBstZRS(N(s__name__s __module__(((s0build/bdist.linux-i686/egg/pysnmp/proto/error.pys InternalErrorssMessageProcessingErrorcBstZRS(N(s__name__s __module__(((s0build/bdist.linux-i686/egg/pysnmp/proto/error.pysMessageProcessingErrorssRequestTimeoutcBstZRS(N(s__name__s __module__(((s0build/bdist.linux-i686/egg/pysnmp/proto/error.pysRequestTimeoutsN( s pyasn1.errors PyAsn1Errors pysnmp.errors PySnmpErrorspysnmpsdebugs ProtocolErrors SnmpV3ErrorsStatusInformationsCacheExpiredErrors InternalErrorsMessageProcessingErrorsRequestTimeout( sCacheExpiredErrors PySnmpErrors InternalErrorsStatusInformationsMessageProcessingErrors PyAsn1Errorsdebugs SnmpV3Errors ProtocolErrorsRequestTimeout((s0build/bdist.linux-i686/egg/pysnmp/proto/error.pys?s    PK/€G6ô jpysnmp/proto/rfc1902.pyimport types import string from pyasn1.type import univ, tag, constraint, namedtype, namedval from pysnmp.proto import rfc1155, error class Integer(univ.Integer): subtypeSpec = univ.Integer.subtypeSpec+constraint.ValueRangeConstraint( -2147483648L, 2147483647L ) class Integer32(univ.Integer): subtypeSpec = univ.Integer.subtypeSpec+constraint.ValueRangeConstraint( -2147483648L, 2147483647L ) class OctetString(univ.OctetString): subtypeSpec = univ.Integer.subtypeSpec+constraint.ValueSizeConstraint( 0, 65535 ) # rfc1902 uses a notion of "fixed length string" what might mean # having zero-range size constraint applied. The following is # supposed to be used for setting and querying this property. fixedLength = None def setFixedLength(self, value): self.fixedLength = value return self def isFixedLength(self): return self.fixedLength is not None def getFixedLength(self): return self.fixedLength class IpAddress(univ.OctetString): tagSet = univ.OctetString.tagSet.tagImplicitly( tag.Tag(tag.tagClassApplication, tag.tagFormatSimple, 0x00) ) subtypeSpec = univ.OctetString.subtypeSpec+constraint.ValueSizeConstraint( 4, 4 ) fixedLength = 4 def prettyIn(self, value): return rfc1155.ipAddressPrettyIn(value) def prettyOut(self, value): return rfc1155.ipAddressPrettyOut(value) class Counter32(univ.Integer): tagSet = univ.Integer.tagSet.tagImplicitly( tag.Tag(tag.tagClassApplication, tag.tagFormatSimple, 0x01) ) subtypeSpec = univ.Integer.subtypeSpec+constraint.ValueRangeConstraint( 0, 4294967295L ) class Gauge32(univ.Integer): tagSet = univ.Integer.tagSet.tagImplicitly( tag.Tag(tag.tagClassApplication, tag.tagFormatSimple, 0x02) ) subtypeSpec = univ.Integer.subtypeSpec+constraint.ValueRangeConstraint( 0, 4294967295L ) class Unsigned32(univ.Integer): tagSet = univ.Integer.tagSet.tagImplicitly( tag.Tag(tag.tagClassApplication, tag.tagFormatSimple, 0x02) ) subtypeSpec = univ.Integer.subtypeSpec+constraint.ValueRangeConstraint( 0, 4294967295L ) class TimeTicks(univ.Integer): tagSet = univ.Integer.tagSet.tagImplicitly( tag.Tag(tag.tagClassApplication, tag.tagFormatSimple, 0x03) ) subtypeSpec = univ.Integer.subtypeSpec+constraint.ValueRangeConstraint( 0, 4294967295L ) class Opaque(univ.OctetString): tagSet = univ.OctetString.tagSet.tagImplicitly( tag.Tag(tag.tagClassApplication, tag.tagFormatSimple, 0x04) ) class Counter64(univ.Integer): tagSet = univ.Integer.tagSet.tagImplicitly( tag.Tag(tag.tagClassApplication, tag.tagFormatSimple, 0x06) ) subtypeSpec = univ.Integer.subtypeSpec+constraint.ValueRangeConstraint( 0, 18446744073709551615L ) class Bits(univ.OctetString): namedValues = namedval.NamedValues() def __init__(self, value=None, tagSet=None, subtypeSpec=None, namedValues=None): if namedValues is None: self.__namedValues = self.namedValues else: self.__namedValues = namedValues univ.OctetString.__init__( self, value, tagSet, subtypeSpec ) def prettyIn(self, bits): if type(bits) not in (types.TupleType, types.ListType): return str(bits) # raw bitstring octets = [] for bit in bits: # tuple of named bits v = self.__namedValues.getValue(bit) if v is None: raise error.ProtocolError( 'Unknown named bit %s' % bit ) d, m = divmod(v, 8) if d >= len(octets): octets.extend([0] * (d - len(octets) + 1)) octets[d] = octets[d] | 0x01 << (7-m) return string.join(map(lambda x: chr(x), octets)) def prettyOut(self, value): names = [] octets = tuple(map(None, str(value))) i = 0 while i < len(octets): v = ord(octets[i]) j = 7 while j >= 0: if v & (0x01<tZeiiieieiei dƒƒZdd„Z RS(NicCsdSdS(Ns+No Such Object currently exists at this OID((sselfsscope((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1905.pys prettyPrint s( s__name__s __module__sunivsNullstagSets tagImplicitlystagsTagstagClassContextstagFormatSimples prettyPrint(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1905.pys NoSuchObject s*sNoSuchInstancecBs>tZeiiieieiei dƒƒZdd„Z RS(NiicCsdSdS(Ns-No Such Instance currently exists at this OID((sselfsscope((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1905.pys prettyPrints( s__name__s __module__sunivsNullstagSets tagImplicitlystagsTagstagClassContextstagFormatSimples prettyPrint(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1905.pysNoSuchInstances*s EndOfMibViewcBs>tZeiiieieiei dƒƒZdd„Z RS(NiicCsdSdS(Ns'No more variables left in this MIB View((sselfsscope((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1905.pys prettyPrints( s__name__s __module__sunivsNullstagSets tagImplicitlystagsTagstagClassContextstagFormatSimples prettyPrint(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1905.pys EndOfMibViews*s _BindValuecBsktZeieideiƒƒeideiƒƒeide ƒeide ƒeide ƒƒZ RS(Nsvalues unSpecifieds noSuchObjectsnoSuchInstances endOfMibView( s__name__s __module__s namedtypes NamedTypess NamedTypesrfc1902s ObjectSyntaxsunivsNulls noSuchObjectsnoSuchInstances endOfMibViews componentType(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1905.pys _BindValue"s sVarBindcBs;tZeieideiƒƒeideƒƒƒZRS(Nsnames( s__name__s __module__s namedtypes NamedTypess NamedTypesrfc1902s ObjectNames _BindValues componentType(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1905.pysVarBind+ss VarBindListcBs-tZeƒZeiieide ƒZRS(Ni( s__name__s __module__sVarBinds componentTypesunivs SequenceOfs subtypeSpecs constraintsValueSizeConstraints max_bindings(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1905.pys VarBindList1s sPDUcBs4tZeieideiƒƒeideide i ddfddfdd fd d fd d fddfddfddfddfddfddfddfddfddfd d!fd"d#fd$d%fd&d'fd(d)fƒƒƒeid*eiƒi d+e i deƒƒƒeid,eƒƒƒZRS(-Ns request-ids error-statuss namedValuessnoErroristooBigis noSuchNameisbadValueisreadOnlyisgenErrisnoAccessis wrongTypeis wrongLengthis wrongEncodingi s wrongValuei s noCreationi sinconsistentValuei sresourceUnavailablei s commitFailedis undoFailedisauthorizationErroris notWritableisinconsistentNameis error-indexs subtypeSpecsvariable-bindings(s__name__s __module__s namedtypes NamedTypess NamedTypesrfc1902s Integer32sunivsIntegersnamedvals NamedValuesssubtypes constraintsValueRangeConstraints max_bindingss VarBindLists componentType(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1905.pysPDU8sÌ-sBulkPDUc Bs•tZeieideiƒƒeideiƒi de i de ƒƒƒeideiƒi de i de ƒƒƒeide ƒƒƒZRS(Ns request-ids non-repeaterss subtypeSpecismax-repetitionssvariable-bindings(s__name__s __module__s namedtypes NamedTypess NamedTypesrfc1902s Integer32sunivsIntegerssubtypes constraintsValueRangeConstraints max_bindingss VarBindLists componentType(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1905.pysBulkPDUAs--s GetRequestPDUcBs/tZeiieieieidƒƒZRS(Ni( s__name__s __module__sPDUstagSets tagImplicitlystagsTagstagClassContextstagFormatConstructed(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1905.pys GetRequestPDUIssGetNextRequestPDUcBs/tZeiieieieidƒƒZRS(Ni( s__name__s __module__sPDUstagSets tagImplicitlystagsTagstagClassContextstagFormatConstructed(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1905.pysGetNextRequestPDUNss ResponsePDUcBs/tZeiieieieidƒƒZRS(Ni( s__name__s __module__sPDUstagSets tagImplicitlystagsTagstagClassContextstagFormatConstructed(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1905.pys ResponsePDUSss SetRequestPDUcBs/tZeiieieieidƒƒZRS(Ni( s__name__s __module__sPDUstagSets tagImplicitlystagsTagstagClassContextstagFormatConstructed(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1905.pys SetRequestPDUXssGetBulkRequestPDUcBs/tZeiieieieidƒƒZRS(Ni( s__name__s __module__sPDUstagSets tagImplicitlystagsTagstagClassContextstagFormatConstructed(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1905.pysGetBulkRequestPDU]ssInformRequestPDUcBs/tZeiieieieidƒƒZRS(Ni( s__name__s __module__sPDUstagSets tagImplicitlystagsTagstagClassContextstagFormatConstructed(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1905.pysInformRequestPDUbss SNMPv2TrapPDUcBs/tZeiieieieidƒƒZRS(Ni( s__name__s __module__sPDUstagSets tagImplicitlystagsTagstagClassContextstagFormatConstructed(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1905.pys SNMPv2TrapPDUgss ReportPDUcBs/tZeiieieieidƒƒZRS(Ni( s__name__s __module__sPDUstagSets tagImplicitlystagsTagstagClassContextstagFormatConstructed(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1905.pys ReportPDUlssPDUsc Bs¤tZeieideƒƒeideƒƒeideƒƒeideƒƒeide ƒƒeide ƒƒeide ƒƒeide ƒƒƒZ RS( Ns get-requestsget-next-requestsget-bulk-requestsresponses set-requestsinform-requests snmpV2-trapsreport(s__name__s __module__s namedtypes NamedTypess NamedTypes GetRequestPDUsGetNextRequestPDUsGetBulkRequestPDUs ResponsePDUs SetRequestPDUsInformRequestPDUs SNMPv2TrapPDUs ReportPDUs componentType(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1905.pysPDUsqsN("s pyasn1.typesunivstags constraints namedtypesnamedvals pysnmp.protosrfc1902sIntegers max_bindingssNulls NoSuchObjects noSuchObjectsNoSuchInstancesnoSuchInstances EndOfMibViews endOfMibViewsChoices _BindValuesSequencesVarBinds SequenceOfs VarBindListsPDUsBulkPDUs GetRequestPDUsGetNextRequestPDUs ResponsePDUs SetRequestPDUsGetBulkRequestPDUsInformRequestPDUs SNMPv2TrapPDUs ReportPDUsPDUs(sPDUsstags namedtypes EndOfMibViewsunivs _BindValues ReportPDUsBulkPDUs SNMPv2TrapPDUs GetRequestPDUsnamedvals NoSuchObjectsGetNextRequestPDUs VarBindListsPDUsGetBulkRequestPDUsVarBinds noSuchObjectsNoSuchInstances max_bindingss ResponsePDUs constraintsrfc1902sInformRequestPDUs endOfMibViews SetRequestPDUsnoSuchInstance((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1905.pys?s,%      PKdê<Ãä¥>JJpysnmp/proto/rfc3412.py"""SNMP v3 Message Processing and Dispatching (RFC3412)""" import time from pysnmp.smi import builder, instrum from pysnmp.proto import error from pysnmp.proto.api import verdec # XXX from pysnmp.error import PySnmpError from pysnmp import debug class MsgAndPduDispatcher: """SNMP engine PDU & message dispatcher. Exchanges SNMP PDU's with applications and serialized messages with transport level. """ def __init__(self, mibInstrumController=None): if mibInstrumController is None: self.mibInstrumController = instrum.MibInstrumController( builder.MibBuilder() ) else: self.mibInstrumController = mibInstrumController self.mibInstrumController.mibBuilder.loadModules( 'SNMPv2-MIB', 'SNMP-MPD-MIB', 'SNMP-COMMUNITY-MIB', 'SNMP-TARGET-MIB', 'SNMP-USER-BASED-SM-MIB' ) # Registered context engine IDs self.__appsRegistration = {} # Source of sendPduHandle and cache of requesting apps self.__sendPduHandle = 0L self.__cacheRepository = {} # To pass transport info to app self.__transportInfo = {} # These routines manage cache of management apps def __newSendPduHandle(self): sendPduHandle = self.__sendPduHandle = self.__sendPduHandle + 1 return sendPduHandle def __cacheAdd(self, index, **kwargs): self.__cacheRepository[index] = kwargs return index def __cachePop(self, index): cachedParams = self.__cacheRepository.get(index) if cachedParams is None: return del self.__cacheRepository[index] return cachedParams def __cacheUpdate(self, index, **kwargs): if not self.__cacheRepository.has_key(index): raise error.ProtocolError( 'Cache miss on update for %s' % kwargs ) self.__cacheRepository[index].update(kwargs) def __cacheExpire(self, snmpEngine, cbFun): for index, cachedParams in self.__cacheRepository.items(): if cbFun: if cbFun(snmpEngine, cachedParams): del self.__cacheRepository[index] def getTransportInfo(self, stateReference): if self.__transportInfo.has_key(stateReference): return self.__transportInfo[stateReference] else: raise error.ProtocolError( 'No data for stateReference %s' % stateReference ) # Application registration with dispatcher # 4.3.1 def registerContextEngineId(self, contextEngineId, pduTypes, processPdu): """Register application with dispatcher""" # 4.3.2 -> noop # 4.3.3 for pduType in pduTypes: k = (str(contextEngineId), pduType) if self.__appsRegistration.has_key(k): raise error.ProtocolError( 'Duplicate registration %s/%s' % (contextEngineId, pduType) ) # 4.3.4 self.__appsRegistration[k] = processPdu debug.logger & debug.flagDsp and debug.logger('registerContextEngineId: contextEngineId %s pduTypes %s' % (repr(contextEngineId), pduTypes)) # 4.4.1 def unregisterContextEngineId(self, contextEngineId, pduTypes): """Unregister application with dispatcher""" # 4.3.4 if contextEngineId is None: # Default to local snmpEngineId contextEngineId, = self.mibInstrumController.mibBuilder.importSymbols('__SNMP-FRAMEWORK-MIB', 'snmpEngineID') for pduType in pduTypes: k = (str(contextEngineId), pduType) if self.__appsRegistration.has_key(k): del self.__appsRegistration[k] debug.logger & debug.flagDsp and debug.logger('unregisterContextEngineId: contextEngineId %s pduTypes %s' % (repr(contextEngineId), pduTypes)) def getRegisteredApp(self, contextEngineId, pduType): k = ( str(contextEngineId), pduType ) if self.__appsRegistration.has_key(k): return self.__appsRegistration[k] k = ( '', pduType ) if self.__appsRegistration.has_key(k): return self.__appsRegistration[k] # wildcard # Dispatcher <-> application API # 4.1.1 def sendPdu( self, snmpEngine, transportDomain, transportAddress, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, PDU, expectResponse ): """PDU dispatcher -- prepare and serialize a request or notification""" # 4.1.1.2 mpHandler = snmpEngine.messageProcessingSubsystems.get( int(messageProcessingModel) ) if mpHandler is None: raise error.StatusInformation( errorIndication='unsupportedMsgProcessingModel' ) debug.logger & debug.flagDsp and debug.logger('sendPdu: securityName %s, PDU\n%s' % (securityName, PDU.prettyPrint())) # 4.1.1.3 sendPduHandle = self.__newSendPduHandle() if expectResponse: self.__cacheAdd( sendPduHandle, messageProcessingModel=messageProcessingModel, sendPduHandle=sendPduHandle, expectResponse=expectResponse ) debug.logger & debug.flagDsp and debug.logger('sendPdu: new sendPduHandle %s, context %s' % (sendPduHandle, expectResponse)) # 4.1.1.4 & 4.1.1.5 try: ( destTransportDomain, destTransportAddress, outgoingMessage ) = mpHandler.prepareOutgoingMessage( snmpEngine, transportDomain, transportAddress, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, PDU, expectResponse, sendPduHandle ) debug.logger & debug.flagDsp and debug.logger('sendPdu: MP succeeded') except error.StatusInformation, statusInformation: # XXX is it still needed here? # self.releaseStateInformation(snmpEngine, sendPduHandle, messageProcessingModel) raise # 4.1.1.6 if snmpEngine.transportDispatcher is None: raise error.PySnmpError('Transport dispatcher not set') snmpEngine.transportDispatcher.sendMessage( outgoingMessage, destTransportDomain, destTransportAddress ) # Update cache with orignal req params (used for retrying) if expectResponse: self.__cacheUpdate( sendPduHandle, transportDomain=transportDomain, transportAddress=transportAddress, securityModel=securityModel, securityName=securityName, securityLevel=securityLevel, contextEngineId=contextEngineId, contextName=contextName, pduVersion=pduVersion, PDU=PDU ) return sendPduHandle # 4.1.2.1 def returnResponsePdu( self, snmpEngine, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, PDU, maxSizeResponseScopedPDU, stateReference, statusInformation ): """PDU dispatcher -- prepare and serialize a response""" # Extract input values and initialize defaults mpHandler = snmpEngine.messageProcessingSubsystems.get( int(messageProcessingModel) ) if mpHandler is None: raise error.StatusInformation( errorIndication='unsupportedMsgProcessingModel' ) debug.logger & debug.flagDsp and debug.logger('returnResponsePdu: PDU %s' % (PDU and PDU.prettyPrint() or "",)) # 4.1.2.2 try: ( destTransportDomain, destTransportAddress, outgoingMessage ) = mpHandler.prepareResponseMessage( snmpEngine, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, PDU, maxSizeResponseScopedPDU, stateReference, statusInformation ) debug.logger & debug.flagDsp and debug.logger('returnResponsePdu: MP suceeded') except error.StatusInformation, statusInformation: # 4.1.2.3 raise # Handle oversized messages XXX transport constrains? snmpEngineMaxMessageSize, = self.mibInstrumController.mibBuilder.importSymbols('__SNMP-FRAMEWORK-MIB', 'snmpEngineMaxMessageSize') if snmpEngineMaxMessageSize.syntax and \ len(outgoingMessage) > snmpEngineMaxMessageSize.syntax: snmpSilentDrops, = self.mibInstrumController.mibBuilder.importSymbols('__SNMPv2-MIB', 'snmpSilentDrops') snmpSilentDrops.syntax = snmpSilentDrops.syntax + 1 raise error.MessageTooBigError() # 4.1.2.4 snmpEngine.transportDispatcher.sendMessage( outgoingMessage, destTransportDomain, destTransportAddress ) # 4.2.1 def receiveMessage( self, snmpEngine, transportDomain, transportAddress, wholeMsg ): """Message dispatcher -- de-serialize message into PDU""" # 4.2.1.1 snmpInPkts, = self.mibInstrumController.mibBuilder.importSymbols( '__SNMPv2-MIB', 'snmpInPkts' ) snmpInPkts.syntax = snmpInPkts.syntax + 1 # 4.2.1.2 try: restOfWholeMsg = '' # XXX fix decoder non-recursive return msgVersion = verdec.decodeMessageVersion(wholeMsg) except PySnmpError: snmpInAsn1ParseErrs, = self.mibInstrumController.mibBuilder.importSymbols('__SNMPv2-MIB', 'snmpInAsn1ParseErrs') snmpInAsn1ParseErrs.syntax = snmpInAsn1ParseErrs.syntax + 1 return '' # n.b the whole buffer gets dropped debug.logger & debug.flagDsp and debug.logger('receiveMessage: msgVersion %s, msg decoded' % msgVersion) messageProcessingModel = msgVersion mpHandler = snmpEngine.messageProcessingSubsystems.get( int(messageProcessingModel) ) if mpHandler is None: snmpInBadVersions, = self.mibInstrumController.mibBuilder.importSymbols('__SNMPv2-MIB', 'snmpInBadVersions') snmpInBadVersions.syntax = snmpInBadVersions.syntax + 1 return restOfWholeMsg # 4.2.1.3 -- no-op # 4.2.1.4 try: ( messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, PDU, pduType, sendPduHandle, maxSizeResponseScopedPDU, statusInformation, stateReference ) = mpHandler.prepareDataElements( snmpEngine, transportDomain, transportAddress, wholeMsg ) debug.logger & debug.flagDsp and debug.logger('receiveMessage: MP succeded') except error.StatusInformation, statusInformation: if statusInformation.has_key('sendPduHandle'): # Dropped REPORT -- re-run pending reqs queue as some # of them may be waiting for this REPORT debug.logger & debug.flagDsp and debug.logger('receiveMessage: MP failed, statusInformation %s' % statusInformation) self.__expireRequest( snmpEngine, self.__cachePop(statusInformation['sendPduHandle']), statusInformation ) return restOfWholeMsg debug.logger & debug.flagDsp and debug.logger('receiveMessage: PDU %s' % PDU.prettyPrint()) # 4.2.2 if sendPduHandle is None: # 4.2.2.1 (request or notification) debug.logger & debug.flagDsp and debug.logger('receiveMessage: pduType %s' % pduType) # 4.2.2.1.1 processPdu = self.getRegisteredApp(contextEngineId, pduType) # 4.2.2.1.2 if processPdu is None: # 4.2.2.1.2.a snmpUnknownPDUHandlers, = self.mibInstrumController.mibBuilder.importSymbols('__SNMP-MPD-MIB', 'snmpUnknownPDUHandlers') snmpUnknownPDUHandlers.syntax = snmpUnknownPDUHandlers.syntax+1 # 4.2.2.1.2.b statusInformation = { 'errorIndication': 'unknownPDUHandler', 'oid': snmpUnknownPDUHandlers.name, 'val': snmpUnknownPDUHandlers.syntax } debug.logger & debug.flagDsp and debug.logger('receiveMessage: unhandled PDU type') # XXX fails on unknown PDU try: ( destTransportDomain, destTransportAddress, outgoingMessage ) = mpHandler.prepareResponseMessage( snmpEngine, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, PDU, maxSizeResponseScopedPDU, stateReference, statusInformation ) except error.StatusInformation, statusInformation: debug.logger & debug.flagDsp and debug.logger('receiveMessage: report failed, statusInformation %s' % statusInformation) return restOfWholeMsg # 4.2.2.1.2.c try: snmpEngine.transportDispatcher.sendMessage( outgoingMessage, destTransportDomain, destTransportAddress ) except PySnmpError: # XXX pass debug.logger & debug.flagDsp and debug.logger('receiveMessage: reporting succeeded') # 4.2.2.1.2.d return restOfWholeMsg else: # Pass transport info to app if stateReference is not None: self.__transportInfo[stateReference] = ( transportDomain, transportAddress ) # 4.2.2.1.3 processPdu( snmpEngine, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, PDU, maxSizeResponseScopedPDU, stateReference ) if stateReference is not None: del self.__transportInfo[stateReference] debug.logger & debug.flagDsp and debug.logger('receiveMessage: processPdu succeeded') return restOfWholeMsg else: # 4.2.2.2 (response) # 4.2.2.2.1 cachedParams = self.__cachePop(sendPduHandle) # 4.2.2.2.2 if cachedParams is None: snmpUnknownPDUHandlers, = self.mibInstrumController.mibBuilder.importSymbols('__SNMP-MPD-MIB', 'snmpUnknownPDUHandlers') snmpUnknownPDUHandlers.syntax = snmpUnknownPDUHandlers.syntax+1 return restOfWholeMsg debug.logger & debug.flagDsp and debug.logger('receiveMessage: cache read by sendPduHandle %s' % sendPduHandle) # 4.2.2.2.3 # no-op ? XXX # 4.2.2.2.4 processResponsePdu, timeoutAt, cbCtx = cachedParams[ 'expectResponse' ] processResponsePdu( snmpEngine, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, PDU, statusInformation, cachedParams['sendPduHandle'], cbCtx ) debug.logger & debug.flagDsp and debug.logger('receiveMessage: processResponsePdu succeeded') return restOfWholeMsg def releaseStateInformation( self, snmpEngine, sendPduHandle, messageProcessingModel ): mpHandler = snmpEngine.messageProcessingSubsystems.get( int(messageProcessingModel) ) mpHandler.releaseStateInformation(sendPduHandle) # Cache expiration stuff def __expireRequest(self, snmpEngine,cachedParams,statusInformation=None): processResponsePdu, timeoutAt, cbCtx = cachedParams['expectResponse'] if statusInformation is None and time.time() < timeoutAt: return debug.logger & debug.flagDsp and debug.logger('__expireRequest: req cachedParams %s' % cachedParams) # Fail timed-out requests if not statusInformation: statusInformation = error.StatusInformation( errorIndication='requestTimedOut' ) self.releaseStateInformation( snmpEngine, cachedParams['sendPduHandle'], cachedParams['messageProcessingModel'] ) processResponsePdu( snmpEngine, None, None, None, None, None, None, None, None, statusInformation, cachedParams['sendPduHandle'], cbCtx ) return 1 def receiveTimerTick(self, snmpEngine, timeNow): self.__cacheExpire(snmpEngine, self.__expireRequest) PK«ºy78rúµîîpysnmp/proto/rfc3411.py# SNMP PDU taxonomy from pysnmp.proto import rfc1157, rfc1905 readClassPDUs = { rfc1157.GetRequestPDU.tagSet: 1, rfc1157.GetNextRequestPDU.tagSet: 1, rfc1905.GetRequestPDU.tagSet: 1, rfc1905.GetNextRequestPDU.tagSet: 1, rfc1905.GetBulkRequestPDU.tagSet: 1 } writeClassPDUs = { rfc1157.SetRequestPDU.tagSet: 1, rfc1905.SetRequestPDU.tagSet: 1 } responseClassPDUs = { rfc1157.GetResponsePDU.tagSet: 1, rfc1905.ResponsePDU.tagSet: 1, rfc1905.ReportPDU.tagSet: 1 } notificationClassPDUs = { rfc1157.TrapPDU.tagSet: 1, rfc1905.SNMPv2TrapPDU.tagSet: 1, rfc1905.InformRequestPDU.tagSet: 1 } internalClassPDUs = { rfc1905.ReportPDU.tagSet: 1 } confirmedClassPDUs = { rfc1157.GetRequestPDU.tagSet: 1, rfc1157.GetNextRequestPDU.tagSet: 1, rfc1157.SetRequestPDU.tagSet: 1, rfc1905.GetRequestPDU.tagSet: 1, rfc1905.GetNextRequestPDU.tagSet: 1, rfc1905.GetBulkRequestPDU.tagSet: 1, rfc1905.SetRequestPDU.tagSet: 1, rfc1905.InformRequestPDU.tagSet: 1 } unconfirmedClassPDUs = { rfc1157.GetResponsePDU.tagSet: 1, rfc1905.ResponsePDU.tagSet: 1, rfc1157.TrapPDU.tagSet: 1, rfc1905.ReportPDU.tagSet: 1, rfc1905.SNMPv2TrapPDU.tagSet: 1 } PK†£=c"Ì?ââpysnmp/proto/rfc1157.pyc;ò ‹²¹Bc@sdklZlZlZlZdklZdeifd„ƒYZdei fd„ƒYZ deifd„ƒYZ de fd „ƒYZ d e fd „ƒYZ d e fd „ƒYZde fd„ƒYZdeifd„ƒYZdeifd„ƒYZdeifd„ƒYZdS((sunivstags namedtypesnamedval(srfc1155sVarBindcBs>tZeieideiƒƒeideiƒƒƒZRS(Nsnamesvalue( s__name__s __module__s namedtypes NamedTypess NamedTypesrfc1155s ObjectNames ObjectSyntaxs componentType(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1157.pysVarBindss VarBindListcBstZeƒZRS(N(s__name__s __module__sVarBinds componentType(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1157.pys VarBindList ss _RequestBasecBs§tZeieideiƒƒeideideiddfddfdd fd d fd d fddfƒƒƒeideiƒƒeide ƒƒƒZ RS(Ns request-ids error-statuss namedValuessnoErroristooBigis noSuchNameisbadValueisreadOnlyisgenErris error-indexsvariable-bindings( s__name__s __module__s namedtypes NamedTypess NamedTypesunivsIntegersnamedvals NamedValuess VarBindLists componentType(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1157.pys _RequestBase sWs GetRequestPDUcBs/tZeiieieieidƒƒZRS(Ni( s__name__s __module__s _RequestBasestagSets tagImplicitlystagsTagstagClassContextstagFormatConstructed(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1157.pys GetRequestPDUssGetNextRequestPDUcBs/tZeiieieieidƒƒZRS(Ni( s__name__s __module__s _RequestBasestagSets tagImplicitlystagsTagstagClassContextstagFormatConstructed(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1157.pysGetNextRequestPDUssGetResponsePDUcBs/tZeiieieieidƒƒZRS(Ni( s__name__s __module__s _RequestBasestagSets tagImplicitlystagsTagstagClassContextstagFormatConstructed(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1157.pysGetResponsePDUss SetRequestPDUcBs/tZeiieieieidƒƒZRS(Ni( s__name__s __module__s _RequestBasestagSets tagImplicitlystagsTagstagClassContextstagFormatConstructed(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1157.pys SetRequestPDU ssTrapPDUcBs tZeiiieieiei dƒƒZe i e i dei ƒƒe i deiƒƒe i deiƒideiddfdd fd d fd d fddfddfddfƒƒƒe i deiƒƒe i deiƒƒe i deƒƒƒZRS(Nis enterprises agent-addrs generic-traps namedValuess coldStartis warmStartislinkDownislinkUpisauthenticationFailuresegpNeighborLossisenterpriseSpecificis specific-traps time-stampsvariable-bindings(s__name__s __module__sunivsSequencestagSets tagImplicitlystagsTagstagClassContextstagFormatConstructeds namedtypes NamedTypess NamedTypesObjectIdentifiersrfc1155sNetworkAddresssIntegersclonesnamedvals NamedValuess TimeTickss VarBindLists componentType(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1157.pysTrapPDU%s*fsPDUscBsntZeieideƒƒeideƒƒeideƒƒeideƒƒeide ƒƒƒZ RS(Ns get-requestsget-next-requests get-responses set-requeststrap( s__name__s __module__s namedtypes NamedTypess NamedTypes GetRequestPDUsGetNextRequestPDUsGetResponsePDUs SetRequestPDUsTrapPDUs componentType(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1157.pysPDUs2s sMessagecBsetZeieideideiddfƒƒƒeidei ƒƒeide ƒƒƒZ RS(Nsversions namedValuess version-1is communitysdata( s__name__s __module__s namedtypes NamedTypess NamedTypesunivsIntegersnamedvals NamedValuess OctetStringsPDUss componentType(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1157.pysMessage;s0N(s pyasn1.typesunivstags namedtypesnamedvals pysnmp.protosrfc1155sSequencesVarBinds SequenceOfs VarBindLists _RequestBases GetRequestPDUsGetNextRequestPDUsGetResponsePDUs SetRequestPDUsTrapPDUsChoicesPDUssMessage(s _RequestBasesGetNextRequestPDUsGetResponsePDUsunivsPDUss GetRequestPDUstagsTrapPDUs namedtypes VarBindListsrfc1155sVarBindsMessagesnamedvals SetRequestPDU((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1157.pys?s   PK1¥r=UˆQ~~pysnmp/proto/rfc1905.pyfrom pyasn1.type import univ, tag, constraint, namedtype, namedval from pysnmp.proto import rfc1902 # Value reference -- max bindings in VarBindList max_bindings = rfc1902.Integer(2147483647L) # Take SNMP exception values out of BindValue structure for convenience class NoSuchObject(univ.Null): tagSet = univ.Null.tagSet.tagImplicitly( tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0x00) ) def prettyPrint(self, scope=0): return 'No Such Object currently exists at this OID' noSuchObject = NoSuchObject() class NoSuchInstance(univ.Null): tagSet = univ.Null.tagSet.tagImplicitly( tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0x01) ) def prettyPrint(self, scope=0): return 'No Such Instance currently exists at this OID' noSuchInstance = NoSuchInstance() class EndOfMibView(univ.Null): tagSet = univ.Null.tagSet.tagImplicitly( tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0x02) ) def prettyPrint(self, scope=0): return 'No more variables left in this MIB View' endOfMibView = EndOfMibView() # Made a separate class for better readability class _BindValue(univ.Choice): componentType = namedtype.NamedTypes( namedtype.NamedType('value', rfc1902.ObjectSyntax()), namedtype.NamedType('unSpecified', univ.Null()), namedtype.NamedType('noSuchObject', noSuchObject), namedtype.NamedType('noSuchInstance', noSuchInstance), namedtype.NamedType('endOfMibView', endOfMibView) ) class VarBind(univ.Sequence): componentType = namedtype.NamedTypes( namedtype.NamedType('name', rfc1902.ObjectName()), namedtype.NamedType('', _BindValue()) ) class VarBindList(univ.SequenceOf): componentType = VarBind() subtypeSpec = univ.SequenceOf.subtypeSpec + constraint.ValueSizeConstraint( 0, max_bindings ) # Base class for a non-bulk PDU class PDU(univ.Sequence): componentType = namedtype.NamedTypes( namedtype.NamedType('request-id', rfc1902.Integer32()), namedtype.NamedType('error-status', univ.Integer(namedValues=namedval.NamedValues(('noError', 0), ('tooBig', 1), ('noSuchName', 2), ('badValue', 3), ('readOnly', 4), ('genErr', 5), ('noAccess', 6), ('wrongType', 7), ('wrongLength', 8), ('wrongEncoding', 9), ('wrongValue', 10), ('noCreation', 11), ('inconsistentValue', 12), ('resourceUnavailable', 13), ('commitFailed', 14), ('undoFailed', 15), ('authorizationError', 16), ('notWritable', 17), ('inconsistentName', 18)))), namedtype.NamedType('error-index', univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(0, max_bindings))), namedtype.NamedType('variable-bindings', VarBindList()) ) # Base class for bulk PDU class BulkPDU(univ.Sequence): componentType = namedtype.NamedTypes( namedtype.NamedType('request-id', rfc1902.Integer32()), namedtype.NamedType('non-repeaters', univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(0, max_bindings))), namedtype.NamedType('max-repetitions', univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(0, max_bindings))), namedtype.NamedType('variable-bindings', VarBindList()) ) class GetRequestPDU(PDU): tagSet = PDU.tagSet.tagImplicitly( tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0) ) class GetNextRequestPDU(PDU): tagSet = PDU.tagSet.tagImplicitly( tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1) ) class ResponsePDU(PDU): tagSet = PDU.tagSet.tagImplicitly( tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 2) ) class SetRequestPDU(PDU): tagSet = PDU.tagSet.tagImplicitly( tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 3) ) class GetBulkRequestPDU(BulkPDU): tagSet = PDU.tagSet.tagImplicitly( tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 5) ) class InformRequestPDU(PDU): tagSet = PDU.tagSet.tagImplicitly( tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 6) ) class SNMPv2TrapPDU(PDU): tagSet = PDU.tagSet.tagImplicitly( tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 7) ) class ReportPDU(PDU): tagSet = PDU.tagSet.tagImplicitly( tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 8) ) class PDUs(univ.Choice): componentType = namedtype.NamedTypes( namedtype.NamedType('get-request', GetRequestPDU()), namedtype.NamedType('get-next-request', GetNextRequestPDU()), namedtype.NamedType('get-bulk-request', GetBulkRequestPDU()), namedtype.NamedType('response', ResponsePDU()), namedtype.NamedType('set-request', SetRequestPDU()), namedtype.NamedType('inform-request', InformRequestPDU()), namedtype.NamedType('snmpV2-trap', SNMPv2TrapPDU()), namedtype.NamedType('report', ReportPDU()) ) PK†£=‰Ÿ¤¬†>†>pysnmp/proto/rfc3412.pyc;ò -08Lc@smdZdkZdklZlZdklZdklZdk l Z dk l Z dfd„ƒYZ dS( s4SNMP v3 Message Processing and Dispatching (RFC3412)N(sbuildersinstrum(serror(sverdec(s PySnmpError(sdebugsMsgAndPduDispatchercBs¤tZdZed„Zd„Zd„Zd„Zd„Zd„Z d„Z d„Z d „Z d „Z d „Zd „Zd „Zd„Zed„Zd„ZRS(s†SNMP engine PDU & message dispatcher. Exchanges SNMP PDU's with applications and serialized messages with transport level. cCsy|tjotitiƒƒ|_n ||_|iiidddddƒh|_ d|_ h|_ h|_ dS(Ns SNMPv2-MIBs SNMP-MPD-MIBsSNMP-COMMUNITY-MIBsSNMP-TARGET-MIBsSNMP-USER-BASED-SM-MIBl( smibInstrumControllersNonesinstrumsMibInstrumControllersbuilders MibBuildersselfs mibBuilders loadModuless&_MsgAndPduDispatcher__appsRegistrations#_MsgAndPduDispatcher__sendPduHandles%_MsgAndPduDispatcher__cacheRepositorys#_MsgAndPduDispatcher__transportInfo(sselfsmibInstrumController((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc3412.pys__init__ s      cCs|id}|_|SdS(Ni(sselfs#_MsgAndPduDispatcher__sendPduHandles sendPduHandle(sselfs sendPduHandle((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc3412.pys__newSendPduHandle&scKs||i|<|SdS(N(skwargssselfs%_MsgAndPduDispatcher__cacheRepositorysindex(sselfsindexskwargs((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc3412.pys __cacheAdd*s cCs9|ii|ƒ}|tjodSn|i|=|SdS(N(sselfs%_MsgAndPduDispatcher__cacheRepositorysgetsindexs cachedParamssNone(sselfsindexs cachedParams((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc3412.pys __cachePop.s   cKsC|ii|ƒ otid|ƒ‚n|i|i|ƒdS(NsCache miss on update for %s(sselfs%_MsgAndPduDispatcher__cacheRepositoryshas_keysindexserrors ProtocolErrorskwargssupdate(sselfsindexskwargs((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc3412.pys __cacheUpdate5scCsMxF|iiƒD]5\}}|o"|||ƒo|i|=qEqqWdS(N(sselfs%_MsgAndPduDispatcher__cacheRepositorysitemssindexs cachedParamsscbFuns snmpEngine(sselfs snmpEnginescbFunsindexs cachedParams((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc3412.pys __cacheExpire<s  cCs9|ii|ƒo|i|Sntid|ƒ‚dS(NsNo data for stateReference %s(sselfs#_MsgAndPduDispatcher__transportInfoshas_keysstateReferenceserrors ProtocolError(sselfsstateReference((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc3412.pysgetTransportInfoBscCs’x]|D]U}t|ƒ|f}|ii|ƒoti d||fƒ‚n||i|sreturnResponsePdu: MP suceededs__SNMP-FRAMEWORK-MIBssnmpEngineMaxMessageSizes __SNMPv2-MIBssnmpSilentDropsiN(&s snmpEnginesmessageProcessingSubsystemssgetsintsmessageProcessingModels mpHandlersNoneserrorsStatusInformationsdebugsloggersflagDspsPDUs prettyPrintsprepareResponseMessages securityModels securityNames securityLevelscontextEngineIds contextNames pduVersionsmaxSizeResponseScopedPDUsstateReferencesstatusInformationsdestTransportDomainsdestTransportAddresssoutgoingMessagesselfsmibInstrumControllers mibBuilders importSymbolsssnmpEngineMaxMessageSizessyntaxslenssnmpSilentDropssMessageTooBigErrorstransportDispatchers sendMessage(sselfs snmpEnginesmessageProcessingModels securityModels securityNames securityLevelscontextEngineIds contextNames pduVersionsPDUsmaxSizeResponseScopedPDUsstateReferencesstatusInformationsoutgoingMessagesdestTransportAddressssnmpEngineMaxMessageSizesdestTransportDomainssnmpSilentDropss mpHandler((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc3412.pysreturnResponsePduÑs: 9 "  c! Csÿ|iiiddƒ\}|id|_yd}ti|ƒ}WnBt j o6|iiiddƒ\}|id|_dSnXt it i@ot id|ƒ|}|iit|ƒƒ}|tjo3|iiiddƒ\}|id|_|Snya|i||||ƒ\ }} }}}}}}}}}}}t it i@o t idƒWnrt'i(j oc}|i)d ƒoFt it i@ot id |ƒ|i*||i+|d ƒ|ƒn|SnXt it i@ot id |i,ƒƒ|tjot it i@ot id |ƒ|i-||ƒ} | tjoD|iiid dƒ\}|id|_hdd<d|i0<d|i<}t it i@o t idƒy=|i1||| |||||||||ƒ \}} } Wn>t'i(j o/}t it i@ot id|ƒ|SnXy|i5i6| || ƒWnt j onXt it i@o t idƒ|Sqû|tj o||f|i7|= len(componentType): raise PyAsn1Error( 'Component type error out of range' ) t = componentType[idx].getType() if not t.getTagSet().isSuperTagSetOf(value.getTagSet()): raise PyAsn1Error('Component type error %s vs %s' % (repr(t), repr(value))) class SimpleSyntax(TypeCoercionHackMixIn, univ.Choice): componentType = namedtype.NamedTypes( namedtype.NamedType('number', univ.Integer()), namedtype.NamedType('string', univ.OctetString()), namedtype.NamedType('object', univ.ObjectIdentifier()), namedtype.NamedType('empty', univ.Null()) ) class ApplicationSyntax(TypeCoercionHackMixIn, univ.Choice): componentType = namedtype.NamedTypes( namedtype.NamedType('address', NetworkAddress()), namedtype.NamedType('counter', Counter()), namedtype.NamedType('gauge', Gauge()), namedtype.NamedType('ticks', TimeTicks()), namedtype.NamedType('arbitrary', Opaque()) ) class ObjectSyntax(univ.Choice): componentType = namedtype.NamedTypes( namedtype.NamedType('simple', SimpleSyntax()), namedtype.NamedType('application-wide', ApplicationSyntax()) ) PK¶Ö2‰DõKŒ Œ pysnmp/proto/rfc1157.pyfrom pyasn1.type import univ, tag, namedtype, namedval from pysnmp.proto import rfc1155 class VarBind(univ.Sequence): componentType = namedtype.NamedTypes( namedtype.NamedType('name', rfc1155.ObjectName()), namedtype.NamedType('value', rfc1155.ObjectSyntax()) ) class VarBindList(univ.SequenceOf): componentType = VarBind() class _RequestBase(univ.Sequence): componentType = namedtype.NamedTypes( namedtype.NamedType('request-id', univ.Integer()), namedtype.NamedType('error-status', univ.Integer(namedValues=namedval.NamedValues(('noError', 0), ('tooBig', 1), ('noSuchName', 2), ('badValue', 3), ('readOnly', 4), ('genErr', 5)))), namedtype.NamedType('error-index', univ.Integer()), namedtype.NamedType('variable-bindings', VarBindList()) ) class GetRequestPDU(_RequestBase): tagSet = _RequestBase.tagSet.tagImplicitly( tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0) ) class GetNextRequestPDU(_RequestBase): tagSet = _RequestBase.tagSet.tagImplicitly( tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1) ) class GetResponsePDU(_RequestBase): tagSet = _RequestBase.tagSet.tagImplicitly( tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 2) ) class SetRequestPDU(_RequestBase): tagSet = _RequestBase.tagSet.tagImplicitly( tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 3) ) class TrapPDU(univ.Sequence): tagSet = univ.Sequence.tagSet.tagImplicitly( tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 4) ) componentType = namedtype.NamedTypes( namedtype.NamedType('enterprise', univ.ObjectIdentifier()), namedtype.NamedType('agent-addr', rfc1155.NetworkAddress()), namedtype.NamedType('generic-trap', univ.Integer().clone(namedValues=namedval.NamedValues(('coldStart', 0), ('warmStart', 1), ('linkDown', 2), ('linkUp', 3), ('authenticationFailure', 4), ('egpNeighborLoss', 5), ('enterpriseSpecific', 6)))), namedtype.NamedType('specific-trap', univ.Integer()), namedtype.NamedType('time-stamp', rfc1155.TimeTicks()), namedtype.NamedType('variable-bindings', VarBindList()) ) class PDUs(univ.Choice): componentType = namedtype.NamedTypes( namedtype.NamedType('get-request', GetRequestPDU()), namedtype.NamedType('get-next-request', GetNextRequestPDU()), namedtype.NamedType('get-response', GetResponsePDU()), namedtype.NamedType('set-request', SetRequestPDU()), namedtype.NamedType('trap', TrapPDU()) ) class Message(univ.Sequence): componentType = namedtype.NamedTypes( namedtype.NamedType('version', univ.Integer(namedValues = namedval.NamedValues(('version-1', 0)))), namedtype.NamedType('community', univ.OctetString()), namedtype.NamedType('data', PDUs()) ) PK†£= ¦2ÉQQpysnmp/proto/__init__.pyc;ò 鯔Ac@s dZdS(s· SNMP framework for Python. The pysnmp.proto sub-package implements various SNMP protocols. Copyright 1999-2004 by Ilya Etingof . See LICENSE for details. N(s__doc__(((s3build/bdist.linux-i686/egg/pysnmp/proto/__init__.pys?sPK†£=Ðð‡Ÿ²²pysnmp/proto/rfc1155.pyc;ò  GLc@skdkZdklZlZlZlZdklZdkl Z d„Z d„Z dei fd„ƒYZ deifd „ƒYZd eifd „ƒYZd eifd „ƒYZdeifd„ƒYZdei fd„ƒYZdeifd„ƒYZdfd„ƒYZdeeifd„ƒYZdeeifd„ƒYZdeifd„ƒYZdS(N(sunivstags constraints namedtype(s PyAsn1Error(serrorcCsÈt|ƒdjo|Snyti|dƒ}Wntid|ƒ‚nXt|ƒdjotid|ƒ‚ny td„td„|ƒƒSWn)ti j otid|ƒ‚nXdS(Nis.sBad IP address syntax %scCs||S(N(sxsy(sxsy((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1155.pysscCstti|ƒƒS(N(schrsstringsatoisx(sx((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1155.pysssBad IP address value %s( slensvaluesstringssplitspackedserrors ProtocolErrorsreducesmaps atoi_error(svaluespacked((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1155.pysipAddressPrettyIns cCsO|o@dt|dƒt|dƒt|dƒt|dƒfSndSdS(Ns %d.%d.%d.%diiiis(svaluesord(svalue((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1155.pysipAddressPrettyOuts@s IpAddresscBs`tZeiiieieiei dƒƒZeii e i ddƒZ d„Z d„ZRS(NiicCst|ƒSdS(N(sipAddressPrettyInsvalue(sselfsvalue((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1155.pysprettyIn-scCst|ƒSdS(N(sipAddressPrettyOutsvalue(sselfsvalue((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1155.pys prettyOut.s(s__name__s __module__sunivs OctetStringstagSets tagImplicitlystagsTagstagClassApplicationstagFormatSimples subtypeSpecs constraintsValueSizeConstraintsprettyIns prettyOut(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1155.pys IpAddress%s* sCountercBsNtZeiiieieiei dƒƒZeii e i ddƒZ RS(Niilÿÿ( s__name__s __module__sunivsIntegerstagSets tagImplicitlystagsTagstagClassApplicationstagFormatSimples subtypeSpecs constraintsValueRangeConstraint(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1155.pysCounter0s*sNetworkAddresscBs&tZeieideƒƒƒZRS(Nsinternet(s__name__s __module__s namedtypes NamedTypess NamedTypes IpAddresss componentType(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1155.pysNetworkAddress8ssGaugecBsNtZeiiieieiei dƒƒZeii e i ddƒZ RS(Niilÿÿ( s__name__s __module__sunivsIntegerstagSets tagImplicitlystagsTagstagClassApplicationstagFormatSimples subtypeSpecs constraintsValueRangeConstraint(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1155.pysGauge=s*s TimeTickscBsNtZeiiieieiei dƒƒZeii e i ddƒZ RS(Niilÿÿ( s__name__s __module__sunivsIntegerstagSets tagImplicitlystagsTagstagClassApplicationstagFormatSimples subtypeSpecs constraintsValueRangeConstraint(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1155.pys TimeTicksEs*sOpaquecBs2tZeiiieieiei dƒƒZRS(Ni( s__name__s __module__sunivs OctetStringstagSets tagImplicitlystagsTagstagClassApplicationstagFormatSimple(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1155.pysOpaqueMss ObjectNamecBstZRS(N(s__name__s __module__(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1155.pys ObjectNameRssTypeCoercionHackMixIncBstZd„ZRS(NcCsŽ|i}|oz|t|ƒjotdƒ‚n||iƒ}|iƒi |iƒƒ o&tdt |ƒt |ƒfƒ‚qŠndS(Ns!Component type error out of rangesComponent type error %s vs %s( sselfs_componentTypes componentTypesidxslens PyAsn1ErrorsgetTypests getTagSetsisSuperTagSetOfsvaluesrepr(sselfsidxsvalues componentTypest((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1155.pys_verifyComponentWs (s__name__s __module__s_verifyComponent(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1155.pysTypeCoercionHackMixInTss SimpleSyntaxcBshtZeieideiƒƒeideiƒƒeideiƒƒeidei ƒƒƒZ RS(Nsnumbersstringsobjectsempty( s__name__s __module__s namedtypes NamedTypess NamedTypesunivsIntegers OctetStringsObjectIdentifiersNulls componentType(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1155.pys SimpleSyntaxcssApplicationSyntaxcBsntZeieideƒƒeideƒƒeideƒƒeideƒƒeide ƒƒƒZ RS(Nsaddressscountersgaugestickss arbitrary( s__name__s __module__s namedtypes NamedTypess NamedTypesNetworkAddresssCountersGauges TimeTickssOpaques componentType(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1155.pysApplicationSyntaxks s ObjectSyntaxcBs8tZeieideƒƒeideƒƒƒZRS(Nssimplesapplication-wide(s__name__s __module__s namedtypes NamedTypess NamedTypes SimpleSyntaxsApplicationSyntaxs componentType(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1155.pys ObjectSyntaxts(sstrings pyasn1.typesunivstags constraints namedtypes pyasn1.errors PyAsn1Errors pysnmp.protoserrorsipAddressPrettyInsipAddressPrettyOuts OctetStrings IpAddresssIntegersCountersChoicesNetworkAddresssGauges TimeTickssOpaquesObjectIdentifiers ObjectNamesTypeCoercionHackMixIns SimpleSyntaxsApplicationSyntaxs ObjectSyntax(s SimpleSyntaxsNetworkAddresssstrings ObjectNames constraints IpAddresss TimeTickssCounterstagsipAddressPrettyOuts ObjectSyntaxsApplicationSyntaxs PyAsn1ErrorsGauges namedtypeserrorsOpaquesipAddressPrettyInsTypeCoercionHackMixInsuniv((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1155.pys?s       PK†£=èsÀ°D.D.pysnmp/proto/rfc1902.pyc;ò «ÍÉEc@sÑdkZdkZdklZlZlZlZlZdkl Z l Z dei fd„ƒYZ dei fd„ƒYZ dei fd„ƒYZ d ei fd „ƒYZd ei fd „ƒYZd ei fd„ƒYZdei fd„ƒYZdei fd„ƒYZdei fd„ƒYZdei fd„ƒYZdei fd„ƒYZdeifd„ƒYZde ieifd„ƒYZde ieifd„ƒYZdeifd „ƒYZdS(!N(sunivstags constraints namedtypesnamedval(srfc1155serrorsIntegercBs$tZeiieiddƒZRS(Nlýÿÿÿlÿÿ(s__name__s __module__sunivsIntegers subtypeSpecs constraintsValueRangeConstraint(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pysIntegerss Integer32cBs$tZeiieiddƒZRS(Nlýÿÿÿlÿÿ(s__name__s __module__sunivsIntegers subtypeSpecs constraintsValueRangeConstraint(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pys Integer32 ss OctetStringcBsEtZeiieiddƒZeZd„Z d„Z d„Z RS(NiiÿÿcCs||_|SdS(N(svaluesselfs fixedLength(sselfsvalue((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pyssetFixedLengths cCs|itj SdS(N(sselfs fixedLengthsNone(sself((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pys isFixedLengthscCs |iSdS(N(sselfs fixedLength(sself((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pysgetFixedLength!s( s__name__s __module__sunivsIntegers subtypeSpecs constraintsValueSizeConstraintsNones fixedLengthssetFixedLengths isFixedLengthsgetFixedLength(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pys OctetStrings   s IpAddresscBsftZeiiieieiei dƒƒZeii e i ddƒZ dZ d„Zd„ZRS(NiicCsti|ƒSdS(N(srfc1155sipAddressPrettyInsvalue(sselfsvalue((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pysprettyIn,scCsti|ƒSdS(N(srfc1155sipAddressPrettyOutsvalue(sselfsvalue((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pys prettyOut-s(s__name__s __module__sunivs OctetStringstagSets tagImplicitlystagsTagstagClassApplicationstagFormatSimples subtypeSpecs constraintsValueSizeConstraints fixedLengthsprettyIns prettyOut(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pys IpAddress$s * s Counter32cBsNtZeiiieieiei dƒƒZeii e i ddƒZ RS(Niilÿÿ( s__name__s __module__sunivsIntegerstagSets tagImplicitlystagsTagstagClassApplicationstagFormatSimples subtypeSpecs constraintsValueRangeConstraint(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pys Counter32/s*sGauge32cBsNtZeiiieieiei dƒƒZeii e i ddƒZ RS(Niilÿÿ( s__name__s __module__sunivsIntegerstagSets tagImplicitlystagsTagstagClassApplicationstagFormatSimples subtypeSpecs constraintsValueRangeConstraint(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pysGauge327s*s Unsigned32cBsNtZeiiieieiei dƒƒZeii e i ddƒZ RS(Niilÿÿ( s__name__s __module__sunivsIntegerstagSets tagImplicitlystagsTagstagClassApplicationstagFormatSimples subtypeSpecs constraintsValueRangeConstraint(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pys Unsigned32?s*s TimeTickscBsNtZeiiieieiei dƒƒZeii e i ddƒZ RS(Niilÿÿ( s__name__s __module__sunivsIntegerstagSets tagImplicitlystagsTagstagClassApplicationstagFormatSimples subtypeSpecs constraintsValueRangeConstraint(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pys TimeTicksGs*sOpaquecBs2tZeiiieieiei dƒƒZRS(Ni( s__name__s __module__sunivs OctetStringstagSets tagImplicitlystagsTagstagClassApplicationstagFormatSimple(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pysOpaqueOss Counter64cBsNtZeiiieieiei dƒƒZeii e i ddƒZ RS(Niilÿÿÿÿ( s__name__s __module__sunivsIntegerstagSets tagImplicitlystagsTagstagClassApplicationstagFormatSimples subtypeSpecs constraintsValueRangeConstraint(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pys Counter64Ts*sBitscBshtZeiƒZeeeed„Zd„Zd„Zeeeed„Z eeeeed„Z RS(NcCsC|tjo|i|_n ||_tii||||ƒdS(N( s namedValuessNonesselfs_Bits__namedValuessunivs OctetStrings__init__svaluestagSets subtypeSpec(sselfsvaluestagSets subtypeSpecs namedValues((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pys__init__^s  cCsÿt|ƒtitifjot|ƒSng}x¬|D]¤}|i i |ƒ}|t jot id|ƒ‚nt|dƒ\}}|t|ƒjo&|idg|t|ƒdƒn||dd|>B||vs(stypesbitsstypess TupleTypesListTypesstrsoctetssbitsselfs_Bits__namedValuessgetValuesvsNoneserrors ProtocolErrorsdivmodsdsmslensextendsstringsjoinsmap(sselfsbitssdsmsoctetssvsbit((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pysprettyInhs &cCsg}tttt|ƒƒƒ}d}x¹|t|ƒjo¥t ||ƒ}d}x~|djop|d|>@oS|i i|dd|ƒ}|tjotid|ƒ‚n|i|ƒn|d}qVW|d}q*Wtitd„|ƒdƒSdS(NiiiisUnknown named value %scCs t|ƒS(N(sstrsx(sx((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pys‰ss, (snamesstuplesmapsNonesstrsvaluesoctetssislensordsvsjsselfs_Bits__namedValuessgetNamesnameserrors ProtocolErrorsappendsstringsjoin(sselfsvaluesnamesisjsoctetssnamessv((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pys prettyOutxs"  cCs¾|tjo$|tjo|tjo |tjo|Sn|tjo |i}n|tjo |i}n|tjo |i}n|tjo |i }n|i ||||ƒSdS(N( svaluesNonestagSets subtypeSpecs namedValuessselfs_values_tagSets _subtypeSpecs_Bits__namedValuess __class__(sselfsvaluestagSets subtypeSpecs namedValues((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pysclone‹s4        cCsÑ|tjo |i}n|tj o|ii|ƒ}n-|tj o|ii |ƒ}n |i}|tjo |i }n||i }|tjo |i }n||i }|i||||ƒSdS(N(svaluesNonesselfs_values implicitTags_tagSets tagImplicitlystagSets explicitTags tagExplicitlys subtypeSpecs _subtypeSpecs namedValuess_Bits__namedValuess __class__(sselfsvalues implicitTags explicitTags subtypeSpecs namedValuesstagSet((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pyssubtypešs           ( s__name__s __module__snamedvals NamedValuess namedValuessNones__init__sprettyIns prettyOutsclonessubtype(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pysBits\s    s ObjectNamecBstZRS(N(s__name__s __module__(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pys ObjectName®ss SimpleSyntaxcBsMtZeieideƒƒeideƒƒeideiƒƒƒZ RS(Ns integer-values string-valuesobjectID-value( s__name__s __module__s namedtypes NamedTypess NamedTypesIntegers OctetStringsunivsObjectIdentifiers componentType(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pys SimpleSyntax°ssApplicationSyntaxc Bs€tZeieideƒƒeideƒƒeideƒƒeideƒƒeide ƒƒeide ƒƒƒZ RS(NsipAddress-values counter-valuestimeticks-valuesarbitrary-valuesbig-counter-values gauge32-value( s__name__s __module__s namedtypes NamedTypess NamedTypes IpAddresss Counter32s TimeTickssOpaques Counter64sGauge32s componentType(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pysApplicationSyntax·s s ObjectSyntaxcBs8tZeieideƒƒeideƒƒƒZRS(Nssimplesapplication-wide(s__name__s __module__s namedtypes NamedTypess NamedTypes SimpleSyntaxsApplicationSyntaxs componentType(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pys ObjectSyntaxÃs(stypessstrings pyasn1.typesunivstags constraints namedtypesnamedvals pysnmp.protosrfc1155serrorsIntegers Integer32s OctetStrings IpAddresss Counter32sGauge32s Unsigned32s TimeTickssOpaques Counter64sBitssObjectIdentifiers ObjectNamesTypeCoercionHackMixInsChoices SimpleSyntaxsApplicationSyntaxs ObjectSyntax(sOpaques TimeTicksstags namedtypes IpAddresssBitssrfc1155sIntegersnamedvals OctetStringsstrings Counter64s Unsigned32sApplicationSyntaxsGauge32sunivs ObjectSyntaxstypess Integer32s ObjectNames constraints SimpleSyntaxserrors Counter32((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pys?s$  % R PK†£=þ P pysnmp/proto/acmod/rfc3415.pyc;ò KúþDc@sXdklZdklZdklZdZdddddd d d gZd „Zd S((sNoSuchObjectError(serror(sdebugii€i@i iiiiicCs|ii} titi@otid||fƒ| ii ddƒ\}|i |ƒ}y$|i|idf|ƒi}Wn%tj otiddƒ‚nX| ii ddƒ\} | i ||ƒ}y$| i| idf|ƒi} Wn%tj otidd ƒ‚nX| ii dd ƒ\}|i | |||ƒ}|d jo|id f|}n^|d jo|idf|}n9|djo|idf|}ntid|ƒ‚y|i|ƒi}Wn%tj otiddƒ‚nXt|ƒ otiddƒ‚n| ii ddƒ\}|i |ƒ}|idf|}}|idf|}x‰no|i#|ƒ} |i#|ƒ} | i}| i}||t|ƒ jotiddƒ‚nt| iƒ}|t|ƒjoqŽn| ioÂg}x?t(t)t*| iƒƒD]%}|t(t,|ƒd„t-ƒ}q=Wt|ƒd}|d}xK|oC||jp ||o| i|||joPn|d}qƒW|oqŽqûn| i|| joqŽntiddƒSqŽWdS(Ns0isAccessAllowed: viewType %s for variableName %ssSNMP-VIEW-BASED-ACM-MIBsvacmContextEntryiserrorIndications noSuchContextsvacmSecurityToGroupEntryis noGroupNamesvacmAccessEntrysreadiswriteisnotifyisUnknown view type %ss noAccessEntrys noSuchViewsvacmViewTreeFamilyEntryis notInViewcCs||@S(N(sbsc(sbsc((s8build/bdist.linux-i686/egg/pysnmp/proto/acmod/rfc3415.pysdss accessAllowed(0s snmpEngines msgAndPduDspsmibInstrumControllersdebugsloggersflagACLsviewTypes variableNames mibBuilders importSymbolssvacmContextEntrysgetInstIdFromIndicess contextNamestblIdxsgetNodesnamessyntaxsvacmContextNamesNoSuchObjectErrorserrorsStatusInformationsvacmSecurityToGroupEntrys securityModels securityNames vacmGroupNamesvacmAccessEntrys securityLevelsentryIdxs ProtocolErrorsviewNameslensvacmViewTreeFamilyEntrysinitialTreeNamestreeNamesmaskNames getNextNodesvacmViewTreeFamilySubtreesvacmViewTreeFamilyMaskslsmasksmapsNonesstrscsords __powOfTwoSeqsmsidx(s snmpEngines securityModels securityNames securityLevelsviewTypes contextNames variableNamestreeNamesmaskNamesvacmSecurityToGroupEntrys vacmGroupNamesvacmViewTreeFamilySubtreesmibInstrumControllersvacmViewTreeFamilyMasksentryIdxsvacmAccessEntrysviewNamesvacmViewTreeFamilyEntrysmsvacmContextNamescsidxsmaskslstblIdxsinitialTreeNamesvacmContextEntry((s8build/bdist.linux-i686/egg/pysnmp/proto/acmod/rfc3415.pysisAccessAllowed sz ($$      # 0 N( spysnmp.smi.errorsNoSuchObjectErrors pysnmp.protoserrorspysnmpsdebugs accessModelIDs __powOfTwoSeqsisAccessAllowed(sisAccessAllowedsNoSuchObjectErrorserrorsdebugs __powOfTwoSeqs accessModelID((s8build/bdist.linux-i686/egg/pysnmp/proto/acmod/rfc3415.pys?s   PKÄsÎ2pysnmp/proto/acmod/__init__.pyPK†£=÷e™ pysnmp/proto/acmod/void.pyc;ò îCöLc@s-dklZdklZdZd„ZdS((sNoSuchObjectError(serroricCs<titi@otid||fƒtiddƒSdS(Ns5isAccessAllowed: viewType %s for variableName %s - OKserrorIndications accessAllowed(sdebugsloggersflagACLsviewTypes variableNameserrorsStatusInformation(s snmpEngines securityModels securityNames securityLevelsviewTypes contextNames variableName((s5build/bdist.linux-i686/egg/pysnmp/proto/acmod/void.pysisAccessAlloweds (N(spysnmp.smi.errorsNoSuchObjectErrors pysnmp.protoserrors accessModelIDsisAccessAllowed(s accessModelIDsNoSuchObjectErrorsisAccessAllowedserror((s5build/bdist.linux-i686/egg/pysnmp/proto/acmod/void.pys?s  PK†£=·Ò‰‰pysnmp/proto/acmod/__init__.pyc;ò ±±®Bc@sdS(N((((s9build/bdist.linux-i686/egg/pysnmp/proto/acmod/__init__.pys?sPK7¥&51F„==pysnmp/proto/acmod/rfc3415.py# View-based Access Control Model from pysnmp.smi.error import NoSuchObjectError from pysnmp.proto import error from pysnmp import debug accessModelID = 3 __powOfTwoSeq = [128, 64, 32, 16, 8, 4, 2, 1] # 3.2 def isAccessAllowed( snmpEngine, securityModel, securityName, securityLevel, viewType, contextName, variableName): mibInstrumController = snmpEngine.msgAndPduDsp.mibInstrumController debug.logger & debug.flagACL and debug.logger('isAccessAllowed: viewType %s for variableName %s' % (viewType, variableName)) # 3.2.1 vacmContextEntry, = mibInstrumController.mibBuilder.importSymbols('SNMP-VIEW-BASED-ACM-MIB', 'vacmContextEntry') tblIdx = vacmContextEntry.getInstIdFromIndices(contextName) try: vacmContextName = vacmContextEntry.getNode( vacmContextEntry.name + (1,) + tblIdx ).syntax except NoSuchObjectError: raise error.StatusInformation(errorIndication='noSuchContext') # 3.2.2 vacmSecurityToGroupEntry, = mibInstrumController.mibBuilder.importSymbols( 'SNMP-VIEW-BASED-ACM-MIB', 'vacmSecurityToGroupEntry' ) tblIdx = vacmSecurityToGroupEntry.getInstIdFromIndices( securityModel, securityName ) try: vacmGroupName = vacmSecurityToGroupEntry.getNode( vacmSecurityToGroupEntry.name + (3,) + tblIdx ).syntax except NoSuchObjectError: raise error.StatusInformation(errorIndication='noGroupName') # 3.2.3 vacmAccessEntry, = mibInstrumController.mibBuilder.importSymbols( 'SNMP-VIEW-BASED-ACM-MIB', 'vacmAccessEntry' ) # XXX partial context name match tblIdx = vacmAccessEntry.getInstIdFromIndices( vacmGroupName, contextName, securityModel, securityLevel ) # 3.2.4 if viewType == 'read': entryIdx = vacmAccessEntry.name + (5,) + tblIdx elif viewType == 'write': entryIdx = vacmAccessEntry.name + (6,) + tblIdx elif viewType == 'notify': entryIdx = vacmAccessEntry.name + (7,) + tblIdx else: raise error.ProtocolError('Unknown view type %s' % viewType) try: viewName = vacmAccessEntry.getNode(entryIdx).syntax except NoSuchObjectError: raise error.StatusInformation(errorIndication='noAccessEntry') if not len(viewName): raise error.StatusInformation(errorIndication='noSuchView') # XXX split onto object & instance ? # 3.2.5a vacmViewTreeFamilyEntry, = mibInstrumController.mibBuilder.importSymbols('SNMP-VIEW-BASED-ACM-MIB', 'vacmViewTreeFamilyEntry') tblIdx = vacmViewTreeFamilyEntry.getInstIdFromIndices(viewName) # Walk over entries initialTreeName = treeName = vacmViewTreeFamilyEntry.name + (2,) + tblIdx maskName = vacmViewTreeFamilyEntry.name + (3,) + tblIdx while 1: vacmViewTreeFamilySubtree = vacmViewTreeFamilyEntry.getNextNode( treeName ) vacmViewTreeFamilyMask = vacmViewTreeFamilyEntry.getNextNode( maskName ) treeName = vacmViewTreeFamilySubtree.name maskName = vacmViewTreeFamilyMask.name if initialTreeName != treeName[:len(initialTreeName)]: # 3.2.5b raise error.StatusInformation(errorIndication='notInView') l = len(vacmViewTreeFamilySubtree.syntax) if l > len(variableName): continue if vacmViewTreeFamilyMask.syntax: mask = [] for c in map(None, str(vacmViewTreeFamilyMask.syntax)): mask = mask + map(lambda b,c=ord(c): b&c, __powOfTwoSeq) m = len(mask)-1 idx = l-1 while idx: if idx > m or mask[idx] and \ vacmViewTreeFamilySubtree.syntax[idx] != variableName[idx]: break idx = idx - 1 if idx: continue # no match else: # no mask if vacmViewTreeFamilySubtree.syntax != variableName[:l]: continue # no match # 3.2.5c return error.StatusInformation(errorIndication='accessAllowed') PKõ}=ÓiÕüüpysnmp/proto/acmod/void.py# Void Access Control Model from pysnmp.smi.error import NoSuchObjectError from pysnmp.proto import error accessModelID = 0 # rfc3415 3.2 def isAccessAllowed( snmpEngine, securityModel, securityName, securityLevel, viewType, contextName, variableName): debug.logger & debug.flagACL and debug.logger('isAccessAllowed: viewType %s for variableName %s - OK' % (viewType, variableName)) # rfc3415 3.2.5c return error.StatusInformation(errorIndication='accessAllowed') PKauÎ2pysnmp/proto/mpmod/__init__.pyPK†£=CnõÊ{{pysnmp/proto/mpmod/base.pyc;ò WÇ Lc@s$dklZdfd„ƒYZdS((serrorsAbstractMessageProcessingModelcBs–tZeZdZZd„Zd„Zd„Zd„Z d„Z d„Z d„Z d „Z d „Zd „Zd „Zd „Zd„Zd„ZRS(NlcCs1h|_h|_h|_h|_d|_dS(Nl(sselfs+_AbstractMessageProcessingModel__msgIdIndexs4_AbstractMessageProcessingModel__stateReferenceIndexs1_AbstractMessageProcessingModel__sendPduHandleIdxs0_AbstractMessageProcessingModel__expirationQueues0_AbstractMessageProcessingModel__expirationTimer(sself((s5build/bdist.linux-i686/egg/pysnmp/proto/mpmod/base.pys__init__s     cCstidƒ‚dS(Nsmethod not implemented(serrors ProtocolError(sselfs snmpEnginestransportDomainstransportAddresssmessageProcessingModels securityModels securityNames securityLevelscontextEngineIds contextNames pduVersionspdusexpectResponses sendPduHandle((s5build/bdist.linux-i686/egg/pysnmp/proto/mpmod/base.pysprepareOutgoingMessagesc Cstidƒ‚dS(Nsmethod not implemented(serrors ProtocolError( sselfs snmpEnginesmessageProcessingModels securityModels securityNames securityLevelscontextEngineIds contextNames pduVersionspdusmaxSizeResponseScopedPDUsstateReferencesstatusInformation((s5build/bdist.linux-i686/egg/pysnmp/proto/mpmod/base.pysprepareResponseMessage!scCstidƒ‚dS(Nsmethod not implemented(serrors ProtocolError(sselfs snmpEnginestransportDomainstransportAddressswholeMsg((s5build/bdist.linux-i686/egg/pysnmp/proto/mpmod/base.pysprepareDataElements2scCstidt_|iSdS(Ni(sAbstractMessageProcessingModels/_AbstractMessageProcessingModel__stateReferencesself(sself((s5build/bdist.linux-i686/egg/pysnmp/proto/mpmod/base.pys_newStateReference;scKs»|ii|ƒotid||fƒ‚n|id}||f|i|<|i i|ƒ oh|i | snmpEngineMaxMessageSize.syntax: raise error.StatusInformation(errorIndication='tooBig') # 7.1.9.c if rfc3411.confirmedClassPDUs.has_key(pdu.tagSet): # XXX rfc bug? why stateReference should be created? self._cachePushByMsgId( msgID, sendPduHandle=sendPduHandle, msgID=msgID, snmpEngineID=snmpEngineID, securityModel=securityModel, securityName=securityName, securityLevel=securityLevel, contextEngineId=contextEngineId, contextName=contextName, transportDomain=transportDomain, transportAddress=transportAddress ) return ( transportDomain, transportAddress, wholeMsg ) def prepareResponseMessage( self, snmpEngine, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, pdu, maxSizeResponseScopedPDU, stateReference, statusInformation ): snmpEngineID, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-FRAMEWORK-MIB', 'snmpEngineID') snmpEngineID = snmpEngineID.syntax # 7.1.2.b cachedParams = self._cachePopByStateRef(stateReference) msgID = cachedParams['msgID'] contextEngineId = cachedParams['contextEngineId'] contextName = cachedParams['contextName'] securityModel = cachedParams['securityModel'] securityName = cachedParams['securityName'] securityLevel = cachedParams['securityLevel'] securityStateReference = cachedParams['securityStateReference'] reportableFlag = cachedParams['reportableFlag'] maxMessageSize = cachedParams['msgMaxSize'] transportDomain = cachedParams['transportDomain'] transportAddress = cachedParams['transportAddress'] debug.logger & debug.flagMP and debug.logger('prepareResponseMessage: stateReference %s' % (stateReference)) # 7.1.3 if statusInformation is not None and statusInformation.has_key('oid'): # 7.1.3a if pdu is not None: requestID = pdu.getComponentByPosition(0) pduType = pdu.tagSet else: pduType = None # 7.1.3b if pdu is None and not reportableFlag or \ pduType is not None and \ not rfc3411.confirmedClassPDUs.has_key(pduType): raise error.StatusInformation( errorIndication = 'loopTerminated' ) # 7.1.3c reportPDU = rfc1905.ReportPDU() pMod.apiPDU.setVarBinds( reportPDU, ((statusInformation['oid'], statusInformation['val']),) ) pMod.apiPDU.setErrorStatus(reportPDU, 0) pMod.apiPDU.setErrorIndex(reportPDU, 0) if pdu is None: pMod.apiPDU.setRequestID(reportPDU, 0) else: pMod.apiPDU.setRequestID(reportPDU, requestID) # 7.1.3d.1 if statusInformation.has_key('securityLevel'): securityLevel = statusInformation['securityLevel'] else: securityLevel = 1 # 7.1.3d.2 if statusInformation.has_key('contextEngineId'): contextEngineId = statusInformation['contextEngineId'] else: contextEngineId = snmpEngineID # 7.1.3d.3 if statusInformation.has_key('contextName'): contextName = statusInformation['contextName'] else: contextName = "" # 7.1.3e pdu = reportPDU debug.logger & debug.flagMP and debug.logger('prepareResponseMessage: prepare report PDU for statusInformation %s' % statusInformation) # 7.1.4 if not contextEngineId: contextEngineId = snmpEngineID # XXX impl-dep manner # 7.1.5 if not contextName: contextName = '' debug.logger & debug.flagMP and debug.logger('prepareResponseMessage: using contextEngineId %s, contextName %s' % (repr(contextEngineId), contextName)) # 7.1.6 scopedPDU = ScopedPDU() scopedPDU.setComponentByPosition(0, contextEngineId) scopedPDU.setComponentByPosition(1, contextName) scopedPDU.setComponentByPosition(2) scopedPDU.getComponentByPosition(2).setComponentByType( pdu.tagSet, pdu ) # 7.1.7 msg = SNMPv3Message() # 7.1.7a msg.setComponentByPosition(0, 3) # version headerData = msg.setComponentByPosition(1).getComponentByPosition(1) # 7.1.7b headerData.setComponentByPosition(0, msgID) snmpEngineMaxMessageSize, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-FRAMEWORK-MIB', 'snmpEngineMaxMessageSize') # 7.1.7c # XXX need to coerce MIB value as it has incompatible constraints set headerData.setComponentByPosition(1, int(snmpEngineMaxMessageSize.syntax)) # 7.1.7d msgFlags = 0 if securityLevel == 1: pass elif securityLevel == 2: msgFlags = msgFlags | 0x01 elif securityLevel == 3: msgFlags = msgFlags | 0x03 else: raise error.ProtocolError( 'Unknown securityLevel %s' % securityLevel ) if rfc3411.confirmedClassPDUs.has_key(pdu.tagSet): # XXX not needed? msgFlags = msgFlags | 0x04 headerData.setComponentByPosition(2, chr(msgFlags)) # 7.1.7e headerData.setComponentByPosition(3, securityModel) debug.logger & debug.flagMP and debug.logger('prepareResponseMessage: %s' % (msg.prettyPrint(),)) smHandler = snmpEngine.securityModels.get(securityModel) if smHandler is None: raise error.StatusInformation( errorIndication = 'unsupportedSecurityModel' ) # 7.1.8a try: ( securityParameters, wholeMsg ) = smHandler.generateResponseMsg( snmpEngine, self.messageProcessingModelID, msg, snmpEngineMaxMessageSize.syntax, securityModel, snmpEngineID, securityName, securityLevel, scopedPDU, securityStateReference ) except error.StatusInformation, statusInformation: # 7.1.8.b raise debug.logger & debug.flagMP and debug.logger('prepareResponseMessage: SM finished') # Message size constraint verification if len(wholeMsg) > min(snmpEngineMaxMessageSize.syntax, maxMessageSize): raise error.StatusInformation(errorIndication='tooBig') return ( transportDomain, transportAddress, wholeMsg ) # 7.2.1 def prepareDataElements( self, snmpEngine, transportDomain, transportAddress, wholeMsg ): # 7.2.2 try: msg, restOfwholeMsg = decoder.decode( wholeMsg, asn1Spec=self._snmpMsgSpec ) except PyAsn1Error: snmpInASNParseErrs, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMPv2-MIB', 'snmpInASNParseErrs') snmpInASNParseErrs.syntax = snmpInASNParseErrs.syntax + 1 raise error.StatusInformation( errorIndication = 'parseError' ) debug.logger & debug.flagMP and debug.logger('prepareDataElements: %s' % (msg.prettyPrint(),)) # 7.2.3 headerData = msg.getComponentByPosition(1) msgVersion = messageProcessingModel = msg.getComponentByPosition(0) msgID = headerData.getComponentByPosition(0) msgFlags = ord(str(headerData.getComponentByPosition(2))) maxMessageSize = headerData.getComponentByPosition(1) securityModel = headerData.getComponentByPosition(3) securityParameters = msg.getComponentByPosition(2) debug.logger & debug.flagMP and debug.logger('prepareDataElements: msg data msgVersion %s msgID %s securityModel %s' % (msgVersion, msgID, securityModel)) # 7.2.4 if not snmpEngine.securityModels.has_key(securityModel): snmpUnknownSecurityModels, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMPv2-MIB', 'snmpUnknownSecurityModels') snmpUnknownSecurityModels.syntax = snmpUnknownSecurityModels.syntax + 1 raise error.StatusInformation( errorIndication = 'unsupportedSecurityModel' ) # 7.2.5 if msgFlags & 0x03 == 0x00: securityLevel = 1 elif (msgFlags & 0x03) == 0x01: securityLevel = 2 elif (msgFlags & 0x03) == 0x03: securityLevel = 3 else: snmpInvalidMsgs = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMPv2-MIB', 'snmpInvalidMsgs') snmpInvalidMsgs.syntax = snmpInvalidMsgs.syntax + 1 raise error.StatusInformation( errorIndication = 'invalidMsg' ) if msgFlags & 0x04: reportableFlag = 1 else: reportableFlag = 0 # 7.2.6 smHandler = snmpEngine.securityModels[securityModel] try: ( securityEngineID, securityName, scopedPDU, maxSizeResponseScopedPDU, securityStateReference ) = smHandler.processIncomingMsg( snmpEngine, messageProcessingModel, maxMessageSize, securityParameters, securityModel, securityLevel, wholeMsg, msg ) debug.logger & debug.flagMP and debug.logger('prepareDataElements: SM succeeded') except error.StatusInformation, statusInformation: debug.logger & debug.flagMP and debug.logger('prepareDataElements: SM failed, statusInformation %s' % statusInformation) if statusInformation.has_key('errorIndication'): # 7.2.6a if statusInformation.has_key('oid'): # 7.2.6a1 securityStateReference = statusInformation[ 'securityStateReference' ] contextEngineId = statusInformation['contextEngineId'] contextName = statusInformation['contextName'] scopedPDU = statusInformation.get('scopedPDU') if scopedPDU is not None: pdu = scopedPDU.getComponentByPosition(2).getComponent() else: pdu = None maxSizeResponseScopedPDU = statusInformation[ 'maxSizeResponseScopedPDU' ] securityName = None # XXX secmod cache used # 7.2.6a2 stateReference = self._newStateReference() self._cachePushByStateRef( stateReference, msgVersion=messageProcessingModel, msgID=msgID, contextEngineId=contextEngineId, contextName=contextName, securityModel=securityModel, securityName=securityName, securityLevel=securityLevel, securityStateReference=securityStateReference, reportableFlag=reportableFlag, msgMaxSize=maxMessageSize, maxSizeResponseScopedPDU=maxSizeResponseScopedPDU, transportDomain=transportDomain, transportAddress=transportAddress ) # 7.2.6a3 try: snmpEngine.msgAndPduDsp.returnResponsePdu( snmpEngine, 3, securityModel, securityName, securityLevel, contextEngineId, contextName, 1, pdu, maxSizeResponseScopedPDU, stateReference, statusInformation ) except error.StatusInformation: pass debug.logger & debug.flagMP and debug.logger('prepareDataElements: error reported') # 7.2.6b raise statusInformation else: # Sniff for engineIDs k = (transportDomain, transportAddress) if not self.__engineIDs.has_key(k): contextEngineId, contextName, pdu = scopedPDU self.__engineIDs[k] = { 'securityEngineID': securityEngineID, 'contextEngineId': contextEngineId, 'contextName': contextName } expireAt = self.__expirationTimer + 300 if not self.__engineIDsExpQueue.has_key(expireAt): self.__engineIDsExpQueue[expireAt] = [] self.__engineIDsExpQueue[expireAt].append(k) debug.logger & debug.flagMP and debug.logger('prepareDataElements: cache securityEngineID %s for %s %s' % (repr(securityEngineID), transportDomain, transportAddress)) snmpEngineID, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-FRAMEWORK-MIB', 'snmpEngineID') snmpEngineID = snmpEngineID.syntax # 7.2.7 XXX PDU would be parsed here? contextEngineId, contextName, pdu = scopedPDU pdu = pdu.getComponent() # PDUs # 7.2.8 pduVersion = api.protoVersion2c # 7.2.9 pduType = pdu.tagSet # 7.2.10 if rfc3411.responseClassPDUs.has_key(pduType) or \ rfc3411.internalClassPDUs.has_key(pduType): # 7.2.10a try: cachedReqParams = self._cachePopByMsgId(msgID) except error.ProtocolError: smHandler.releaseStateInformation(securityStateReference) raise error.StatusInformation( errorIndication = 'dataMismatch' ) # 7.2.10b sendPduHandle = cachedReqParams['sendPduHandle'] else: sendPduHandle = None debug.logger & debug.flagMP and debug.logger('prepareDataElements: using sendPduHandle %s for msgID %s' % (sendPduHandle, msgID)) # 7.2.11 if rfc3411.internalClassPDUs.has_key(pduType): # 7.2.11a varBinds = pMod.apiPDU.getVarBinds(pdu) if varBinds: statusInformation = error.StatusInformation( errorIndication=_snmpErrors.get( varBinds[0][0], 'errorReportReceived' ), oid=varBinds[0][0], val=varBinds[0][1], sendPduHandle=sendPduHandle ) # 7.2.11b (incomplete implementation) # 7.2.11c smHandler.releaseStateInformation(securityStateReference) # 7.2.11d stateReference = None # 7.2.11e XXX may need to pass Reports up to app in some cases... raise statusInformation statusInformation = None # no errors ahead # 7.2.12 if rfc3411.responseClassPDUs.has_key(pduType): # 7.2.12a -> noop # 7.2.12b if securityModel != cachedReqParams['securityModel'] or \ securityName != cachedReqParams['securityName'] or \ securityLevel != cachedReqParams['securityLevel'] or \ contextEngineId != cachedReqParams['contextEngineId'] or \ contextName != cachedReqParams['contextName']: smHandler.releaseStateInformation(securityStateReference) raise error.StatusInformation( errorIndication = 'dataMismatch' ) # 7.2.12c smHandler.releaseStateInformation(securityStateReference) stateReference = None # 7.2.12d return ( messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, pdu, pduType, sendPduHandle, maxSizeResponseScopedPDU, statusInformation, stateReference ) # 7.2.13 if rfc3411.confirmedClassPDUs.has_key(pduType): # 7.2.13a if securityEngineID != snmpEngineID: smHandler.releaseStateInformation(securityStateReference) raise error.StatusInformation( errorIndication = 'engineIDMismatch' ) # 7.2.13b stateReference = self._newStateReference() self._cachePushByStateRef( stateReference, msgVersion=messageProcessingModel, msgID=msgID, contextEngineId=contextEngineId, contextName=contextName, securityModel=securityModel, securityName=securityName, securityLevel=securityLevel, securityStateReference=securityStateReference, reportableFlag=reportableFlag, msgMaxSize=maxMessageSize, maxSizeResponseScopedPDU=maxSizeResponseScopedPDU, transportDomain=transportDomain, transportAddress=transportAddress ) debug.logger & debug.flagMP and debug.logger('prepareDataElements: new stateReference %s' % stateReference) # 7.2.13c return ( messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, pdu, pduType, sendPduHandle, maxSizeResponseScopedPDU, statusInformation, stateReference ) # 7.2.14 if rfc3411.unconfirmedClassPDUs.has_key(pduType): # Pass new stateReference to let app browse request details stateReference = self._newStateReference() # This is not specified explicitly in RFC smHandler.releaseStateInformation(securityStateReference) return ( messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, pdu, pduType, sendPduHandle, maxSizeResponseScopedPDU, statusInformation, stateReference ) smHandler.releaseStateInformation(securityStateReference) raise error.StatusInformation( errorIndication = 'unknownPDU' ) def __expireEnginesInfo(self): if self.__engineIDsExpQueue.has_key(self.__expirationTimer): for engineKey in self.__engineIDsExpQueue[self.__expirationTimer]: del self.__engineIDs[engineKey] debug.logger & debug.flagMP and debug.logger('__expireEnginesInfo: expiring %s' % (engineKey,)) del self.__engineIDsExpQueue[self.__expirationTimer] self.__expirationTimer = self.__expirationTimer + 1 def receiveTimerTick(self, snmpEngine, timeNow): self.__expireEnginesInfo() AbstractMessageProcessingModel.receiveTimerTick( self, snmpEngine, timeNow ) PK†£=Z ž?L?Lpysnmp/proto/mpmod/rfc3412.pyc;ò ©Œ—Lc @s dklZdklZdklZlZlZlZdk l Z l Z l Z dk lZdklZdklZeieiZde ifd„ƒYZd e ifd „ƒYZd e ifd „ƒYZd e ifd„ƒYZhdddddddddddf d<dddddddddddf d<dddddddddddf d<dddddddddddf d<dddddddddddf d<dddddddddddf ds snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolss snmpEngineIDssyntaxsselfs _newMsgIDsmsgIDsdebugsloggersflagMPs(_SnmpV3MessageProcessingModel__engineIDssgetstransportDomainstransportAddressspeerSnmpEngineDatascontextEngineIdsNones contextNamesreprs ScopedPDUs scopedPDUssetComponentByPositionsgetComponentByPositionssetComponentByTypespdustagSets SNMPv3Messagesmsgs headerDatassnmpEngineMaxMessageSizesintsmsgFlagss securityLevelserrors ProtocolErrorsrfc3411sconfirmedClassPDUsshas_keyschrs securityModels prettyPrintssecurityModelss smHandlersStatusInformationsunconfirmedClassPDUsssecurityEngineIDs securityNamesclonesemptyPduspModsapiPDUs setDefaultssgenerateRequestMsgsmessageProcessingModelIDssecurityParametersswholeMsgslens_cachePushByMsgIds sendPduHandle(sselfs snmpEnginestransportDomainstransportAddresssmessageProcessingModels securityModels securityNames securityLevelscontextEngineIds contextNames pduVersionspdusexpectResponses sendPduHandles smHandlers headerDatas scopedPDUssnmpEngineMaxMessageSizespeerSnmpEngineDatassecurityEngineIDsmsgssecurityParameterssmsgFlagssemptyPdusmsgIDswholeMsgs snmpEngineID((s8build/bdist.linux-i686/egg/pysnmp/proto/mpmod/rfc3412.pysprepareOutgoingMessage@s¤  "+     .      +       " "  c Cse|iiiiddƒ\}|i}|i| ƒ}|d}|d}|d}|d}|d}|d}|d }|d }|d }|d }|d } titi@otid| ƒ| tj o | idƒo | tj o| idƒ}| i}nt}| tjo| p|tj ot!i"i|ƒ ot#i$ddƒ‚nt%i&ƒ}t(i)i*|| d| dffƒt(i)i+|dƒt(i)i,|dƒ| tjot(i)i-|dƒnt(i)i-||ƒ| idƒo| d}nd}| idƒo| d}n|}| idƒo| d}nd}|} titi@otid| ƒn| o |}n| o d}ntiti@otidt.|ƒ|fƒt/ƒ}|i1d|ƒ|i1d|ƒ|i1dƒ|idƒi2| i| ƒt3ƒ}|i1ddƒ|i1dƒidƒ}|i1d|ƒ|iiiiddƒ\}|i1dt7|iƒƒd}|djonJ|djo|dB}n/|djo|dB}nt#i9d|ƒ‚t!i"i| iƒo|dB}n|i1dt:|ƒƒ|i1d|ƒtiti@otid|i;ƒfƒ|i<i=|ƒ}|tjot#i$ddƒ‚ny:|i?||i@||i||||||ƒ \}}Wnt#i$j o } ‚nXtiti@o tidƒtC|ƒtD|i|ƒjot#i$dd ƒ‚n|| |fSdS(!Ns__SNMP-FRAMEWORK-MIBs snmpEngineIDsmsgIDscontextEngineIds contextNames securityModels securityNames securityLevelssecurityStateReferencesreportableFlags msgMaxSizestransportDomainstransportAddresss)prepareResponseMessage: stateReference %ssoidiserrorIndicationsloopTerminatedsvalissCprepareResponseMessage: prepare report PDU for statusInformation %ss@prepareResponseMessage: using contextEngineId %s, contextName %siissnmpEngineMaxMessageSizesUnknown securityLevel %sisprepareResponseMessage: %ssunsupportedSecurityModels#prepareResponseMessage: SM finishedstooBig(Es snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolss snmpEngineIDssyntaxsselfs_cachePopByStateRefsstateReferences cachedParamssmsgIDscontextEngineIds contextNames securityModels securityNames securityLevelssecurityStateReferencesreportableFlagsmaxMessageSizestransportDomainstransportAddresssdebugsloggersflagMPsstatusInformationsNoneshas_keyspdusgetComponentByPositions requestIDstagSetspduTypesrfc3411sconfirmedClassPDUsserrorsStatusInformationsrfc1905s ReportPDUs reportPDUspModsapiPDUs setVarBindsssetErrorStatuss setErrorIndexs setRequestIDsreprs ScopedPDUs scopedPDUssetComponentByPositionssetComponentByTypes SNMPv3Messagesmsgs headerDatassnmpEngineMaxMessageSizesintsmsgFlagss ProtocolErrorschrs prettyPrintssecurityModelssgets smHandlersgenerateResponseMsgsmessageProcessingModelIDssecurityParametersswholeMsgslensmin( sselfs snmpEnginesmessageProcessingModels securityModels securityNames securityLevelscontextEngineIds contextNames pduVersionspdusmaxSizeResponseScopedPDUsstateReferencesstatusInformationstransportAddresss smHandlers reportPDUstransportDomains requestIDs headerDataspduTypes scopedPDUsmsgssecurityParametersssecurityStateReferencesreportableFlagsmsgFlagsssnmpEngineMaxMessageSizesmsgIDswholeMsgs snmpEngineIDsmaxMessageSizes cachedParams((s8build/bdist.linux-i686/egg/pysnmp/proto/mpmod/rfc3412.pysprepareResponseMessageës´            "  6   &  .      +  c'Cs y"ti|d|iƒ\}}#WnStj oG|i i i i ddƒ\}|id|_tiddƒ‚nXtiti@otid|iƒfƒ|idƒ} |idƒ}}| idƒ}tt| id ƒƒƒ}| idƒ}"| id ƒ} |id ƒ}titi@otid ||| fƒ|i i!| ƒ oD|i i i i dd ƒ\}|id|_tidd ƒ‚n|d @djo d}nt|d @djo d }nY|d @d jo d }n>|i i i i ddƒ}|id|_tiddƒ‚|d@o d}nd}|i | }yU|i'|||"|| |||ƒ\}$} }}}titi@o tidƒWn¤tij o•} titi@otid| ƒ| i!dƒoT| i!dƒo@| d}| d}| d}| i0dƒ}|t1j o|id ƒi2ƒ}nt1}| d}t1} |i4ƒ}|i6|d|d|d|d|d| d| d|d|d|d|"d|d |d!|ƒ y5|i i9|d | | |||d|||| ƒ Wntij onXtiti@o tid"ƒqFn| ‚nÔX||f}%|i;i!|%ƒ o²|\}}}hd#|$<d|<d|<|i;|%<|i<d$}|i>i!|ƒ og|i>||i?|%ƒtiti@o tid%t@|$ƒ||fƒn|i i i i d&d'ƒ\}!|!i}!|\}}}|i2ƒ}tBiC}|iE} tGiHi!| ƒptGiIi!| ƒoYy|iJ|ƒ}&Wn5tiLj o&|iM|ƒtidd(ƒ‚nX|&d)}nt1}titi@otid*||fƒtGiIi!| ƒo‚tOiPiQ|ƒ} | oLtidtSi0| ddd+ƒd| ddd,| ddd)|ƒ} n|iM|ƒt1}| ‚nt1} tGiHi!| ƒoº| |&djpA| |&djp0||&djp||&djp||&djo#|iM|ƒtidd(ƒ‚n|iM|ƒt1}|| | |||||| ||| |f SntGiTi!| ƒoè|$|!jo#|iM|ƒtidd-ƒ‚n|i4ƒ}|i6|d|d|d|d|d| d| d|d|d|d|"d|d |d!|ƒ titi@otid.|ƒ|| | |||||| ||| |f SntGiUi!| ƒoH|i4ƒ}|iM|ƒ|| | |||||| ||| |f Sn|iM|ƒtidd/ƒ‚dS(0Nsasn1Specs __SNMPv2-MIBssnmpInASNParseErrsiserrorIndications parseErrorsprepareDataElements: %siiisEprepareDataElements: msg data msgVersion %s msgID %s securityModel %sssnmpUnknownSecurityModelssunsupportedSecurityModelssnmpInvalidMsgss invalidMsgis!prepareDataElements: SM succeededs4prepareDataElements: SM failed, statusInformation %ssoidssecurityStateReferencescontextEngineIds contextNames scopedPDUsmaxSizeResponseScopedPDUs msgVersionsmsgIDs securityModels securityNames securityLevelsreportableFlags msgMaxSizestransportDomainstransportAddresss#prepareDataElements: error reportedssecurityEngineIDi,s8prepareDataElements: cache securityEngineID %s for %s %ss__SNMP-FRAMEWORK-MIBs snmpEngineIDs dataMismatchs sendPduHandles8prepareDataElements: using sendPduHandle %s for msgID %sserrorReportReceivedsvalsengineIDMismatchs*prepareDataElements: new stateReference %ss unknownPDU(VsdecodersdecodeswholeMsgsselfs _snmpMsgSpecsmsgsrestOfwholeMsgs PyAsn1Errors snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolsssnmpInASNParseErrsssyntaxserrorsStatusInformationsdebugsloggersflagMPs prettyPrintsgetComponentByPositions headerDatas msgVersionsmessageProcessingModelsmsgIDsordsstrsmsgFlagssmaxMessageSizes securityModelssecurityParametersssecurityModelsshas_keyssnmpUnknownSecurityModelss securityLevelssnmpInvalidMsgssreportableFlags smHandlersprocessIncomingMsgssecurityEngineIDs securityNames scopedPDUsmaxSizeResponseScopedPDUssecurityStateReferencesstatusInformationscontextEngineIds contextNamesgetsNones getComponentspdus_newStateReferencesstateReferences_cachePushByStateRefstransportDomainstransportAddresssreturnResponsePdusks(_SnmpV3MessageProcessingModel__engineIDss._SnmpV3MessageProcessingModel__expirationTimersexpireAts0_SnmpV3MessageProcessingModel__engineIDsExpQueuesappendsreprs snmpEngineIDsapisprotoVersion2cs pduVersionstagSetspduTypesrfc3411sresponseClassPDUssinternalClassPDUss_cachePopByMsgIdscachedReqParamss ProtocolErrorsreleaseStateInformations sendPduHandlespModsapiPDUs getVarBindssvarBindss _snmpErrorssconfirmedClassPDUssunconfirmedClassPDUs('sselfs snmpEnginestransportDomainstransportAddressswholeMsgs msgVersions sendPduHandlesexpireAts smHandlersstatusInformations securityModels headerDatasvarBindsspduTypescontextEngineIdsmessageProcessingModels scopedPDUsmaxSizeResponseScopedPDUsmsgssecurityParameterss contextNamessnmpInASNParseErrss pduVersionsstateReferencessnmpInvalidMsgsssecurityStateReferencesreportableFlagsmsgFlagss securityLevelssnmpUnknownSecurityModelssmsgIDspdus securityNames snmpEngineIDsmaxMessageSizesrestOfwholeMsgssecurityEngineIDskscachedReqParams((s8build/bdist.linux-i686/egg/pysnmp/proto/mpmod/rfc3412.pysprepareDataElementsŸs8"++       ""          &  ( 5    & (   U  /     "/  / cCs…|ii|iƒo[xG|i|iD]5}|i|=titi@otid|fƒq'W|i|i=n|id|_dS(Ns __expireEnginesInfo: expiring %si( sselfs0_SnmpV3MessageProcessingModel__engineIDsExpQueueshas_keys._SnmpV3MessageProcessingModel__expirationTimers engineKeys(_SnmpV3MessageProcessingModel__engineIDssdebugsloggersflagMP(sselfs engineKey((s8build/bdist.linux-i686/egg/pysnmp/proto/mpmod/rfc3412.pys__expireEnginesInfoás )cCs!|iƒti|||ƒdS(N(sselfs0_SnmpV3MessageProcessingModel__expireEnginesInfosAbstractMessageProcessingModelsreceiveTimerTicks snmpEnginestimeNow(sselfs snmpEnginestimeNow((s8build/bdist.linux-i686/egg/pysnmp/proto/mpmod/rfc3412.pysreceiveTimerTickés ( s__name__s __module__smessageProcessingModelIDs SNMPv3Messages _snmpMsgSpecs__init__sprepareOutgoingMessagesprepareResponseMessagesprepareDataElementss0_SnmpV3MessageProcessingModel__expireEnginesInfosreceiveTimerTick(((s8build/bdist.linux-i686/egg/pysnmp/proto/mpmod/rfc3412.pysSnmpV3MessageProcessingModel6s   « ´ ÿC N(spysnmp.proto.mpmod.basesAbstractMessageProcessingModelspysnmp.proto.secmodsrfc3414s pysnmp.protosrfc1905srfc3411serrorsapis pyasn1.typesunivs namedtypes constraintspyasn1.codec.bersdecoders pyasn1.errors PyAsn1Errorspysnmpsdebugs protoModulessprotoVersion2cspModsSequences ScopedPDUsChoices ScopedPduDatas HeaderDatas SNMPv3Messages _snmpErrorssSnmpV3MessageProcessingModel(s SNMPv3Messages _snmpErrorss constraintspMods ScopedPduDatasrfc1905sSnmpV3MessageProcessingModels HeaderDatas ScopedPDUsdecodersapis namedtypeserrorsdebugsrfc3411sunivs PyAsn1Errorsrfc3414sAbstractMessageProcessingModel((s8build/bdist.linux-i686/egg/pysnmp/proto/mpmod/rfc3412.pys?s      ÿ PK†£=×òìp‰‰pysnmp/proto/mpmod/__init__.pyc;ò ¶´®Bc@sdS(N((((s9build/bdist.linux-i686/egg/pysnmp/proto/mpmod/__init__.pys?sPK-¤;=>>XQããpysnmp/proto/mpmod/base.py# MP-specific cache management from pysnmp.proto import error class AbstractMessageProcessingModel: messageProcessingModelID = None __stateReference = __msgID = 0L def __init__(self): self.__msgIdIndex = {} self.__stateReferenceIndex = {} self.__sendPduHandleIdx = {} # Message expiration mechanics self.__expirationQueue = {} self.__expirationTimer = 0L def prepareOutgoingMessage( self, snmpEngine, transportDomain, transportAddress, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, pdu, expectResponse, sendPduHandle ): raise error.ProtocolError('method not implemented') def prepareResponseMessage( self, snmpEngine, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, pdu, maxSizeResponseScopedPDU, stateReference, statusInformation ): raise error.ProtocolError('method not implemented') def prepareDataElements( self, snmpEngine, transportDomain, transportAddress, wholeMsg ): raise error.ProtocolError('method not implemented') def _newStateReference(self): AbstractMessageProcessingModel.__stateReference = ( AbstractMessageProcessingModel.__stateReference + 1 ) return self.__stateReference # Server mode cache handling def _cachePushByStateRef(self, stateReference, **msgInfo): if self.__stateReferenceIndex.has_key(stateReference): raise error.ProtocolError( 'Cache dup for stateReference=%s at %s' % (stateReference, self) ) expireAt = self.__expirationTimer+60 self.__stateReferenceIndex[stateReference] = ( msgInfo, expireAt ) # Schedule to expire if not self.__expirationQueue.has_key(expireAt): self.__expirationQueue[expireAt] = {} if not self.__expirationQueue[expireAt].has_key('stateReference'): self.__expirationQueue[expireAt]['stateReference'] = {} self.__expirationQueue[expireAt]['stateReference'][stateReference] = 1 def _cachePopByStateRef(self, stateReference): cacheInfo = self.__stateReferenceIndex.get(stateReference) if cacheInfo is None: raise error.ProtocolError( 'Cache miss for stateReference=%s at %s' % (stateReference, self) ) del self.__stateReferenceIndex[stateReference] cacheEntry, expireAt = cacheInfo del self.__expirationQueue[expireAt]['stateReference'][stateReference] return cacheEntry # Client mode cache handling def _newMsgID(self): AbstractMessageProcessingModel.__msgID = ( AbstractMessageProcessingModel.__msgID + 1 ) return self.__msgID def _cachePushByMsgId(self, msgId, **msgInfo): if self.__msgIdIndex.has_key(msgId): raise error.ProtocolError( 'Cache dup for msgId=%s at %s' % (msgId, self) ) expireAt = self.__expirationTimer+60 self.__msgIdIndex[msgId] = ( msgInfo, expireAt ) self.__sendPduHandleIdx[msgInfo['sendPduHandle']] = msgId # Schedule to expire if not self.__expirationQueue.has_key(expireAt): self.__expirationQueue[expireAt] = {} if not self.__expirationQueue[expireAt].has_key('msgId'): self.__expirationQueue[expireAt]['msgId'] = {} self.__expirationQueue[expireAt]['msgId'][msgId] = 1 def _cachePopByMsgId(self, msgId): cacheInfo = self.__msgIdIndex.get(msgId) if cacheInfo is None: raise error.ProtocolError( 'Cache miss for msgId=%s at %s' % (msgId, self) ) msgInfo, expireAt = cacheInfo del self.__sendPduHandleIdx[msgInfo['sendPduHandle']] del self.__msgIdIndex[msgId] cacheEntry, expireAt = cacheInfo del self.__expirationQueue[expireAt]['msgId'][msgId] return cacheEntry def _cachePopBySendPduHandle(self, sendPduHandle): if self.__sendPduHandleIdx.has_key(sendPduHandle): self._cachePopByMsgId(self.__sendPduHandleIdx[sendPduHandle]) def __expireCaches(self): # Uses internal clock to expire pending messages if self.__expirationQueue.has_key(self.__expirationTimer): cacheInfo = self.__expirationQueue[self.__expirationTimer] if cacheInfo.has_key('stateReference'): for stateReference in cacheInfo['stateReference'].keys(): del self.__stateReferenceIndex[stateReference] if cacheInfo.has_key('msgId'): for msgId in cacheInfo['msgId'].keys(): del self.__msgIdIndex[msgId] del self.__expirationQueue[self.__expirationTimer] self.__expirationTimer = self.__expirationTimer + 1 def releaseStateInformation(self, sendPduHandle): try: self._cachePopBySendPduHandle(sendPduHandle) except error.ProtocolError: pass # XXX maybe these should all follow some scheme? def receiveTimerTick(self, snmpEngine, timeNow): self.__expireCaches() PK¥‚=ЕÌ9Ì9pysnmp/proto/mpmod/rfc2576.py# SNMP v1 & v2c message processing models implementation from pyasn1.codec.ber import decoder from pysnmp.proto.mpmod.base import AbstractMessageProcessingModel from pysnmp.proto.secmod import rfc2576 from pysnmp.proto import rfc3411, error from pysnmp.proto.api import v1, v2c from pyasn1.type import univ from pyasn1.error import PyAsn1Error from pysnmp import debug # Since I have not found a detailed reference to v1MP/v2cMP # inner workings, the following has been patterned from v3MP. Most # references here goes to RFC3412. class SnmpV1MessageProcessingModel(AbstractMessageProcessingModel): messageProcessingModelID = 0 # SNMPv1 _snmpMsgSpec = v1.Message() # rfc3412: 7.1 def prepareOutgoingMessage( self, snmpEngine, transportDomain, transportAddress, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, pdu, expectResponse, sendPduHandle ): snmpEngineID, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-FRAMEWORK-MIB', 'snmpEngineID') snmpEngineID = snmpEngineID.syntax # rfc3412: 7.1.1b if rfc3411.confirmedClassPDUs.has_key(pdu.tagSet): pdu.setComponentByPosition(1) msgID = pdu.getComponentByPosition(0) # rfc3412: 7.1.4 # Since there's no SNMP engine identification in v1/2c, # set destination contextEngineId to ours if not contextEngineId: contextEngineId = snmpEngineID # rfc3412: 7.1.5 if not contextName: contextName = '' debug.logger & debug.flagMP and debug.logger('prepareOutgoingMessage: using contextEngineId %s contextName %s' % (repr(contextEngineId), contextName)) # rfc3412: 7.1.6 scopedPDU = ( contextEngineId, contextName, pdu ) msg = self._snmpMsgSpec.clone() msg.setComponentByPosition(0, self.messageProcessingModelID) msg.setComponentByPosition(2) msg.getComponentByPosition(2).setComponentByType(pdu.tagSet, pdu) # rfc3412: 7.1.7 globalData = ( msg, ) smHandler = snmpEngine.securityModels.get(int(securityModel)) if smHandler is None: raise error.StatusInformation( errorIndication = 'unsupportedSecurityModel' ) # rfc3412: 7.1.9.a & rfc2576: 5.2.1 --> no-op snmpEngineMaxMessageSize, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-FRAMEWORK-MIB', 'snmpEngineMaxMessageSize') # rfc3412: 7.1.9.b ( securityParameters, wholeMsg ) = smHandler.generateRequestMsg( snmpEngine, self.messageProcessingModelID, globalData, snmpEngineMaxMessageSize.syntax, securityModel, snmpEngineID, securityName, securityLevel, scopedPDU ) # rfc3412: 7.1.9.c if rfc3411.confirmedClassPDUs.has_key(pdu.tagSet): # XXX rfc bug? why stateReference should be created? self._cachePushByMsgId( long(msgID), sendPduHandle=sendPduHandle, msgID=msgID, snmpEngineID=snmpEngineID, securityModel=securityModel, securityName=securityName, securityLevel=securityLevel, contextEngineId=contextEngineId, contextName=contextName, transportDomain=transportDomain, transportAddress=transportAddress ) return ( transportDomain, transportAddress, wholeMsg ) # rfc3412: 7.1 def prepareResponseMessage( self, snmpEngine, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, pdu, maxSizeResponseScopedPDU, stateReference, statusInformation ): snmpEngineID, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-FRAMEWORK-MIB', 'snmpEngineID') snmpEngineID = snmpEngineID.syntax # rfc3412: 7.1.2.b cachedParams = self._cachePopByStateRef(stateReference) msgID = cachedParams['msgID'] contextEngineId = cachedParams['contextEngineId'] contextName = cachedParams['contextName'] securityModel = cachedParams['securityModel'] securityName = cachedParams['securityName'] securityLevel = cachedParams['securityLevel'] securityStateReference = cachedParams['securityStateReference'] maxMessageSize = cachedParams['msgMaxSize'] transportDomain = cachedParams['transportDomain'] transportAddress = cachedParams['transportAddress'] debug.logger & debug.flagMP and debug.logger('prepareResponseMessage: cache read msgID %s transportDomain %s transportAddress %s by stateReference %s' % (msgID, transportDomain, transportAddress, stateReference)) # rfc3412: 7.1.3 if statusInformation: # rfc3412: 7.1.3a (N/A) # rfc3412: 7.1.3b (always discard) raise error.StatusInformation( errorIndication = 'nonReportable' ) # rfc3412: 7.1.4 # Since there's no SNMP engine identification in v1/2c, # set destination contextEngineId to ours if not contextEngineId: contextEngineId = snmpEngineID # rfc3412: 7.1.5 if not contextName: contextName = '' # rfc3412: 7.1.6 scopedPDU = ( contextEngineId, contextName, pdu ) debug.logger & debug.flagMP and debug.logger('prepareResponseMessage: using contextEngineId %s contextName %s' % (repr(contextEngineId), contextName)) msg = self._snmpMsgSpec.clone() msg.setComponentByPosition(0, messageProcessingModel) msg.setComponentByPosition(2) msg.getComponentByPosition(2).setComponentByType(pdu.tagSet, pdu) # att: msgId not set back to PDU as it's up to responder app # rfc3412: 7.1.7 globalData = ( msg, ) smHandler = snmpEngine.securityModels.get(int(securityModel)) if smHandler is None: raise error.StatusInformation( errorIndication = 'unsupportedSecurityModel' ) securityEngineId = snmpEngineID # rfc3412: 7.1.8.a ( securityParameters, wholeMsg ) = smHandler.generateResponseMsg( snmpEngine, self.messageProcessingModelID, globalData, maxMessageSize, securityModel, snmpEngineID, securityName, securityLevel, scopedPDU, securityStateReference ) return ( transportDomain, transportAddress, wholeMsg ) # rfc3412: 7.2.1 def prepareDataElements( self, snmpEngine, transportDomain, transportAddress, wholeMsg ): # rfc3412: 7.2.2 try: msg, restOfwholeMsg = decoder.decode( wholeMsg, asn1Spec=self._snmpMsgSpec ) except PyAsn1Error: snmpInASNParseErrs, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMPv2-MIB', 'snmpInASNParseErrs') snmpInASNParseErrs.syntax = snmpInASNParseErrs.syntax + 1 raise error.StatusInformation( errorIndication = 'parseError' ) debug.logger & debug.flagMP and debug.logger('prepareDataElements: %s' % (msg.prettyPrint(),)) # rfc3412: 7.2.3 msgVersion = messageProcessingModel = msg.getComponentByPosition(0) pdu = msg.getComponentByPosition(2).getComponent() # (wild hack: use PDU reqID at MsgID) msgID = pdu.getComponentByPosition(0) # rfc2576: 5.2.1 snmpEngineMaxMessageSize, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-FRAMEWORK-MIB', 'snmpEngineMaxMessageSize') securityParameters = ( msg.getComponentByPosition(1), (transportDomain, transportAddress), ('0.0.0.0', 0) # XXX ) messageProcessingModel = int(msg.getComponentByPosition(0)) securityModel = messageProcessingModel + 1 securityLevel = 1 # rfc3412: 7.2.4 -- 7.2.5 -> noop smHandler = snmpEngine.securityModels.get(int(securityModel)) if smHandler is None: raise error.StatusInformation( errorIndication = 'unsupportedSecurityModel' ) # rfc3412: 7.2.6 ( securityEngineID, securityName, scopedPDU, maxSizeResponseScopedPDU, securityStateReference ) = smHandler.processIncomingMsg( snmpEngine, messageProcessingModel, snmpEngineMaxMessageSize.syntax, securityParameters, securityModel, securityLevel, wholeMsg, msg ) debug.logger & debug.flagMP and debug.logger('prepareDataElements: SM returned securityEngineID %s securityName %s' % (repr(securityEngineID), securityName)) # rfc3412: 7.2.6a --> noop # rfc3412: 7.2.7 contextEngineId, contextName, pdu = scopedPDU # rfc2576: 5.2.1 pduVersion = msgVersion pduType = pdu.tagSet # XXX use cache # set stateref to null as in v3 model stateReference = securityStateReference # rfc3412: 7.2.8, 7.2.9 -> noop # rfc3412: 7.2.10 if rfc3411.responseClassPDUs.has_key(pduType): # 7.2.10a try: cachedReqParams = self._cachePopByMsgId(long(msgID)) except error.ProtocolError: smHandler.releaseStateInformation(securityStateReference) raise error.StatusInformation( errorIndication = 'dataMismatch' ) # 7.2.10b sendPduHandle = cachedReqParams['sendPduHandle'] else: sendPduHandle = None statusInformation = None # rfc3412: 7.2.11 -> noop # rfc3412: 7.2.12 if rfc3411.responseClassPDUs.has_key(pduType): # rfc3412: 7.2.12a -> noop # rfc3412: 7.2.12b if securityModel != cachedReqParams['securityModel'] or \ securityName != cachedReqParams['securityName'] or \ securityLevel != cachedReqParams['securityLevel'] or \ contextEngineId != cachedReqParams['contextEngineId'] or \ contextName != cachedReqParams['contextName']: smHandler.releaseStateInformation(securityStateReference) raise error.StatusInformation( errorIndication = 'dataMismatch' ) # rfc3412: 7.2.12c smHandler.releaseStateInformation(securityStateReference) # rfc3412: 7.2.12d return ( messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, pdu, pduType, sendPduHandle, maxSizeResponseScopedPDU, statusInformation, stateReference ) # rfc3412: 7.2.13 if rfc3411.confirmedClassPDUs.has_key(pduType): # rfc3412: 7.2.13a snmpEngineID, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-FRAMEWORK-MIB', 'snmpEngineID') if securityEngineID != snmpEngineID.syntax: smHandler.releaseStateInformation(securityStateReference) raise error.StatusInformation( errorIndication = 'engineIDMispatch' ) # rfc3412: 7.2.13b stateReference = self._newStateReference() self._cachePushByStateRef( stateReference, msgVersion=messageProcessingModel, msgID=msgID, contextEngineId=contextEngineId, contextName=contextName, securityModel=securityModel, securityName=securityName, securityLevel=securityLevel, securityStateReference=securityStateReference, msgMaxSize=snmpEngineMaxMessageSize.syntax, maxSizeResponseScopedPDU=maxSizeResponseScopedPDU, transportDomain=transportDomain, transportAddress=transportAddress ) debug.logger & debug.flagMP and debug.logger('prepareDataElements: cached by new stateReference %s' % stateReference) # rfc3412: 7.2.13c return ( messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, pdu, pduType, sendPduHandle, maxSizeResponseScopedPDU, statusInformation, stateReference ) # rfc3412: 7.2.14 if rfc3411.unconfirmedClassPDUs.has_key(pduType): # This is not specified explicitly in RFC smHandler.releaseStateInformation(securityStateReference) return ( messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, pdu, pduType, sendPduHandle, maxSizeResponseScopedPDU, statusInformation, stateReference ) smHandler.releaseStateInformation(securityStateReference) raise error.StatusInformation( errorIndication = 'unsupportedPDUtype' ) class SnmpV2cMessageProcessingModel(SnmpV1MessageProcessingModel): messageProcessingModelID = 1 # SNMPv2c _snmpMsgSpec = v2c.Message() PK†£=áÌ÷³ý(ý(pysnmp/proto/mpmod/rfc2576.pyc;ò Ú÷Lc@s¤dklZdklZdklZdklZlZdk l Z l Z dk l Z dklZdklZdefd „ƒYZd efd „ƒYZd S( (sdecoder(sAbstractMessageProcessingModel(srfc2576(srfc3411serror(sv1sv2c(suniv(s PyAsn1Error(sdebugsSnmpV1MessageProcessingModelcBs5tZdZeiƒZd„Zd„Zd„ZRS(NicCs|iiiiddƒ\}|i}tii | i ƒo | i dƒ| i dƒ}n| o |}n| o d} ntiti@otidt|ƒ| fƒ|| | f}|iiƒ}|i d|iƒ|i dƒ|i dƒi| i | ƒ|f}|iit|ƒƒ}|t"jot#i$dd ƒ‚n|iiiidd ƒ\}|i&||i||i|||||ƒ \}}tii | i ƒoS|i+t,|ƒd | d |d|d |d|d|d|d| d|d|ƒ n|||fSdS(Ns__SNMP-FRAMEWORK-MIBs snmpEngineIDiiss?prepareOutgoingMessage: using contextEngineId %s contextName %siserrorIndicationsunsupportedSecurityModelssnmpEngineMaxMessageSizes sendPduHandlesmsgIDs securityModels securityNames securityLevelscontextEngineIds contextNamestransportDomainstransportAddress(0s snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolss snmpEngineIDssyntaxsrfc3411sconfirmedClassPDUsshas_keyspdustagSetssetComponentByPositionsgetComponentByPositionsmsgIDscontextEngineIds contextNamesdebugsloggersflagMPsreprs scopedPDUsselfs _snmpMsgSpecsclonesmsgsmessageProcessingModelIDssetComponentByTypes globalDatassecurityModelssgetsints securityModels smHandlersNoneserrorsStatusInformationssnmpEngineMaxMessageSizesgenerateRequestMsgs securityNames securityLevelssecurityParametersswholeMsgs_cachePushByMsgIdslongs sendPduHandlestransportDomainstransportAddress(sselfs snmpEnginestransportDomainstransportAddresssmessageProcessingModels securityModels securityNames securityLevelscontextEngineIds contextNames pduVersionspdusexpectResponses sendPduHandles smHandlerssnmpEngineMaxMessageSizes scopedPDUsmsgssecurityParameterssmsgIDswholeMsgs globalDatas snmpEngineID((s8build/bdist.linux-i686/egg/pysnmp/proto/mpmod/rfc2576.pysprepareOutgoingMessagesT    .    c  Cs|iiiiddƒ\}|i}|i| ƒ}|d}|d}|d}|d}|d}|d}|d }|d }|d }|d } titi@otid ||| | fƒ| otiddƒ‚n| o |}n| o d}n||| f}titi@otidt|ƒ|fƒ|iiƒ}|i!d|ƒ|i!dƒ|i#dƒi$| i%| ƒ|f}|i'i(t)|ƒƒ}|t+jotiddƒ‚n|}|i-||i.||||||||ƒ \}}|| |fSdS(Ns__SNMP-FRAMEWORK-MIBs snmpEngineIDsmsgIDscontextEngineIds contextNames securityModels securityNames securityLevelssecurityStateReferences msgMaxSizestransportDomainstransportAddresssgprepareResponseMessage: cache read msgID %s transportDomain %s transportAddress %s by stateReference %sserrorIndications nonReportabless?prepareResponseMessage: using contextEngineId %s contextName %siisunsupportedSecurityModel(1s snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolss snmpEngineIDssyntaxsselfs_cachePopByStateRefsstateReferences cachedParamssmsgIDscontextEngineIds contextNames securityModels securityNames securityLevelssecurityStateReferencesmaxMessageSizestransportDomainstransportAddresssdebugsloggersflagMPsstatusInformationserrorsStatusInformationspdus scopedPDUsreprs _snmpMsgSpecsclonesmsgssetComponentByPositionsmessageProcessingModelsgetComponentByPositionssetComponentByTypestagSets globalDatassecurityModelssgetsints smHandlersNonessecurityEngineIdsgenerateResponseMsgsmessageProcessingModelIDssecurityParametersswholeMsg(sselfs snmpEnginesmessageProcessingModels securityModels securityNames securityLevelscontextEngineIds contextNames pduVersionspdusmaxSizeResponseScopedPDUsstateReferencesstatusInformationstransportAddresss smHandlerssecurityEngineIdstransportDomains scopedPDUsmsgssecurityStateReferencessecurityParameterssmsgIDswholeMsgs globalDatas snmpEngineIDsmaxMessageSizes cachedParams((s8build/bdist.linux-i686/egg/pysnmp/proto/mpmod/rfc2576.pysprepareResponseMessagensT           .  .    cCsÔy"ti|d|iƒ\}}WnStj oG|i i i i ddƒ\}|id|_tiddƒ‚nXtiti@otid|iƒfƒ|idƒ}} |id ƒiƒ}|idƒ}|i i i i d d ƒ\} |idƒ||fd dff}t|idƒƒ} | d} d}|i"i#t| ƒƒ}|t%jotidd ƒ‚n|i&|| | i|| |||ƒ\}}} }}titi@otidt,|ƒ|fƒ| \} }}|}|i0}|}t3i4i5|ƒo_y|i6t7|ƒƒ}Wn5ti9j o&|i:|ƒtiddƒ‚nX|d}nt%}t%}t3i4i5|ƒo´| |djpA||djp0||djp| |djp||djo#|i:|ƒtiddƒ‚n|i:|ƒ| | ||| ||||||||f Snt3i=i5|ƒo|i i i i d dƒ\}||ijo#|i:|ƒtiddƒ‚n|i?ƒ}|i@|d| d|d| d|d| d|d|d|d| id|d|d|ƒ titi@otid|ƒ| | ||| ||||||||f Snt3iAi5|ƒo<|i:|ƒ| | ||| ||||||||f Sn|i:|ƒtidd ƒ‚dS(!Nsasn1Specs __SNMPv2-MIBssnmpInASNParseErrsiserrorIndications parseErrorsprepareDataElements: %siis__SNMP-FRAMEWORK-MIBssnmpEngineMaxMessageSizes0.0.0.0sunsupportedSecurityModelsDprepareDataElements: SM returned securityEngineID %s securityName %ss dataMismatchs sendPduHandles securityModels securityNames securityLevelscontextEngineIds contextNames snmpEngineIDsengineIDMispatchs msgVersionsmsgIDssecurityStateReferences msgMaxSizesmaxSizeResponseScopedPDUstransportDomainstransportAddresss4prepareDataElements: cached by new stateReference %ssunsupportedPDUtype(BsdecodersdecodeswholeMsgsselfs _snmpMsgSpecsmsgsrestOfwholeMsgs PyAsn1Errors snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolsssnmpInASNParseErrsssyntaxserrorsStatusInformationsdebugsloggersflagMPs prettyPrintsgetComponentByPositions msgVersionsmessageProcessingModels getComponentspdusmsgIDssnmpEngineMaxMessageSizestransportDomainstransportAddressssecurityParameterssints securityModels securityLevelssecurityModelssgets smHandlersNonesprocessIncomingMsgssecurityEngineIDs securityNames scopedPDUsmaxSizeResponseScopedPDUssecurityStateReferencesreprscontextEngineIds contextNames pduVersionstagSetspduTypesstateReferencesrfc3411sresponseClassPDUsshas_keys_cachePopByMsgIdslongscachedReqParamss ProtocolErrorsreleaseStateInformations sendPduHandlesstatusInformationsconfirmedClassPDUss snmpEngineIDs_newStateReferences_cachePushByStateRefsunconfirmedClassPDUs(sselfs snmpEnginestransportDomainstransportAddressswholeMsgs msgVersions sendPduHandles smHandlersstatusInformations securityModelssnmpEngineMaxMessageSizescontextEngineIdsmessageProcessingModels scopedPDUsmaxSizeResponseScopedPDUsmsgs contextNamessnmpInASNParseErrss pduVersionsstateReferencessecurityStateReferencessecurityParameterss securityLevelspduTypesmsgIDspdus securityNames snmpEngineIDsrestOfwholeMsgssecurityEngineIDscachedReqParams((s8build/bdist.linux-i686/egg/pysnmp/proto/mpmod/rfc2576.pysprepareDataElementsÌs"+$   .  U  /     "/ / ( s__name__s __module__smessageProcessingModelIDsv1sMessages _snmpMsgSpecsprepareOutgoingMessagesprepareResponseMessagesprepareDataElements(((s8build/bdist.linux-i686/egg/pysnmp/proto/mpmod/rfc2576.pysSnmpV1MessageProcessingModels   [ ^sSnmpV2cMessageProcessingModelcBstZdZeiƒZRS(Ni(s__name__s __module__smessageProcessingModelIDsv2csMessages _snmpMsgSpec(((s8build/bdist.linux-i686/egg/pysnmp/proto/mpmod/rfc2576.pysSnmpV2cMessageProcessingModel“sN(spyasn1.codec.bersdecoderspysnmp.proto.mpmod.basesAbstractMessageProcessingModelspysnmp.proto.secmodsrfc2576s pysnmp.protosrfc3411serrorspysnmp.proto.apisv1sv2cs pyasn1.typesunivs pyasn1.errors PyAsn1ErrorspysnmpsdebugsSnmpV1MessageProcessingModelsSnmpV2cMessageProcessingModel( sv2csSnmpV1MessageProcessingModelsdecodersrfc2576sv1s PyAsn1ErrorsSnmpV2cMessageProcessingModelserrorsdebugsrfc3411sunivsAbstractMessageProcessingModel((s8build/bdist.linux-i686/egg/pysnmp/proto/mpmod/rfc2576.pys?s      ÿ…PKoÖ2pysnmp/proto/proxy/__init__.pyPK†£=Ádxɉ‰pysnmp/proto/proxy/__init__.pyc;ò ò™¸Bc@sdS(N((((s9build/bdist.linux-i686/egg/pysnmp/proto/proxy/__init__.pys?sPK˜¦†=dÔhõ~%~%pysnmp/proto/proxy/rfc2576.py# PDU v1/v2c two-way proxy from pysnmp.proto import rfc1905, rfc3411, error from pysnmp.proto.api import v1, v2c from pysnmp import debug # 2.1.1 __v1ToV2ValueMap = { v1.Integer.tagSet: v2c.Integer32(), v1.OctetString.tagSet: v2c.OctetString(), v1.Null.tagSet: v2c.Null(), v1.ObjectIdentifier.tagSet: v2c.ObjectIdentifier(), v1.IpAddress.tagSet: v2c.IpAddress(), v1.Counter.tagSet: v2c.Counter32(), v1.Gauge.tagSet: v2c.Gauge32(), v1.TimeTicks.tagSet: v2c.TimeTicks(), v1.Opaque.tagSet: v2c.Opaque() } __v2ToV1ValueMap = { # XXX do not re-create same-type items? v2c.Integer32.tagSet: v1.Integer(), v2c.OctetString.tagSet: v1.OctetString(), v2c.Null.tagSet: v1.Null(), v2c.ObjectIdentifier.tagSet: v1.ObjectIdentifier(), v2c.IpAddress.tagSet: v1.IpAddress(), v2c.Counter32.tagSet: v1.Counter(), v2c.Gauge32.tagSet: v1.Gauge(), v2c.TimeTicks.tagSet: v1.TimeTicks(), v2c.Opaque.tagSet: v1.Opaque() } # PDU map __v1ToV2PduMap = { v1.GetRequestPDU.tagSet: v2c.GetRequestPDU(), v1.GetNextRequestPDU.tagSet: v2c.GetNextRequestPDU(), v1.SetRequestPDU.tagSet: v2c.SetRequestPDU(), v1.GetResponsePDU.tagSet: v2c.ResponsePDU(), v1.TrapPDU.tagSet: v2c.SNMPv2TrapPDU() } __v2ToV1PduMap = { v2c.GetRequestPDU.tagSet: v1.GetRequestPDU(), v2c.GetNextRequestPDU.tagSet: v1.GetNextRequestPDU(), v2c.SetRequestPDU.tagSet: v1.SetRequestPDU(), v2c.ResponsePDU.tagSet: v1.GetResponsePDU(), v2c.SNMPv2TrapPDU.tagSet: v1.TrapPDU(), v2c.GetBulkRequestPDU.tagSet: v1.GetNextRequestPDU() # 4.1.1 } # Trap map __v1ToV2TrapMap = { 0: (1,3,6,1,6,3,1,1,5,1), 1: (1,3,6,1,6,3,1,1,5,2), 2: (1,3,6,1,6,3,1,1,5,3), 3: (1,3,6,1,6,3,1,1,5,4), 4: (1,3,6,1,6,3,1,1,5,5), 5: (1,3,6,1,6,3,1,1,5,6) } __v2ToV1TrapMap = { (1,3,6,1,6,3,1,1,5,1): 0, (1,3,6,1,6,3,1,1,5,2): 1, (1,3,6,1,6,3,1,1,5,3): 2, (1,3,6,1,6,3,1,1,5,4): 3, (1,3,6,1,6,3,1,1,5,5): 4, (1,3,6,1,6,3,1,1,5,6): 5 } # 4.3 __v2ToV1ErrorMap = { 0: 0, 1: 1, 5: 5, 10: 3, 9: 3, 7: 3, 8: 3, 12: 3, 6: 2, 17: 2, 11: 2, 18: 2, 13: 5, 14: 5, 15: 5, 16: 2 } def v1ToV2(v1Pdu, origV2Pdu=None): pduType = v1Pdu.tagSet v2Pdu = __v1ToV2PduMap[pduType].clone() v2c.apiPDU.setDefaults(v2Pdu) debug.logger & debug.flagPrx and debug.logger('v1ToV2: v1Pdu %s' % v1Pdu.prettyPrint()) v2VarBinds = [] # 3.1 if rfc3411.notificationClassPDUs.has_key(pduType): # 3.1.1 sysUpTime = v1.apiTrapPDU.getTimeStamp(v1Pdu) # 3.1.2 genericTrap = v1.apiTrapPDU.getGenericTrap(v1Pdu) if genericTrap == 6: snmpTrapOIDParam = v1.apiTrapPDU.getEnterprise(v1Pdu) + (0,) + \ (v1.apiTrapPDU.getSpecificTrap(v1Pdu),) # 3.1.3 else: snmpTrapOIDParam = v2c.ObjectIdentifier( __v1ToV2TrapMap[genericTrap] ) # 3.1.4 (XXX snmpTrapCommunity.0 is missing here) v2VarBinds.append((v2c.apiTrapPDU.sysUpTime, sysUpTime)) v2VarBinds.append((v2c.apiTrapPDU.snmpTrapOID, snmpTrapOIDParam)) v2VarBinds.append( (v2c.apiTrapPDU.snmpTrapAddress, v1.apiTrapPDU.getAgentAddr(v1Pdu)) ) v2VarBinds.append((v2c.apiTrapPDU.snmpTrapCommunity, v2c.OctetString(""))) v2VarBinds.append((v2c.apiTrapPDU.snmpTrapEnterprise, v1.apiTrapPDU.getEnterprise(v1Pdu))) varBinds = v1.apiTrapPDU.getVarBinds(v1Pdu) else: varBinds = v1.apiPDU.getVarBinds(v1Pdu) # Translate Var-Binds for oid, v1Val in varBinds: # 2.1.1.11 if v1Val.tagSet == v1.NetworkAddress.tagSet: v1Val = v1Val.getComponent() v2VarBinds.append( (oid, __v1ToV2ValueMap[v1Val.tagSet].clone(v1Val)) ) if rfc3411.responseClassPDUs.has_key(pduType): # 4.1.2.2.1&2 errorStatus = int(v1.apiPDU.getErrorStatus(v1Pdu)) errorIndex = int(v1.apiPDU.getErrorIndex(v1Pdu)) if errorStatus == 2: # noSuchName if origV2Pdu.tagSet == v2c.GetNextRequestPDU.tagSet: v2VarBinds[errorIndex-1] = ( v2VarBinds[errorIndex-1][0], rfc1905.endOfMibView ) else: v2VarBinds[errorIndex-1] = ( v2VarBinds[errorIndex-1][0], rfc1905.noSuchObject ) # one-to-one mapping v2c.apiPDU.setErrorStatus(v2Pdu, errorStatus) v2c.apiPDU.setErrorIndex(v2Pdu, errorIndex) # 4.1.2.1 --> no-op if not rfc3411.notificationClassPDUs.has_key(pduType): v2c.apiPDU.setRequestID(v2Pdu, long(v1.apiPDU.getRequestID(v1Pdu))) v2c.apiPDU.setVarBinds(v2Pdu, v2VarBinds) debug.logger & debug.flagPrx and debug.logger('v1ToV2: v2Pdu %s' % v2Pdu.prettyPrint()) return v2Pdu def v2ToV1(v2Pdu, origV1Pdu=None): debug.logger & debug.flagPrx and debug.logger('v2ToV1: v2Pdu %s' % v2Pdu.prettyPrint()) pduType = v2Pdu.tagSet if __v2ToV1PduMap.has_key(pduType): v1Pdu = __v2ToV1PduMap[pduType].clone() else: raise error.ProtocolError('Unsupported PDU type') v2VarBinds = v2c.apiPDU.getVarBinds(v2Pdu) v1VarBinds = [] if rfc3411.notificationClassPDUs.has_key(pduType): v1.apiTrapPDU.setDefaults(v1Pdu) else: v1.apiPDU.setDefaults(v1Pdu) # 3.2 if rfc3411.notificationClassPDUs.has_key(pduType): # 3.2.1 (snmpTrapOID, snmpTrapOIDParam) = v2VarBinds[1] if snmpTrapOID != v2c.apiTrapPDU.snmpTrapOID: raise error.ProtocolError('Second OID not snmpTrapOID') if __v2ToV1TrapMap.has_key(snmpTrapOIDParam): for oid, val in v2VarBinds: if oid == v2c.apiTrapPDU.snmpTrapEnterprise: v1.apiTrapPDU.setEnterprise(v1Pdu, val) break else: # snmpTraps v1.apiTrapPDU.setEnterprise(v1Pdu, (1, 3, 6, 1, 6, 3, 1, 1, 5)) else: if snmpTrapOIDParam[-2] == 0: v1.apiTrapPDU.setEnterprise(v1Pdu, snmpTrapOIDParam[:-2]) else: v1.apiTrapPDU.setEnterprise(v1Pdu, snmpTrapOIDParam[:-1]) # 3.2.2 for oid, val in v2VarBinds: # snmpTrapAddress if oid == v2c.apiTrapPDU.snmpTrapAddress: v1.apiTrapPDU.setAgentAddr(v1Pdu, val) break else: v1.apiTrapPDU.setAgentAddr(v1Pdu, v1.apiTrapPDU.agentAddress) # 3.2.3 if __v2ToV1TrapMap.has_key(snmpTrapOIDParam): v1.apiTrapPDU.setGenericTrap(v1Pdu, __v2ToV1TrapMap[snmpTrapOIDParam]) else: v1.apiTrapPDU.setGenericTrap(v1Pdu, 6) # 3.2.4 if __v2ToV1TrapMap.has_key(snmpTrapOIDParam): v1.apiTrapPDU.setSpecificTrap(v1Pdu, 0) else: v1.apiTrapPDU.setSpecificTrap(v1Pdu, snmpTrapOIDParam[-1]) # 3.2.5 v1.apiTrapPDU.setTimeStamp(v1Pdu, v2VarBinds[0][1]) __v2VarBinds = [] for oid, val in v2VarBinds[2:]: if __v2ToV1TrapMap.has_key(oid) or \ oid in (v2c.apiTrapPDU.sysUpTime, v2c.apiTrapPDU.snmpTrapAddress, v2c.apiTrapPDU.snmpTrapEnterprise): continue __v2VarBinds.append((oid, val)) v2VarBinds = __v2VarBinds; # 3.2.6 --> done below if rfc3411.responseClassPDUs.has_key(pduType): idx = len(v2VarBinds)-1 while idx >= 0: # 4.1.2.1 oid, val = v2VarBinds[idx] if v2c.Counter64.tagSet == val.tagSet: if origV1Pdu.tagSet == v1.GetRequestPDU.tagSet: v1.apiPDU.setErrorStatus(v1Pdu, 2) v1.apiPDU.setErrorIndex(v1Pdu, idx+1) break elif origV1Pdu.tagSet == v1.GetNextRequestPDU.tagSet: raise error.StatusInformation(idx=idx, pdu=v2Pdu) else: raise error.ProtocolError('Counter64 on the way') # 4.1.2.2.1&2 if isinstance(val, v2c.Null): v1.apiPDU.setErrorStatus(v1Pdu, 2) v1.apiPDU.setErrorIndex(v1Pdu, idx+1) idx = idx - 1 # 4.1.2.3.1 v2ErrorStatus = v2c.apiPDU.getErrorStatus(v2Pdu) if v2ErrorStatus: v1.apiPDU.setErrorStatus( v1Pdu, __v2ToV1ErrorMap[v2ErrorStatus] ) v1.apiPDU.setErrorIndex(v1Pdu, v2c.apiPDU.getErrorIndex(v2Pdu)) # Translate Var-Binds if rfc3411.responseClassPDUs.has_key(pduType) and \ v1.apiPDU.getErrorStatus(v1Pdu): v1VarBinds = v1.apiPDU.getVarBinds(origV1Pdu) else: for oid, v2Val in v2VarBinds: v1VarBinds.append( (oid, __v2ToV1ValueMap[v2Val.tagSet].clone(v2Val)) ) if rfc3411.notificationClassPDUs.has_key(pduType): v1.apiTrapPDU.setVarBinds(v1Pdu, v1VarBinds) else: v1.apiPDU.setVarBinds(v1Pdu, v1VarBinds) v1.apiPDU.setRequestID( v1Pdu, v2c.apiPDU.getRequestID(v2Pdu) ) debug.logger & debug.flagPrx and debug.logger('v2ToV1: v1Pdu %s' % v1Pdu.prettyPrint()) return v1Pdu PK†£=4Krä::pysnmp/proto/proxy/rfc2576.pyc;ò ð"ýLc @sDdklZlZlZdklZlZdklZhei i ei ƒ<ei i ei ƒ<ei i ei ƒ<eii eiƒ<eii eiƒ<eii eiƒ<eii eiƒ<eii eiƒ<eii eiƒ contextEngineId/contextName # mapping is up to MP module for notifications but belongs to secmod # responsibility for other PDU types. Since I do not yet understand # the reason for this de-coupling, I've moved this code from MP-scope # in here. def generateRequestMsg( self, snmpEngine, messageProcessingModel, globalData, maxMessageSize, securityModel, securityEngineId, securityName, securityLevel, scopedPDU ): msg, = globalData contextEngineId, contextName, pdu = scopedPDU # rfc2576: 5.2.3 ( snmpCommunityName, snmpCommunitySecurityName, snmpCommunityContextEngineId, snmpCommunityContextName, snmpCommunityTransportTag ) = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols( 'SNMP-COMMUNITY-MIB', 'snmpCommunityName', 'snmpCommunitySecurityName', 'snmpCommunityContextEngineID', 'snmpCommunityContextName', 'snmpCommunityTransportTag' ) nextMibNode = snmpCommunitySecurityName while 1: try: nextMibNode = snmpCommunitySecurityName.getNextNodeWithValue( nextMibNode.name, securityName ) except NoSuchInstanceError: break instId = nextMibNode.name[len(snmpCommunitySecurityName.name):] mibNode = snmpCommunityContextEngineId.getNode( snmpCommunityContextEngineId.name + instId ) if mibNode.syntax != contextEngineId: continue mibNode = snmpCommunityContextName.getNode( snmpCommunityContextName.name + instId ) if mibNode.syntax != contextName: continue mibNode = snmpCommunityName.getNode( snmpCommunityName.name + instId ) securityParameters = mibNode.syntax # XXX snmpCommunityTransportTag matching should probably be here debug.logger & debug.flagSM and debug.logger('generateRequestMsg: using community %s for securityName %s, contextEngineId %s contextName %s' % (securityParameters, securityName, contextEngineId, contextName)) msg.setComponentByPosition(1, securityParameters) msg.setComponentByPosition(2) msg.getComponentByPosition(2).setComponentByType(pdu.tagSet, pdu) debug.logger & debug.flagMP and debug.logger('generateRequestMsg: %s' % (msg.prettyPrint(),)) wholeMsg = encoder.encode(msg) return ( securityParameters, wholeMsg ) raise error.StatusInformation( errorIndication = 'unknownCommunityName' ) def generateResponseMsg( self, snmpEngine, messageProcessingModel, globalData, maxMessageSize, securityModel, securityEngineID, securityName, securityLevel, scopedPDU, securityStateReference ): # rfc2576: 5.2.2 msg, = globalData contextEngineId, contextName, pdu = scopedPDU cachedSecurityData = self._cachePop(securityStateReference) communityName = cachedSecurityData['communityName'] debug.logger & debug.flagSM and debug.logger('generateResponseMsg: recovered community %s by securityStateReference %s' % (communityName, securityStateReference)) msg.setComponentByPosition(1, communityName) msg.setComponentByPosition(2) msg.getComponentByPosition(2).setComponentByType(pdu.tagSet, pdu) debug.logger & debug.flagMP and debug.logger('generateResponseMsg: %s' % (msg.prettyPrint(),)) wholeMsg = encoder.encode(msg) return ( communityName, wholeMsg ) def processIncomingMsg( self, snmpEngine, messageProcessingModel, maxMessageSize, securityParameters, securityModel, securityLevel, wholeMsg, msg ): # rfc2576: 5.2.1 ( communityName, srcTransport, destTransport ) = securityParameters ( snmpCommunityName, snmpCommunitySecurityName, snmpCommunityContextEngineId, snmpCommunityContextName, snmpCommunityTransportTag ) = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols( 'SNMP-COMMUNITY-MIB', 'snmpCommunityName', 'snmpCommunitySecurityName', 'snmpCommunityContextEngineID', 'snmpCommunityContextName', 'snmpCommunityTransportTag' ) nextMibNode = snmpCommunityName addrToTagMap = {} # cache to save on inner loop while 1: try: nextMibNode = snmpCommunityName.getNextNodeWithValue( nextMibNode.name, communityName ) except NoSuchInstanceError: snmpInBadCommunityNames, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMPv2-MIB', 'snmpInBadCommunityNames') snmpInBadCommunityNames.syntax = snmpInBadCommunityNames.syntax+1 raise error.StatusInformation( errorIndication = 'unknownCommunityName' ) instId = nextMibNode.name[len(snmpCommunityName.name):] # snmpCommunityTransportTag matching mibNode = snmpCommunityTransportTag.getNode( snmpCommunityTransportTag.name + instId ) if mibNode.syntax: if not addrToTagMap: # Build a cache of addr->tag map ( snmpTargetAddrTDomain, snmpTargetAddrTAddress, snmpTargetAddrTagList ) = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('SNMP-TARGET-MIB', 'snmpTargetAddrTDomain', 'snmpTargetAddrTAddress', 'snmpTargetAddrTagList') __nextMibNode = snmpTargetAddrTagList while 1: try: __nextMibNode = snmpTargetAddrTagList.getNextNode( __nextMibNode.name ) except NoSuchInstanceError: break __instId = __nextMibNode.name[ len(snmpTargetAddrTagList.name): ] targetAddrTDomain = snmpTargetAddrTDomain.getNode( snmpTargetAddrTDomain.name + __instId ).syntax targetAddrTAddress = snmpTargetAddrTAddress.getNode( snmpTargetAddrTAddress.name + __instId ).syntax targetAddrTDomain = tuple(targetAddrTDomain) if targetAddrTDomain[:len(udp.snmpUDPDomain)] == udp.snmpUDPDomain: SnmpUDPAddress, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('SNMPv2-TM', 'SnmpUDPAddress') targetAddrTAddress = tuple( SnmpUDPAddress(targetAddrTAddress) ) elif targetAddrTDomain[:len(udp.snmpUDP6Domain)] == udp6.snmpUDP6Domain: TransportAddressIPv6, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('TRANSPORT-ADDRESS-MIB', 'TransportAddressIPv6') targetAddrTAddress = tuple( TransportAddressIPv6(targetAddrTAddress) ) targetAddr = targetAddrTDomain, targetAddrTAddress targetAddrTagList = snmpTargetAddrTagList.getNode( snmpTargetAddrTagList.name + __instId ).syntax if not addrToTagMap.has_key(targetAddr): addrToTagMap[targetAddr] = {} for tag in string.split(str(targetAddrTagList)): addrToTagMap[targetAddr][tag] = 1 debug.logger & debug.flagSM and debug.logger('processIncomingMsg: address-to-tag map %s' % addrToTagMap) # XXX snmpTargetAddrTMask matching not implemented if addrToTagMap.has_key(srcTransport): for tag in string.split(str(mibNode.syntax)): if addrToTagMap[srcTransport].has_key(tag): debug.logger & debug.flagSM and debug.logger('processIncomingMsg: tag %s matched transport %s' % (tag, srcTransport)) break else: continue break communityName = snmpCommunityName.getNode( snmpCommunityName.name + instId ) securityName = snmpCommunitySecurityName.getNode( snmpCommunitySecurityName.name + instId ) contextEngineId = snmpCommunityContextEngineId.getNode( snmpCommunityContextEngineId.name + instId ) contextName = snmpCommunityContextName.getNode( snmpCommunityContextName.name + instId ) snmpEngineID, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-FRAMEWORK-MIB', 'snmpEngineID') debug.logger & debug.flagSM and debug.logger('processIncomingMsg: looked up securityName %s contextEngineId %s contextName %s by communityName %s' % (securityName, contextEngineId, contextName, communityName)) stateReference = self._cachePush( communityName=communityName.syntax ) securityEngineID = snmpEngineID.syntax securityName = securityName.syntax scopedPDU = ( contextEngineId.syntax, contextName.syntax, msg.getComponentByPosition(2).getComponent() ) maxSizeResponseScopedPDU = maxMessageSize - 128 securityStateReference = stateReference debug.logger & debug.flagSM and debug.logger('processIncomingMsg: generated maxSizeResponseScopedPDU %s securityStateReference %s' % (maxSizeResponseScopedPDU, securityStateReference)) return ( securityEngineID, securityName, scopedPDU, maxSizeResponseScopedPDU, securityStateReference ) class SnmpV2cSecurityModel(SnmpV1SecurityModel): securityModelID = 2 # XXX # contextEngineId/contextName goes to globalData PK†£=…:ã¾ó#ó#pysnmp/proto/secmod/rfc2576.pyc;ò ëß÷Lc@sdkZdklZdklZdklZlZdkl Z dk l Z dk l Z deifd„ƒYZd efd „ƒYZdS( N(sencoder(sbase(sudpsudp6(sNoSuchInstanceError(serror(sdebugsSnmpV1SecurityModelcBs)tZdZd„Zd„Zd„ZRS(Nic Csã|\}| \}}}|iii i ddddddƒ\}}} }}|} xvnony|i| i|ƒ} Wntj oPnX| it|iƒ} | i| i| ƒ} | i|joq^n|i|i| ƒ} | i|joq^n|i|i| ƒ} | i}titi@otid||||fƒ|id|ƒ|id ƒ|id ƒi |i!|ƒtiti"@otid |i#ƒfƒt$i%|ƒ}||fSq^Wt'i(d d ƒ‚dS( NsSNMP-COMMUNITY-MIBssnmpCommunityNamessnmpCommunitySecurityNamessnmpCommunityContextEngineIDssnmpCommunityContextNamessnmpCommunityTransportTagis]generateRequestMsg: using community %s for securityName %s, contextEngineId %s contextName %sisgenerateRequestMsg: %sserrorIndicationsunknownCommunityName()s globalDatasmsgs scopedPDUscontextEngineIds contextNamespdus snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolsssnmpCommunityNamessnmpCommunitySecurityNamessnmpCommunityContextEngineIdssnmpCommunityContextNamessnmpCommunityTransportTags nextMibNodesgetNextNodeWithValuesnames securityNamesNoSuchInstanceErrorslensinstIdsgetNodesmibNodessyntaxssecurityParameterssdebugsloggersflagSMssetComponentByPositionsgetComponentByPositionssetComponentByTypestagSetsflagMPs prettyPrintsencodersencodeswholeMsgserrorsStatusInformation(sselfs snmpEnginesmessageProcessingModels globalDatasmaxMessageSizes securityModelssecurityEngineIds securityNames securityLevels scopedPDUsmibNodesinstIds nextMibNodessnmpCommunityContextEngineIdscontextEngineIdssnmpCommunitySecurityNamesmsgs contextNamessnmpCommunityTransportTagssecurityParametersspduswholeMsgssnmpCommunityContextNamessnmpCommunityName((s9build/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc2576.pysgenerateRequestMsgs@  . +c CsÚ|\}| \} } }|i| ƒ} | d}t i t i @ot i d|| fƒ|id|ƒ|idƒ|idƒi|i|ƒt i t i@ot i d|iƒfƒti|ƒ}||fSdS(Ns communityNamesHgenerateResponseMsg: recovered community %s by securityStateReference %siisgenerateResponseMsg: %s(s globalDatasmsgs scopedPDUscontextEngineIds contextNamespdusselfs _cachePopssecurityStateReferencescachedSecurityDatas communityNamesdebugsloggersflagSMssetComponentByPositionsgetComponentByPositionssetComponentByTypestagSetsflagMPs prettyPrintsencodersencodeswholeMsg(sselfs snmpEnginesmessageProcessingModels globalDatasmaxMessageSizes securityModelssecurityEngineIDs securityNames securityLevels scopedPDUssecurityStateReferences contextNamescachedSecurityDatascontextEngineIdswholeMsgsmsgspdus communityName((s9build/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc2576.pysgenerateResponseMsgXs  ( +c +CsÅ|\}}}|iiiiddddddƒ\})}} }%}"|)} h}x3no+y|)i| i|ƒ} WnStj oG|iiiidd ƒ\}|id|_tid d ƒ‚nX| it|)iƒ} |"i|"i| ƒ}$|$io| oú|iiiid d ddƒ\} }(}|}*x¡no™y|i|*iƒ}*Wntj oPnX|*it|iƒ}| i| i|ƒi}|(i|(i|ƒi}t#|ƒ}|tt$i%ƒ t$i%jo4|iiiiddƒ\}!t#|!|ƒƒ}nR|tt$i'ƒ t(i'jo4|iiiiddƒ\}t#||ƒƒ}n||f}#|i|i|ƒi}'|i,|#ƒ oh||#ƒf}|d}|}t1i2t1i3@ot1i2d||fƒ||&|||fSdS(NsSNMP-COMMUNITY-MIBssnmpCommunityNamessnmpCommunitySecurityNamessnmpCommunityContextEngineIDssnmpCommunityContextNamessnmpCommunityTransportTagis __SNMPv2-MIBssnmpInBadCommunityNamesserrorIndicationsunknownCommunityNamesSNMP-TARGET-MIBssnmpTargetAddrTDomainssnmpTargetAddrTAddressssnmpTargetAddrTagLists SNMPv2-TMsSnmpUDPAddresssTRANSPORT-ADDRESS-MIBsTransportAddressIPv6s)processIncomingMsg: address-to-tag map %ss/processIncomingMsg: tag %s matched transport %ss__SNMP-FRAMEWORK-MIBs snmpEngineIDscprocessIncomingMsg: looked up securityName %s contextEngineId %s contextName %s by communityName %ss communityNameii€sSprocessIncomingMsg: generated maxSizeResponseScopedPDU %s securityStateReference %s(CssecurityParameterss communityNames srcTransports destTransports snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolsssnmpCommunityNamessnmpCommunitySecurityNamessnmpCommunityContextEngineIdssnmpCommunityContextNamessnmpCommunityTransportTags nextMibNodes addrToTagMapsgetNextNodeWithValuesnamesNoSuchInstanceErrorssnmpInBadCommunityNamesssyntaxserrorsStatusInformationslensinstIdsgetNodesmibNodessnmpTargetAddrTDomainssnmpTargetAddrTAddressssnmpTargetAddrTagLists!_SnmpV1SecurityModel__nextMibNodes getNextNodes_SnmpV1SecurityModel__instIdstargetAddrTDomainstargetAddrTAddressstuplesudps snmpUDPDomainsSnmpUDPAddressssnmpUDP6Domainsudp6sTransportAddressIPv6s targetAddrstargetAddrTagListshas_keysstringssplitsstrstagsdebugsloggersflagSMs securityNamescontextEngineIds contextNames snmpEngineIDsselfs _cachePushsstateReferencessecurityEngineIDsmsgsgetComponentByPositions getComponents scopedPDUsmaxMessageSizesmaxSizeResponseScopedPDUssecurityStateReference(+sselfs snmpEnginesmessageProcessingModelsmaxMessageSizessecurityParameterss securityModels securityLevelswholeMsgsmsgssnmpTargetAddrTDomainsinstIds nextMibNodessnmpCommunityContextEngineIdstags communityNamesstateReferencesTransportAddressIPv6stargetAddrTAddresss scopedPDUssnmpCommunitySecurityNamessecurityEngineIDsmaxSizeResponseScopedPDUs snmpEngineIDssnmpInBadCommunityNamesssnmpTargetAddrTagLists srcTransports contextNames addrToTagMaps destTransportstargetAddrTDomains_SnmpV1SecurityModel__instIdssecurityStateReferencescontextEngineIdsSnmpUDPAddressssnmpCommunityTransportTags targetAddrsmibNodessnmpCommunityContextNames securityNamestargetAddrTagListssnmpTargetAddrTAddressssnmpCommunityNames!_SnmpV1SecurityModel__nextMibNode((s9build/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc2576.pysprocessIncomingMsgvsŠ  *  &(  .  $ ((s__name__s __module__ssecurityModelIDsgenerateRequestMsgsgenerateResponseMsgsprocessIncomingMsg(((s9build/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc2576.pysSnmpV1SecurityModel s F sSnmpV2cSecurityModelcBstZdZRS(Ni(s__name__s __module__ssecurityModelID(((s9build/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc2576.pysSnmpV2cSecurityModels(sstringspyasn1.codec.bersencoderspysnmp.proto.secmodsbasespysnmp.carrier.asynsock.dgramsudpsudp6spysnmp.smi.errorsNoSuchInstanceErrors pysnmp.protoserrorspysnmpsdebugsAbstractSecurityModelsSnmpV1SecurityModelsSnmpV2cSecurityModel( sudpsstringsSnmpV1SecurityModelsencodersSnmpV2cSecurityModelsudp6sbaseserrorsdebugsNoSuchInstanceError((s9build/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc2576.pys?s      øPK 150: usmStatsNotInTimeWindows, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-USER-BASED-SM-MIB', 'usmStatsNotInTimeWindows') usmStatsNotInTimeWindows.syntax = usmStatsNotInTimeWindows.syntax+1 raise error.StatusInformation( errorIndication = 'notInTimeWindow', oid=usmStatsNotInTimeWindows.name, val=usmStatsNotInTimeWindows.syntax, securityStateReference=securityStateReference, securityLevel=2, contextEngineId=contextEngineId, contextName=contextName, maxSizeResponseScopedPDU=maxSizeResponseScopedPDU ) # 3.2.7b else: # 3.2.7b.1 if msgAuthoritativeEngineBoots > snmpEngineBoots or \ msgAuthoritativeEngineBoots == snmpEngineBoots and \ msgAuthoritativeEngineTime > latestReceivedEngineTime: self.__timeline[msgAuthoritativeEngineID] = ( msgAuthoritativeEngineBoots, msgAuthoritativeEngineTime, msgAuthoritativeEngineTime, int(time.time()) ) expireAt = self.__expirationTimer + 300 if not self.__timelineExpQueue.has_key(expireAt): self.__timelineExpQueue[expireAt] = [] self.__timelineExpQueue[expireAt].append( msgAuthoritativeEngineID ) debug.logger & debug.flagSM and debug.logger('processIncomingMsg: stored timeline msgAuthoritativeEngineBoots %s msgAuthoritativeEngineTime %s for msgAuthoritativeEngineID %s' % (msgAuthoritativeEngineBoots, msgAuthoritativeEngineTime, repr(msgAuthoritativeEngineID))) # 3.2.7b.2 if snmpEngineBoots == 2147483647L or \ msgAuthoritativeEngineBoots < snmpEngineBoots or \ msgAuthoritativeEngineBoots == snmpEngineBoots and \ abs(idleTime + int(snmpEngineTime) - \ int(msgAuthoritativeEngineTime)) > 150: raise error.StatusInformation( errorIndication = 'notInTimeWindow' ) # 3.2.8a if securityLevel == 3: privHandler = self.privServices.get(usmUserPrivProtocol) if privHandler is None: raise error.StatusInformation( errorIndication = 'decryptionError' ) encryptedPDU = scopedPduData.getComponentByPosition(1) if encryptedPDU is None: # no ciphertext raise error.StatusInformation( errorIndication = 'decryptionError' ) try: decryptedData = privHandler.decryptData( usmUserPrivKeyLocalized, ( securityParameters.getComponentByPosition(1), securityParameters.getComponentByPosition(2), securityParameters.getComponentByPosition(5) ), encryptedPDU ) debug.logger & debug.flagSM and debug.logger('processIncomingMsg: PDU deciphered into %s' % repr(decryptedData)) except error.StatusInformation: usmStatsDecryptionErrors, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-USER-BASED-SM-MIB', 'usmStatsDecryptionErrors') usmStatsDecryptionErrors.syntax = usmStatsDecryptionErrors.syntax+1 raise error.StatusInformation( errorIndication = 'decryptionError', oid=usmStatsDecryptionErrors.name, val=usmStatsDecryptionErrors.syntax, securityStateReference=securityStateReference, securityLevel=securityLevel, contextEngineId=contextEngineId, contextName=contextName, maxSizeResponseScopedPDU=maxSizeResponseScopedPDU ) scopedPduSpec = scopedPduData.setComponentByPosition(0).getComponentByPosition(0) try: scopedPDU, rest = decoder.decode( decryptedData, asn1Spec=scopedPduSpec ) except PyAsn1Error, why: debug.logger & debug.flagSM and debug.logger('processIncomingMsg: scopedPDU decoder failed %s' % why) raise error.StatusInformation( errorIndication = 'decryptionError' ) else: # 3.2.8b scopedPDU = scopedPduData.getComponentByPosition(0) if scopedPDU is None: # no plaintext raise error.StatusInformation( errorIndication = 'decryptionError' ) debug.logger & debug.flagSM and debug.logger('processIncomingMsg: scopedPDU decoded %s' % scopedPDU.prettyPrint()) # 3.2.10 securityName = usmUserSecurityName debug.logger & debug.flagSM and debug.logger('processIncomingMsg: cached msgUserName %s info by securityStateReference %s' % (msgUserName, securityStateReference)) # Delayed to include details if not msgUserName and not msgAuthoritativeEngineID: usmStatsUnknownUserNames, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-USER-BASED-SM-MIB', 'usmStatsUnknownUserNames') usmStatsUnknownUserNames.syntax = usmStatsUnknownUserNames.syntax+1 raise error.StatusInformation( errorIndication='unknownSecurityName', oid=usmStatsUnknownUserNames.name, val=usmStatsUnknownUserNames.syntax, securityStateReference=securityStateReference, securityEngineID=msgAuthoritativeEngineID, securityLevel=securityLevel, contextEngineId=contextEngineId, contextName=contextName, maxSizeResponseScopedPDU=maxSizeResponseScopedPDU, PDU=scopedPDU ) # 3.2.12 return ( msgAuthoritativeEngineID, securityName, scopedPDU, maxSizeResponseScopedPDU, securityStateReference ) def __expireTimelineInfo(self): if self.__timelineExpQueue.has_key(self.__expirationTimer): for engineIdKey in self.__timelineExpQueue[self.__expirationTimer]: if self.__timeline.has_key(engineIdKey): del self.__timeline[engineIdKey] debug.logger & debug.flagSM and debug.logger('__expireEnginesInfo: expiring %s' % (engineIdKey,)) del self.__timelineExpQueue[self.__expirationTimer] self.__expirationTimer = self.__expirationTimer + 1 def receiveTimerTick(self, snmpEngine, timeNow): self.__expireTimelineInfo() PK†£=âK¢Ùµ µ (pysnmp/proto/secmod/rfc3414/localkey.pyc;ò OHLc@s‹ydklZlZWn7ej o+dkZdkZeiZeiZnXd„Zd„Zd„Zd„Z d„Z d„Z dS((smd5ssha1NcCsÖtƒ}||odt|ƒdpd}t|ƒ}d}d}x~|djop|d}||jo|i |||!ƒ|}n.|i |||!|d||!ƒ||}|d}qJW|i ƒSdS(Ni@iii@( smd5smds passphraseslens ringBuffers ringBufferLenscountsmarksesupdatesdigest(s passphrasescountsmds ringBufferLensmarks ringBufferse((sBbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/localkey.pyshashPassphraseMD5 s &     # cCs'td|t|ƒ|fƒiƒSdS(Ns%s%s%s(smd5spassKeysstrs snmpEngineIdsdigest(spassKeys snmpEngineId((sBbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/localkey.pyslocalizeKeyMD5scCstt|ƒ|ƒSdS(N(slocalizeKeyMD5shashPassphraseMD5s passphrases snmpEngineId(s passphrases snmpEngineId((sBbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/localkey.pyspasswordToKeyMD5 scCsÈtƒ}|dt|ƒd}t|ƒ}d}d}x~|djop|d}||jo|i |||!ƒ|}n.|i |||!|d||!ƒ||}|d}q<W|i ƒSdS(Ni@iii@( ssha1smds passphraseslens ringBuffers ringBufferLenscountsmarksesupdatesdigest(s passphrasescountsmds ringBufferLensmarks ringBufferse((sBbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/localkey.pyshashPassphraseSHA$s      # cCs'td|t|ƒ|fƒiƒSdS(Ns%s%s%s(ssha1spassKeysstrs snmpEngineIdsdigest(spassKeys snmpEngineId((sBbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/localkey.pyslocalizeKeySHA7scCstt|ƒ|ƒSdS(N(slocalizeKeySHAshashPassphraseSHAs passphrases snmpEngineId(s passphrases snmpEngineId((sBbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/localkey.pyspasswordToKeySHA:s( shashlibsmd5ssha1s ImportErrorsshasnewshashPassphraseMD5slocalizeKeyMD5spasswordToKeyMD5shashPassphraseSHAslocalizeKeySHAspasswordToKeySHA( ssha1shashPassphraseSHAshashPassphraseMD5spasswordToKeyMD5spasswordToKeySHAsshaslocalizeKeySHAslocalizeKeyMD5smd5((sBbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/localkey.pys?s      PK†£=ÆB°Ýaa'pysnmp/proto/secmod/rfc3414/service.pyc;ò ÔöLc@sûdklZdklZlZlZdklZlZdk l Z dk l Z dk lZdklZlZdklZlZlZdklZlZd klZd klZd kZd eieifd „ƒYZ defd„ƒYZ!d S((sAbstractSecurityModel(shmacmd5shmacshasnoauth(sdessnopriv(saes(slocalkey(sNoSuchInstanceError(srfc1155serror(sunivs namedtypes constraint(sencodersdecoder(s PyAsn1Error(sdebugNsUsmSecurityParametersc BsÚtZeieideiƒƒeideiƒide i ddƒƒƒeideiƒide i ddƒƒƒeideiƒide i ddƒƒƒeid eiƒƒeid eiƒƒƒZ RS( NsmsgAuthoritativeEngineIDsmsgAuthoritativeEngineBootss subtypeSpecilÿÿsmsgAuthoritativeEngineTimes msgUserNamei smsgAuthenticationParameterssmsgPrivacyParameters( s__name__s __module__s namedtypes NamedTypess NamedTypesunivs OctetStringsIntegerssubtypes constraintsValueRangeConstraintsValueSizeConstraints componentType(((sAbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/service.pysUsmSecurityParameterss ---sSnmpUSMSecurityModelcBsòtZdZheiieiƒ<eiieiƒ<ei iei ƒs snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolsssyntaxs snmpEngineIDssecurityStateReferencesNonesselfs _cachePopscachedSecurityDatas usmUserNamesgetsusmUserAuthProtocolsusmUserAuthKeyLocalizedsusmUserPrivProtocolsusmUserPrivKeyLocalizedssecurityEngineIDsdebugsloggersflagSMs securityNames"_SnmpUSMSecurityModel__getUserInfosNoSuchInstanceErrorspysnmpUsmDiscoverys(_SnmpUSMSecurityModel__reportUnknownNames$_SnmpUSMSecurityModel__cloneUserInfoserrorsStatusInformationsusmUserSecurityNamesreprs globalDatasmsgs securityLevelsUsmSecurityParametersssecurityParametersssetComponentByPositionsgetComponentByPositions scopedPDUDatas scopedPDUs_SnmpUSMSecurityModel__timelineshas_keyssnmpEngineBootsssnmpEngineTimeslatestReceivedEngineTimeslatestUpdateTimestampsclones privServicess privHandlers prettyPrintsencodersencodes dataToEncrypts encryptDatas encryptedDatasprivParameterss authServicess authHandlerswholeMsgsauthenticateOutgoingMsgsauthenticatedWholeMsg(#sselfs snmpEnginesmessageProcessingModels globalDatasmaxMessageSizes securityModelssecurityEngineIDs securityNames securityLevels scopedPDUssecurityStateReferences usmUserNamessnmpEngineTimeswholeMsgsusmUserAuthProtocolspysnmpUsmDiscoverysauthenticatedWholeMsgs privHandlers snmpEngineIDs encryptedDatasmsgs scopedPDUDatascachedSecurityDatasprivParameterssusmUserSecurityNamesusmUserPrivProtocolssnmpEngineBootsslatestUpdateTimestampssecurityParametersslatestReceivedEngineTimes dataToEncrypts(_SnmpUSMSecurityModel__reportUnknownNamesusmUserPrivKeyLocalizedsusmUserAuthKeyLocalizeds authHandler((sAbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/service.pys__generateRequestOrResponseMsg¾sº "  "" '   7  '" , $ " 1  ((  "( +(+(c Cs,|i||||||||| t ƒ SdS(N( sselfs3_SnmpUSMSecurityModel__generateRequestOrResponseMsgs snmpEnginesmessageProcessingModels globalDatasmaxMessageSizes securityModelssecurityEngineIDs securityNames securityLevels scopedPDUsNone( sselfs snmpEnginesmessageProcessingModels globalDatasmaxMessageSizes securityModelssecurityEngineIDs securityNames securityLevels scopedPDU((sAbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/service.pysgenerateRequestMsgŠs c Cs,|i||||||||| | ƒ SdS(N( sselfs3_SnmpUSMSecurityModel__generateRequestOrResponseMsgs snmpEnginesmessageProcessingModels globalDatasmaxMessageSizes securityModelssecurityEngineIDs securityNames securityLevels scopedPDUssecurityStateReference( sselfs snmpEnginesmessageProcessingModels globalDatasmaxMessageSizes securityModelssecurityEngineIDs securityNames securityLevels scopedPDUssecurityStateReference((sAbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/service.pysgenerateResponseMsg£s c 4Cs¨|t|ƒd}y"ti|d|iƒ\}}WnSt j oG|i i i iddƒ\}#|#id|#_tiddƒ‚nXtiti@otid|iƒfƒ|id ƒ}*|id |id ƒƒ}(titi@o tid |(|id ƒfƒ|id ƒ}2|i i i id dƒd i}d}|ii |*ƒ oÁtiti@otidt!|*ƒƒ|* o|i i i iddƒ\}|id|_titi@o tidƒ|i i i iddƒ\}|ioåtiti@o tidƒ|2i$ƒdjo>titi@otid|2iƒƒtiddƒ‚n|2i%ƒ}.|.id ƒ}|.idƒ}tiddd|i'd|id|(d|d|d|d |.d!|ƒ ‚qtiti@o tid"ƒtiddƒ‚qn|i i i id dƒd i}/|id ƒ}titi@otid#t!|*ƒ|fƒ|o«yL|i+|i i |*|ƒ\}"}} }%}titi@o tid$ƒWqMt1j oL|i i i iddƒ\}|i } | olyL|i3|i i |*|ƒ\}"}} }%}titi@o tid%ƒWq}t1j o d} q}Xntiti@otid&t!|*ƒ|fƒ| ot|i i i idd'ƒ\}-|-id|-_tidd(d|-i'd|-id|(d|d|d|d!|ƒ‚q+qMXnd} }"t6}} t6}%}titi@otid)|"||%|fƒ|i7|(ƒ|id |id ƒd*|d+| d,|%d-|ƒ}(d }|d joA| p|% o d}q|d.jo| o d}q qn|ot|i i i idd/ƒ\}|id|_tidd0d|i'd|id|(d|d|d|d!|ƒ‚n|d jp |d.jo»|i:i;|ƒ}0|0t6jotidd1ƒ‚ny"|0i=| |id2ƒ|ƒ}Wn†tij ow|i i i idd3ƒ\}|id|_tidd1d|i'd|id|(d|d|d|d!|ƒ‚nXtiti@o tid4ƒ|*o²|idƒ|id.ƒ|id.ƒtAtBiBƒƒf|i|*<|iCd5}|iEi |ƒ og|iE|ƒ\}+|+id|+_tidd?d|+i'd|+id|(dd.d|d|d!|ƒ‚qŒ q |3|&jp|3|&jo |)|,jo |3|)|)tAtBiBƒƒf|i|*<|iCd5}|iEi |ƒ og|iE||3|&jp1|3|&jo$tP|tA| ƒtA|)ƒƒd=jotidd?ƒ‚q n|d joÜ|iRi;|%ƒ}!|!t6jotiddAƒ‚n|2idƒ}|t6jotiddAƒ‚nye|!iU||idƒ|id.ƒ|idBƒf|ƒ} titi@otidCt!| ƒƒWn†tij ow|i i i iddDƒ\}|id|_tiddAd|i'd|id|(d|d|d|d!|ƒ‚nX|2iXd ƒid ƒ}1yti| d|1ƒ\}$}Wq« t j o=}titi@otidE|ƒtiddAƒ‚q« Xn3|2id ƒ}$|$t6jotiddAƒ‚ntiti@otidF|$iƒƒ|"} titi@otidG||(fƒ| o|* o€|i i i idd'ƒ\}-|-id|-_tidd(d|-i'd|-id|(dH|*d|d|d|d!|dI|$ƒ ‚n|*| |$||(fSdS(JNi0sasn1Specs __SNMPv2-MIBssnmpInASNParseErrsiserrorIndications parseErrorsprocessIncomingMsg: %sis msgUserNameisKprocessIncomingMsg: cache write securityStateReference %s by msgUserName %ss__SNMP-FRAMEWORK-MIBs snmpEngineIDss/processIncomingMsg: unknown securityEngineID %ss__SNMP-USER-BASED-SM-MIBsusmStatsUnknownEngineIDss)processIncomingMsg: null securityEngineIDs__PYSNMP-USM-MIBspysnmpUsmDiscoverables.processIncomingMsg: request EngineID discoverys plaintexts2processIncomingMsg: scopedPduData not plaintext %ssunknownEngineIDsoidsvalssecurityStateReferences securityLevelscontextEngineIds contextNames scopedPDUsmaxSizeResponseScopedPDUs.processIncomingMsg: will not discover EngineIDsWprocessIncomingMsg: read from securityParams msgAuthoritativeEngineID %s msgUserName %ss+processIncomingMsg: read user info from LCDs$processIncomingMsg: cloned user infos>processIncomingMsg: unknown securityEngineID %s msgUserName %ssusmStatsUnknownUserNamessunknownSecurityNamestprocessIncomingMsg: now have usmUserSecurityName %s usmUserAuthProtocol %s usmUserPrivProtocol %s for msgUserName %ssusmUserAuthProtocolsusmUserAuthKeyLocalizedsusmUserPrivProtocolsusmUserPrivKeyLocalizedisusmStatsUnsupportedSecLevelssunsupportedSecurityLevelsauthenticationFailureisusmStatsWrongDigestss.processIncomingMsg: incoming msg authenticatedi,s:processIncomingMsg: store timeline for securityEngineID %sssnmpEngineBootsssnmpEngineTimesKprocessIncomingMsg: read snmpEngineBoots (%s), snmpEngineTime (%s) from LCDsyprocessIncomingMsg: read timeline snmpEngineBoots %s snmpEngineTime %s for msgAuthoritativeEngineID %s, idle time %s secssPeer SNMP engine info missinglÿÿi–susmStatsNotInTimeWindowssnotInTimeWindows€processIncomingMsg: stored timeline msgAuthoritativeEngineBoots %s msgAuthoritativeEngineTime %s for msgAuthoritativeEngineID %ssdecryptionErroris*processIncomingMsg: PDU deciphered into %ssusmStatsDecryptionErrorss/processIncomingMsg: scopedPDU decoder failed %ss(processIncomingMsg: scopedPDU decoded %ssKprocessIncomingMsg: cached msgUserName %s info by securityStateReference %sssecurityEngineIDsPDU(]smaxMessageSizeslenssecurityParameterssmaxSizeResponseScopedPDUsdecodersdecodesselfs_securityParametersSpecsrests PyAsn1Errors snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolsssnmpInASNParseErrsssyntaxserrorsStatusInformationsdebugsloggersflagSMs prettyPrintsgetComponentByPositionsmsgAuthoritativeEngineIDs _cachePushssecurityStateReferencesmsgs scopedPduDatascontextEngineIds contextNames_SnmpUSMSecurityModel__timelineshas_keysreprsusmStatsUnknownEngineIDsspysnmpUsmDiscoverablesgetNames getComponents scopedPdusnames securityLevels snmpEngineIDs msgUserNames"_SnmpUSMSecurityModel__getUserInfosusmUserSecurityNamesusmUserAuthProtocolsusmUserAuthKeyLocalizedsusmUserPrivProtocolsusmUserPrivKeyLocalizedsNoSuchInstanceErrors(_SnmpUSMSecurityModel__reportUnknownNames$_SnmpUSMSecurityModel__cloneUserInfosusmStatsUnknownUserNamess usmUserNamesNones _cachePops"_SnmpUSMSecurityModel__reportErrorsusmStatsUnsupportedSecLevelss authServicessgets authHandlersauthenticateIncomingMsgswholeMsgsauthenticatedWholeMsgsusmStatsWrongDigestssintstimes&_SnmpUSMSecurityModel__expirationTimersexpireAts'_SnmpUSMSecurityModel__timelineExpQueuesappendssnmpEngineBootsssnmpEngineTimesclonesidleTimeslatestReceivedEngineTimeslatestUpdateTimestamps ProtocolErrorsmsgAuthoritativeEngineBootssmsgAuthoritativeEngineTimesabssusmStatsNotInTimeWindowss privServicess privHandlers encryptedPDUs decryptDatas decryptedDatasusmStatsDecryptionErrorsssetComponentByPositions scopedPduSpecs scopedPDUswhys securityName(4sselfs snmpEnginesmessageProcessingModelsmaxMessageSizessecurityParameterss securityModels securityLevelswholeMsgsmsgs securityNames usmUserNamessnmpEngineTimes(_SnmpUSMSecurityModel__reportUnknownNames decryptedDatasrestspysnmpUsmDiscoverablesusmUserAuthProtocols"_SnmpUSMSecurityModel__reportErrorsusmUserPrivKeyLocalizedsauthenticatedWholeMsgsexpireAtscontextEngineIdsusmStatsWrongDigestssusmStatsUnsupportedSecLevelssusmStatsDecryptionErrorsswhys encryptedPDUsmaxSizeResponseScopedPDUsidleTimesusmStatsUnknownEngineIDss contextNames msgUserNamesusmUserAuthKeyLocalizeds privHandlersusmUserSecurityNamessnmpInASNParseErrss scopedPDUsusmUserPrivProtocolssnmpEngineBootsslatestUpdateTimestampssecurityStateReferencesmsgAuthoritativeEngineTimesmsgAuthoritativeEngineIDsusmStatsNotInTimeWindowsslatestReceivedEngineTimesusmStatsUnknownUserNamess scopedPdus snmpEngineIDs authHandlers scopedPduSpecs scopedPduDatasmsgAuthoritativeEngineBoots((sAbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/service.pysprocessIncomingMsg¾s¨ +1"( (    "." ".      .               @ 0 $ ,8 A   '% 5N    ' ,   " ((   cCsœ|ii|iƒorx^|i|iD]L}|ii|ƒo3|i|=titi@otid|fƒq'q'W|i|i=n|id|_dS(Ns __expireEnginesInfo: expiring %si( sselfs'_SnmpUSMSecurityModel__timelineExpQueueshas_keys&_SnmpUSMSecurityModel__expirationTimers engineIdKeys_SnmpUSMSecurityModel__timelinesdebugsloggersflagSM(sselfs engineIdKey((sAbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/service.pys__expireTimelineInfo?s -cCs|iƒdS(N(sselfs)_SnmpUSMSecurityModel__expireTimelineInfo(sselfs snmpEnginestimeNow((sAbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/service.pysreceiveTimerTickHs(s__name__s __module__ssecurityModelIDshmacmd5sHmacMd5s serviceIDshmacshasHmacShasnoauthsNoAuths authServicessdessDessaessAessnoprivsNoPrivs privServicessUsmSecurityParameterss_securityParametersSpecs__init__s"_SnmpUSMSecurityModel__getUserInfos$_SnmpUSMSecurityModel__cloneUserInfos3_SnmpUSMSecurityModel__generateRequestOrResponseMsgsgenerateRequestMsgsgenerateResponseMsgsprocessIncomingMsgs)_SnmpUSMSecurityModel__expireTimelineInfosreceiveTimerTick(((sAbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/service.pysSnmpUSMSecurityModelsEE   % j Ì   ÿ‚ ("spysnmp.proto.secmod.basesAbstractSecurityModels pysnmp.proto.secmod.rfc3414.authshmacmd5shmacshasnoauths pysnmp.proto.secmod.rfc3414.privsdessnoprivs pysnmp.proto.secmod.rfc3826.privsaesspysnmp.proto.secmod.rfc3414slocalkeyspysnmp.smi.errorsNoSuchInstanceErrors pysnmp.protosrfc1155serrors pyasn1.typesunivs namedtypes constraintspyasn1.codec.bersencodersdecoders pyasn1.errors PyAsn1ErrorspysnmpsdebugstimesTypeCoercionHackMixInsSequencesUsmSecurityParameterssSnmpUSMSecurityModel(saessdecoderstimeshmacshas constraintsunivsdessUsmSecurityParameterssencodershmacmd5sdebugsAbstractSecurityModels PyAsn1Errorsnoauths namedtypeserrorsrfc1155sNoSuchInstanceErrorsnoprivsSnmpUSMSecurityModelslocalkey((sAbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/service.pys?s        PK†£=¦¥Üf%%(pysnmp/proto/secmod/rfc3414/__init__.pyc;ò U¶®Bc@sdklZeiZdS((sserviceN(spysnmp.proto.secmod.rfc3414sservicesSnmpUSMSecurityModel(sSnmpUSMSecurityModelsservice((sBbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/__init__.pys?s PK ö<Ñj/ªØØ'pysnmp/proto/secmod/rfc3414/localkey.py# Convert plaintext passphrase into a localized key try: from hashlib import md5, sha1 except ImportError: import md5, sha md5 = md5.new sha1 = sha.new # RFC3414: A.2.1 def hashPassphraseMD5(passphrase): md = md5() ringBuffer = passphrase * (passphrase and (64/len(passphrase)+1) or 1) ringBufferLen = len(ringBuffer) count = 0 mark = 0 while count < 16384: e = mark + 64 if e < ringBufferLen: md.update(ringBuffer[mark:e]) mark = e else: md.update( ringBuffer[mark:ringBufferLen] + ringBuffer[0:e-ringBufferLen] ) mark = e-ringBufferLen count = count + 1 return md.digest() def localizeKeyMD5(passKey, snmpEngineId): return md5('%s%s%s' % (passKey, str(snmpEngineId), passKey)).digest() def passwordToKeyMD5(passphrase, snmpEngineId): return localizeKeyMD5(hashPassphraseMD5(passphrase), snmpEngineId) # RFC3414: A.2.2 def hashPassphraseSHA(passphrase): md = sha1() ringBuffer = passphrase * (64/len(passphrase)+1) ringBufferLen = len(ringBuffer) count = 0 mark = 0 while count < 16384: e = mark + 64 if e < ringBufferLen: md.update(ringBuffer[mark:e]) mark = e else: md.update( ringBuffer[mark:ringBufferLen] + ringBuffer[0:e-ringBufferLen] ) mark = e-ringBufferLen count = count + 1 return md.digest() def localizeKeySHA(passKey, snmpEngineId): return sha1('%s%s%s' % (passKey, str(snmpEngineId), passKey)).digest() def passwordToKeySHA(passphrase, snmpEngineId): return localizeKeySHA(hashPassphraseSHA(passphrase), snmpEngineId) PK\vÎ2,pysnmp/proto/secmod/rfc3414/auth/__init__.pyPK†£=.Í$C  ,pysnmp/proto/secmod/rfc3414/auth/hmacmd5.pyc;ò úÆŽJc@sydklZWn%ej odkZeiZnXdkZdklZdklZddZ ddZ dei fd„ƒYZ dS( (smd5N(sbase(serrorsi i0sHmacMd5c BsXtZddddddddddf ZdgdZdgdZd „Zd „ZRS( Niiii ii6i@i\c Csöti|tƒ}|djotidƒ‚n|| }||d}t t t |ƒt ƒ}tit d„||iƒdƒ} tit d„||iƒdƒ}t| |ƒiƒ}t||ƒiƒ} | d } d|| |fSdS(NiÿÿÿÿsCant locate digest placeholderi cCst||AƒS(N(schrsxsy(sxsy((sFbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/auth/hmacmd5.pys)sss%s%s%s(sstringsfindswholeMsgs _twelveZerosslserrors ProtocolErrors wholeHeads wholeTailsmapsordsstrsauthKeys_fortyEightZerossextendedAuthKeysjoinsselfs_HmacMd5__ipadsk1s_HmacMd5__opadsk2smd5sdigestsd1sd2smac( sselfsauthKeyswholeMsgs wholeHeadsextendedAuthKeyslsk2s wholeTailsd1sd2smacsk1((sFbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/auth/hmacmd5.pysauthenticateOutgoingMsgs  $$ cCsNt|ƒdjotiddƒ‚nti|t|ƒƒ} | djoti dƒ‚n|| } || d} d| t | f}ttt|ƒtƒ}titd„||iƒdƒ} titd„||iƒdƒ}t| |ƒiƒ}t||ƒiƒ}|d } | |jotidd ƒ‚n|SdS( Ni serrorIndicationsauthenticationErroriÿÿÿÿsCant locate digest in wholeMsgs%s%s%scCst||AƒS(N(schrsxsy(sxsy((sFbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/auth/hmacmd5.pysVsssauthenticationFailure(slensauthParametersserrorsStatusInformationsstringsfindswholeMsgsstrsls ProtocolErrors wholeHeads wholeTails _twelveZerossauthenticatedWholeMsgsmapsordsauthKeys_fortyEightZerossextendedAuthKeysjoinsselfs_HmacMd5__ipadsk1s_HmacMd5__opadsk2smd5sdigestsd1sd2smac(sselfsauthKeysauthParametersswholeMsgsextendedAuthKeysd2sd1sauthenticatedWholeMsgsk2sk1s wholeTails wholeHeadslsmac((sFbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/auth/hmacmd5.pysauthenticateIncomingMsg>s"  $$  (s__name__s __module__s serviceIDs_HmacMd5__ipads_HmacMd5__opadsauthenticateOutgoingMsgsauthenticateIncomingMsg(((sFbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/auth/hmacmd5.pysHmacMd5s $   )( shashlibsmd5s ImportErrorsnewsstrings pysnmp.proto.secmod.rfc3414.authsbases pysnmp.protoserrors _twelveZeross_fortyEightZerossAbstractAuthenticationServicesHmacMd5(s _twelveZeross_fortyEightZerossstringsHmacMd5sbaseserrorsmd5((sFbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/auth/hmacmd5.pys?s      PK†£=÷Q÷ñ¢¢)pysnmp/proto/secmod/rfc3414/auth/base.pyc;ò  Ec@s$dklZdfd„ƒYZdS((serrorsAbstractAuthenticationServicecBs tZeZd„Zd„ZRS(NcCstidƒ‚dS(Nsno authentication(serrors ProtocolError(sselfsauthKeyswholeMsg((sCbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/auth/base.pysauthenticateOutgoingMsgscCstidƒ‚dS(Nsno authentication(serrors ProtocolError(sselfsauthKeysauthParametersswholeMsg((sCbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/auth/base.pysauthenticateIncomingMsg s(s__name__s __module__sNones serviceIDsauthenticateOutgoingMsgsauthenticateIncomingMsg(((sCbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/auth/base.pysAbstractAuthenticationServices N(s pysnmp.protoserrorsAbstractAuthenticationService(sAbstractAuthenticationServiceserror((sCbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/auth/base.pys?s PKQ¡;²«íèÕ Õ +pysnmp/proto/secmod/rfc3414/auth/hmacmd5.pytry: from hashlib import md5 except ImportError: import md5 md5 = md5.new import string from pysnmp.proto.secmod.rfc3414.auth import base from pysnmp.proto import error _twelveZeros = '\x00'*12 _fortyEightZeros = '\x00'*48 # rfc3414: 6.2.4 class HmacMd5(base.AbstractAuthenticationService): serviceID = (1, 3, 6, 1, 6, 3, 10, 1, 1, 2) # usmHMACMD5AuthProtocol __ipad = [0x36]*64 __opad = [0x5C]*64 # 6.3.1 def authenticateOutgoingMsg(self, authKey, wholeMsg): # Here we expect calling secmod to indicate where the digest # should be in the substrate. Also, it pre-sets digest placeholder # so we hash wholeMsg out of the box. # Yes, that's ugly but that's rfc... l = string.find(wholeMsg, _twelveZeros) if l == -1: raise error.ProtocolError('Cant locate digest placeholder') wholeHead = wholeMsg[:l] wholeTail = wholeMsg[l+12:] # 6.3.1.1 # 6.3.1.2a extendedAuthKey = map(ord, str(authKey) + _fortyEightZeros) # 6.3.1.2b --> noop # 6.3.1.2c k1 = string.join( map(lambda x,y: chr(x^y), extendedAuthKey, self.__ipad), '' ) # 6.3.1.2d --> noop # 6.3.1.2e k2 = string.join( map(lambda x,y: chr(x^y), extendedAuthKey, self.__opad), '' ) # 6.3.1.3 d1 = md5(k1+wholeMsg).digest() # 6.3.1.4 d2 = md5(k2+d1).digest() mac = d2[:12] # 6.3.1.5 & 6 return '%s%s%s' % (wholeHead, mac, wholeTail) # 6.3.2 def authenticateIncomingMsg(self, authKey, authParameters, wholeMsg): # 6.3.2.1 & 2 if len(authParameters) != 12: raise error.StatusInformation( errorIndication='authenticationError' ) # 6.3.2.3 l = string.find(wholeMsg, str(authParameters)) if l == -1: raise error.ProtocolError('Cant locate digest in wholeMsg') wholeHead = wholeMsg[:l] wholeTail = wholeMsg[l+12:] authenticatedWholeMsg = '%s%s%s' % ( wholeHead, _twelveZeros, wholeTail ) # 6.3.2.4a extendedAuthKey = map(ord, str(authKey) + _fortyEightZeros) # 6.3.2.4b --> noop # 6.3.2.4c k1 = string.join( map(lambda x,y: chr(x^y), extendedAuthKey, self.__ipad), '' ) # 6.3.2.4d --> noop # 6.3.2.4e k2 = string.join( map(lambda x,y: chr(x^y), extendedAuthKey, self.__opad), '' ) # 6.3.2.5a d1 = md5(k1+authenticatedWholeMsg).digest() # 6.3.2.5b d2 = md5(k2+d1).digest() # 6.3.2.5c mac = d2[:12] # 6.3.2.6 if mac != authParameters: raise error.StatusInformation( errorIndication='authenticationFailure' ) return authenticatedWholeMsg PK£l=ß êòò*pysnmp/proto/secmod/rfc3414/auth/noauth.pyfrom pysnmp.proto.secmod.rfc3414.auth import base from pysnmp.proto import error class NoAuth(base.AbstractAuthenticationService): serviceID = (1, 3, 6, 1, 6, 3, 10, 1, 1, 1) # usmNoAuthProtocol # 7.2.4.2 def authenticateOutgoingMsg(self, authKey, wholeMsg): raise error.StatusInformation(errorIndication='no authentication') def authenticateIncomingMsg(self, authKey, authParameters, wholeMsg): raise error.StatusInformation(errorIndication='no authentication') PK†£=›cd——-pysnmp/proto/secmod/rfc3414/auth/__init__.pyc;ò ‘¶®Bc@sdS(N((((sGbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/auth/__init__.pys?sPK®»A5î¦ii(pysnmp/proto/secmod/rfc3414/auth/base.pyfrom pysnmp.proto import error class AbstractAuthenticationService: serviceID = None # 7.2.4.1 def authenticateOutgoingMsg(self, authKey, wholeMsg): raise error.ProtocolError('no authentication') # 7.2.4.2 def authenticateIncomingMsg(self, authKey, authParameters, wholeMsg): raise error.ProtocolError('no authentication') PK†£='Ę,pysnmp/proto/secmod/rfc3414/auth/hmacsha.pyc;ò úÆŽJc@sydklZWn%ej odkZeiZnXdkZdklZdkl Z ddZ ddZ dei fd„ƒYZ dS( (ssha1N(sbase(serrorsi i,sHmacShac BsXtZddddddddddf ZdgdZdgdZd„Zd „ZRS( Niiii i6i@i\c Csöti|tƒ}|djotidƒ‚n|| }||d}t t t |ƒt ƒ}tit d„||iƒdƒ} tit d„||iƒdƒ}t| |ƒiƒ}t||ƒiƒ} | d } d|| |fSdS(NiÿÿÿÿsCant locate digest placeholderi cCst||AƒS(N(schrsxsy(sxsy((sFbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/auth/hmacsha.pys(sss%s%s%s(sstringsfindswholeMsgs _twelveZerosslserrors ProtocolErrors wholeHeads wholeTailsmapsordsstrsauthKeys_fortyFourZerossextendedAuthKeysjoinsselfs_HmacSha__ipadsk1s_HmacSha__opadsk2ssha1sdigestsd1sd2smac( sselfsauthKeyswholeMsgs wholeHeadsextendedAuthKeyslsk2s wholeTailsd1sd2smacsk1((sFbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/auth/hmacsha.pysauthenticateOutgoingMsgs  $$ cCsNt|ƒdjotiddƒ‚nti|t|ƒƒ} | djoti dƒ‚n|| } || d} d| t | f}ttt|ƒtƒ}titd„||iƒdƒ} titd„||iƒdƒ}t| |ƒiƒ}t||ƒiƒ}|d } | |jotidd ƒ‚n|SdS( Ni serrorIndicationsauthenticationErroriÿÿÿÿsCant locate digest in wholeMsgs%s%s%scCst||AƒS(N(schrsxsy(sxsy((sFbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/auth/hmacsha.pysUsssauthenticationFailure(slensauthParametersserrorsStatusInformationsstringsfindswholeMsgsstrsls ProtocolErrors wholeHeads wholeTails _twelveZerossauthenticatedWholeMsgsmapsordsauthKeys_fortyFourZerossextendedAuthKeysjoinsselfs_HmacSha__ipadsk1s_HmacSha__opadsk2ssha1sdigestsd1sd2smac(sselfsauthKeysauthParametersswholeMsgsextendedAuthKeysd2sd1sauthenticatedWholeMsgsk2sk1s wholeTails wholeHeadslsmac((sFbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/auth/hmacsha.pysauthenticateIncomingMsg=s"  $$  (s__name__s __module__s serviceIDs_HmacSha__ipads_HmacSha__opadsauthenticateOutgoingMsgsauthenticateIncomingMsg(((sFbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/auth/hmacsha.pysHmacShas $   ((shashlibssha1s ImportErrorsshasnewsstrings pysnmp.proto.secmod.rfc3414.authsbases pysnmp.protoserrors _twelveZeross_fortyFourZerossAbstractAuthenticationServicesHmacSha(s _twelveZerosssha1sstringsHmacShasshasbaseserrors_fortyFourZeros((sFbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/auth/hmacsha.pys?s      PK†£=x Y))+pysnmp/proto/secmod/rfc3414/auth/noauth.pyc;ò _xÝLc@s7dklZdklZdeifd„ƒYZdS((sbase(serrorsNoAuthc Bs>tZddddddddddf Zd„Zd„ZRS(Niiii cCstiddƒ‚dS(NserrorIndicationsno authentication(serrorsStatusInformation(sselfsauthKeyswholeMsg((sEbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/auth/noauth.pysauthenticateOutgoingMsgscCstiddƒ‚dS(NserrorIndicationsno authentication(serrorsStatusInformation(sselfsauthKeysauthParametersswholeMsg((sEbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/auth/noauth.pysauthenticateIncomingMsg s(s__name__s __module__s serviceIDsauthenticateOutgoingMsgsauthenticateIncomingMsg(((sEbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/auth/noauth.pysNoAuths$ N(s pysnmp.proto.secmod.rfc3414.authsbases pysnmp.protoserrorsAbstractAuthenticationServicesNoAuth(sbasesNoAuthserror((sEbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/auth/noauth.pys?s  PKQ¡;ÈV< Ï Ï +pysnmp/proto/secmod/rfc3414/auth/hmacsha.pytry: from hashlib import sha1 except ImportError: import sha sha1 = sha.new import string from pysnmp.proto.secmod.rfc3414.auth import base from pysnmp.proto import error _twelveZeros = '\x00'*12 _fortyFourZeros = '\x00'*44 # 7.2.4 class HmacSha(base.AbstractAuthenticationService): serviceID = (1, 3, 6, 1, 6, 3, 10, 1, 1, 3) # usmHMACSHAAuthProtocol __ipad = [0x36]*64 __opad = [0x5C]*64 # 7.3.1 def authenticateOutgoingMsg(self, authKey, wholeMsg): # 7.3.1.1 # Here we expect calling secmod to indicate where the digest # should be in the substrate. Also, it pre-sets digest placeholder # so we hash wholeMsg out of the box. # Yes, that's ugly but that's rfc... l = string.find(wholeMsg, _twelveZeros) if l == -1: raise error.ProtocolError('Cant locate digest placeholder') wholeHead = wholeMsg[:l] wholeTail = wholeMsg[l+12:] # 7.3.1.2a extendedAuthKey = map(ord, str(authKey) + _fortyFourZeros) # 7.3.1.2b -- noop # 7.3.1.2c k1 = string.join( map(lambda x,y: chr(x^y), extendedAuthKey, self.__ipad), '' ) # 7.3.1.2d -- noop # 7.3.1.2e k2 = string.join( map(lambda x,y: chr(x^y), extendedAuthKey, self.__opad), '' ) # 7.3.1.3 d1 = sha1(k1+wholeMsg).digest() # 7.3.1.4 d2 = sha1(k2+d1).digest() mac = d2[:12] # 7.3.1.5 & 6 return '%s%s%s' % (wholeHead, mac, wholeTail) # 7.3.2 def authenticateIncomingMsg(self, authKey, authParameters, wholeMsg): # 7.3.2.1 & 2 if len(authParameters) != 12: raise error.StatusInformation( errorIndication='authenticationError' ) # 7.3.2.3 l = string.find(wholeMsg, str(authParameters)) if l == -1: raise error.ProtocolError('Cant locate digest in wholeMsg') wholeHead = wholeMsg[:l] wholeTail = wholeMsg[l+12:] authenticatedWholeMsg = '%s%s%s' % ( wholeHead, _twelveZeros, wholeTail ) # 7.3.2.4a extendedAuthKey = map(ord, str(authKey) + _fortyFourZeros) # 7.3.2.4b --> noop # 7.3.2.4c k1 = string.join( map(lambda x,y: chr(x^y), extendedAuthKey, self.__ipad), '' ) # 7.3.2.4d --> noop # 7.3.2.4e k2 = string.join( map(lambda x,y: chr(x^y), extendedAuthKey, self.__opad), '' ) # 7.3.2.5a d1 = sha1(k1+authenticatedWholeMsg).digest() # 7.3.2.5b d2 = sha1(k2+d1).digest() # 7.3.2.5c mac = d2[:12] # 7.3.2.6 if mac != authParameters: raise error.StatusInformation( errorIndication='authenticationFailure' ) return authenticatedWholeMsg PK\vÎ2,pysnmp/proto/secmod/rfc3414/priv/__init__.pyPK†£=¸êù•}})pysnmp/proto/secmod/rfc3414/priv/base.pyc;ò $ŽöLc@s$dklZdfd„ƒYZdS((serrorsAbstractEncryptionServicecBs tZeZd„Zd„ZRS(NcCstidƒ‚dS(Ns no encryption(serrors ProtocolError(sselfs encryptKeysprivParameterss dataToEncrypt((sCbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/priv/base.pys encryptDatascCstidƒ‚dS(Ns no encryption(serrors ProtocolError(sselfs decryptKeysprivParameterss encryptedData((sCbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/priv/base.pys decryptDatas(s__name__s __module__sNones serviceIDs encryptDatas decryptData(((sCbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/priv/base.pysAbstractEncryptionServices N(s pysnmp.protoserrorsAbstractEncryptionService(sAbstractEncryptionServiceserror((sCbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/priv/base.pys?s PK‚¨=Ÿ @kãã*pysnmp/proto/secmod/rfc3414/priv/nopriv.pyfrom pysnmp.proto.secmod.rfc3414.priv import base from pysnmp.proto import error class NoPriv(base.AbstractEncryptionService): serviceID = (1, 3, 6, 1, 6, 3, 10, 1, 2, 1) # usmNoPrivProtocol def encryptData(self, encryptKey, privParameters, dataToEncrypt): raise error.StatusInformation(errorIndication='no encryption') def decryptData(self, decryptKey, privParameters, encryptedData): raise error.StatusInformation(errorIndication='no encryption') PKF˜Ø<;?rÏ Ï 'pysnmp/proto/secmod/rfc3414/priv/des.pyimport random, string from pysnmp.proto.secmod.rfc3414.priv import base from pyasn1.type import univ from pysnmp.proto import error try: from sys import version_info except ImportError: version_info = ( 0, 0 ) # a really early version try: from Crypto.Cipher import DES except ImportError: DES = None random.seed() # 8.2.4 class Des(base.AbstractEncryptionService): serviceID = (1, 3, 6, 1, 6, 3, 10, 1, 2, 2) # usmDESPrivProtocol if version_info < (2, 3): _localInt = long(random.random()*0xffffffffL) else: _localInt = random.randrange(0, 0xffffffffL) # 8.1.1.1 def __getEncryptionKey(self, privKey, snmpEngineBoots): desKey = privKey[:8] preIV = privKey[8:16] securityEngineBoots = long(snmpEngineBoots) salt = [ securityEngineBoots>>24&0xff, securityEngineBoots>>16&0xff, securityEngineBoots>>8&0xff, securityEngineBoots&0xff, self._localInt>>24&0xff, self._localInt>>16&0xff, self._localInt>>8&0xff, self._localInt&0xff ] if self._localInt == 0xffffffffL: self._localInt = 0 else: self._localInt = self._localInt + 1 return desKey, \ string.join(map(chr, salt), ''), \ string.join(map(lambda x,y: chr(x^ord(y)), salt, preIV), '') def __getDecryptionKey(self, privKey, salt): return privKey[:8], string.join( map(lambda x,y: chr(ord(x)^ord(y)), salt, privKey[8:16]), '' ) # 8.2.4.1 def encryptData(self, encryptKey, privParameters, dataToEncrypt): if DES is None: raise error.StatusInformation( errorIndication='encryptionError' ) snmpEngineBoots, snmpEngineTime, salt = privParameters # 8.3.1.1 desKey, salt, iv = self.__getEncryptionKey( str(encryptKey), snmpEngineBoots ) # 8.3.1.2 privParameters = univ.OctetString(salt) # 8.1.1.2 desObj = DES.new(desKey, DES.MODE_CBC, iv) plaintext = dataToEncrypt + '\x00' * (8 - len(dataToEncrypt) % 8) ciphertext = desObj.encrypt(plaintext) # 8.3.1.3 & 4 return univ.OctetString(ciphertext), privParameters # 8.2.4.2 def decryptData(self, decryptKey, privParameters, encryptedData): if DES is None: raise error.StatusInformation( errorIndication='decryptionError' ) snmpEngineBoots, snmpEngineTime, salt = privParameters # 8.3.2.1 if len(salt) != 8: raise error.StatusInformation( errorIndication='decryptionError' ) # 8.3.2.2 salt = str(salt) # 8.3.2.3 desKey, iv = self.__getDecryptionKey(str(decryptKey), salt) # 8.3.2.4 -> 8.1.1.3 if len(encryptedData) % 8 != 0: raise error.StatusInformation( errorIndication='decryptionError' ) desObj = DES.new(desKey, DES.MODE_CBC, iv) # 8.3.2.6 return desObj.decrypt(str(encryptedData)) PK†£=w-r]](pysnmp/proto/secmod/rfc3414/priv/des.pyc;ò us#Lc@sÀdkZdkZdklZdklZdklZydkl Z Wne j oddfZ nXydk l Z Wne j o e Z nXeiƒdeifd„ƒYZdS( N(sbase(suniv(serror(s version_infoi(sDESsDesc BstZddddddddddf ZeddfjoeeiƒdƒZneiddƒZd„Zd „Z d „Z d „Z RS( Niiii ilÿÿic Csó|d }|dd!}t|ƒ}|d?d@|d?d@|d?d@|d@|id?d@|id?d@|id?d@|id@g}|idjo d|_n|id|_|t i t t |ƒdƒt i t d „||ƒdƒfSdS( NiiiiÿlÿÿiiscCst|t|ƒAƒS(N(schrsxsordsy(sxsy((sBbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/priv/des.pys2s( sprivKeysdesKeyspreIVslongssnmpEngineBootsssecurityEngineBootssselfs _localIntssaltsstringsjoinsmapschr(sselfsprivKeyssnmpEngineBootssdesKeyspreIVssecurityEngineBootsssalt((sBbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/priv/des.pys__getEncryptionKeys   b  cCs4|d titd„||dd!ƒdƒfSdS(NicCstt|ƒt|ƒAƒS(N(schrsordsxsy(sxsy((sBbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/priv/des.pys6sis(sprivKeysstringsjoinsmapssalt(sselfsprivKeyssalt((sBbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/priv/des.pys__getDecryptionKey4sc Cs¼ttjotiddƒ‚n|\} }} |i t |ƒ| ƒ\}} }ti| ƒ}ti|ti|ƒ} |ddt|ƒd}| i|ƒ}ti|ƒ|fSdS(NserrorIndicationsencryptionErrorsi(sDESsNoneserrorsStatusInformationsprivParametersssnmpEngineBootsssnmpEngineTimessaltsselfs_Des__getEncryptionKeysstrs encryptKeysdesKeysivsunivs OctetStringsnewsMODE_CBCsdesObjs dataToEncryptslens plaintextsencrypts ciphertext( sselfs encryptKeysprivParameterss dataToEncryptsdesKeys plaintexts ciphertextsivssnmpEngineTimessnmpEngineBootssdesObjssalt((sBbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/priv/des.pys encryptData:s !c Csáttjotiddƒ‚n|\}}} t| ƒdjotiddƒ‚nt | ƒ} |i t |ƒ| ƒ\}}t|ƒddjotiddƒ‚nti|ti|ƒ}|it |ƒƒSdS(NserrorIndicationsdecryptionErrorii(sDESsNoneserrorsStatusInformationsprivParametersssnmpEngineBootsssnmpEngineTimessaltslensstrsselfs_Des__getDecryptionKeys decryptKeysdesKeysivs encryptedDatasnewsMODE_CBCsdesObjsdecrypt( sselfs decryptKeysprivParameterss encryptedDatasdesKeyssnmpEngineTimesivssnmpEngineBootssdesObjssalt((sBbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/priv/des.pys decryptDataSs  ( s__name__s __module__s serviceIDs version_infoslongsrandoms _localInts randranges_Des__getEncryptionKeys_Des__getDecryptionKeys encryptDatas decryptData(((sBbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/priv/des.pysDess$   (srandomsstrings pysnmp.proto.secmod.rfc3414.privsbases pyasn1.typesunivs pysnmp.protoserrorssyss version_infos ImportErrors Crypto.CiphersDESsNonesseedsAbstractEncryptionServicesDes(sDESsstrings version_infosDessrandomsbaseserrorsuniv((sBbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/priv/des.pys?s     PK†£=Fk>——-pysnmp/proto/secmod/rfc3414/priv/__init__.pyc;ò ‘¶®Bc@sdS(N((((sGbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/priv/__init__.pys?sPK†£=Ce<¤+pysnmp/proto/secmod/rfc3414/priv/nopriv.pyc;ò ŽöLc@s7dklZdklZdeifd„ƒYZdS((sbase(serrorsNoPrivc Bs>tZddddddddddf Zd„Zd„ZRS(Niiii icCstiddƒ‚dS(NserrorIndications no encryption(serrorsStatusInformation(sselfs encryptKeysprivParameterss dataToEncrypt((sEbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/priv/nopriv.pys encryptDatascCstiddƒ‚dS(NserrorIndications no encryption(serrorsStatusInformation(sselfs decryptKeysprivParameterss encryptedData((sEbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/priv/nopriv.pys decryptData s(s__name__s __module__s serviceIDs encryptDatas decryptData(((sEbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/priv/nopriv.pysNoPrivs$ N(s pysnmp.proto.secmod.rfc3414.privsbases pysnmp.protoserrorsAbstractEncryptionServicesNoPriv(sbasesNoPrivserror((sEbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/priv/nopriv.pys?s  PKЍ=s>ÁâMM(pysnmp/proto/secmod/rfc3414/priv/base.pyfrom pysnmp.proto import error class AbstractEncryptionService: serviceID = None def encryptData(self, encryptKey, privParameters, dataToEncrypt): raise error.ProtocolError('no encryption') def decryptData(self, decryptKey, privParameters, encryptedData): raise error.ProtocolError('no encryption') PKøŒé6'pysnmp/proto/secmod/rfc3826/__init__.pyPK†£=OOT’’(pysnmp/proto/secmod/rfc3826/__init__.pyc;ò ¤:’Fc@sdS(N((((sBbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3826/__init__.pys?sPKøŒé6,pysnmp/proto/secmod/rfc3826/priv/__init__.pyPK†£=Xåèî——-pysnmp/proto/secmod/rfc3826/priv/__init__.pyc;ò ¤:’Fc@sdS(N((((sGbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3826/priv/__init__.pys?sPKM¶Ø>56&0xff, self._localInt>>48&0xff, self._localInt>>40&0xff, self._localInt>>32&0xff, self._localInt>>24&0xff, self._localInt>>16&0xff, self._localInt>>8&0xff, self._localInt&0xff ] if self._localInt == 0xffffffffffffffffL: self._localInt = 0 else: self._localInt = self._localInt + 1 salt = string.join(map(chr, salt), '') return self.__getDecryptionKey(privKey, snmpEngineBoots, snmpEngineTime, salt) + ( salt, ) def __getDecryptionKey(self, privKey, snmpEngineBoots, snmpEngineTime, salt): snmpEngineBoots, snmpEngineTime, salt = ( long(snmpEngineBoots), long(snmpEngineTime), str(salt) ) iv = [ snmpEngineBoots>>24&0xff, snmpEngineBoots>>16&0xff, snmpEngineBoots>>8&0xff, snmpEngineBoots&0xff, snmpEngineTime>>24&0xff, snmpEngineTime>>16&0xff, snmpEngineTime>>8&0xff, snmpEngineTime&0xff, ord(salt[0]), ord(salt[1]), ord(salt[2]), ord(salt[3]), ord(salt[4]), ord(salt[5]), ord(salt[6]), ord(salt[7]) ] return privKey[:16], string.join(map(chr, iv), '') # 3.2.4.1 def encryptData(self, encryptKey, privParameters, dataToEncrypt): if AES is None: raise error.StatusInformation( errorIndication='encryptionError' ) snmpEngineBoots, snmpEngineTime, salt = privParameters # 3.3.1.1 aesKey, iv, salt = self.__getEncryptionKey( str(encryptKey), snmpEngineBoots, snmpEngineTime ) # 3.3.1.3 aesObj = AES.new(aesKey, AES.MODE_CFB, iv, segment_size=128) # PyCrypto seems to require padding dataToEncrypt = dataToEncrypt + '\0' * (16-len(dataToEncrypt)%16) ciphertext = aesObj.encrypt(dataToEncrypt) # 3.3.1.4 return univ.OctetString(ciphertext), univ.OctetString(salt) # 3.2.4.2 def decryptData(self, decryptKey, privParameters, encryptedData): if AES is None: raise error.StatusInformation( errorIndication='decryptionError' ) snmpEngineBoots, snmpEngineTime, salt = privParameters # 3.3.2.1 if len(salt) != 8: raise error.StatusInformation( errorIndication='decryptionError' ) # 3.3.2.3 aesKey, iv = self.__getDecryptionKey( str(decryptKey), snmpEngineBoots, snmpEngineTime, salt ) aesObj = AES.new(aesKey, AES.MODE_CFB, iv, segment_size=128) # PyCrypto seems to require padding encryptedData = encryptedData + '\0' * (16-len(encryptedData)%16) # 3.3.2.4-6 return aesObj.decrypt(str(encryptedData)) PK†£=ÛØm::(pysnmp/proto/secmod/rfc3826/priv/aes.pyc;ò ó¨#Lc@sÀdkZdkZdklZdklZdklZydkl Z Wne j oddfZ nXydk l Z Wne j o e Z nXeiƒdeifd„ƒYZdS( N(sbase(suniv(serror(s version_infoi(sAESsAesc BstZddddddddddf ZeddfjoeeiƒdƒZneiddƒZd „Zd „Z d „Z d „Z RS( Niiii iilÿÿÿÿic CsÛ|id?d@|id?d@|id?d@|id?d@|id?d@|id?d@|id?d@|id@g}|id jo d |_n|id |_titt|ƒd ƒ}|i||||ƒ|fSdS( Ni8iÿi0i(i iiilÿÿÿÿiis( sselfs _localIntssaltsstringsjoinsmapschrs_Aes__getDecryptionKeysprivKeyssnmpEngineBootsssnmpEngineTime(sselfsprivKeyssnmpEngineBootsssnmpEngineTimessalt((sBbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3826/priv/aes.pys__getEncryptionKeysr   cCst|ƒt|ƒt|ƒf\}}}|d?d@|d?d@|d?d@|d@|d?d@|d?d@|d?d@|d@t|dƒt|dƒt|dƒt|dƒt|d ƒt|d ƒt|d ƒt|d ƒg}|d ti t t |ƒd ƒfSdS(Niiÿiiiiiiiiiis( slongssnmpEngineBootsssnmpEngineTimesstrssaltsordsivsprivKeysstringsjoinsmapschr(sselfsprivKeyssnmpEngineBootsssnmpEngineTimessaltsiv((sBbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3826/priv/aes.pys__getDecryptionKey3s*¾c Cs¿ttjotiddƒ‚n|\}}}|i t |ƒ||ƒ\}}}ti|ti|ddƒ} |ddt|ƒd}| i|ƒ} ti| ƒti|ƒfSdS(NserrorIndicationsencryptionErrors segment_sizei€si(sAESsNoneserrorsStatusInformationsprivParametersssnmpEngineBootsssnmpEngineTimessaltsselfs_Aes__getEncryptionKeysstrs encryptKeysaesKeysivsnewsMODE_CFBsaesObjs dataToEncryptslensencrypts ciphertextsunivs OctetString( sselfs encryptKeysprivParameterss dataToEncryptsaesKeyssnmpEngineTimesivssnmpEngineBootsssalts ciphertextsaesObj((sBbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3826/priv/aes.pys encryptDataPs $c CsÐttjotiddƒ‚n|\}}}t|ƒdjotiddƒ‚n|i t |ƒ|||ƒ\}}ti|ti|ddƒ} |ddt|ƒd}| it |ƒƒSdS(NserrorIndicationsdecryptionErroris segment_sizei€si(sAESsNoneserrorsStatusInformationsprivParametersssnmpEngineBootsssnmpEngineTimessaltslensselfs_Aes__getDecryptionKeysstrs decryptKeysaesKeysivsnewsMODE_CFBsaesObjs encryptedDatasdecrypt( sselfs decryptKeysprivParameterss encryptedDatassnmpEngineTimesaesKeysivssnmpEngineBootsssaltsaesObj((sBbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3826/priv/aes.pys decryptDatais $( s__name__s __module__s serviceIDs version_infoslongsrandoms _localInts randranges_Aes__getEncryptionKeys_Aes__getDecryptionKeys encryptDatas decryptData(((sBbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3826/priv/aes.pysAess$   (srandomsstrings pysnmp.proto.secmod.rfc3414.privsbases pyasn1.typesunivs pysnmp.protoserrorssyss version_infos ImportErrors Crypto.CiphersAESsNonesseedsAbstractEncryptionServicesAes(sAESsstrings version_infosrandomsAessbaseserrorsuniv((sBbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3826/priv/aes.pys?s     PKuÎ2Ω“FÕÕpysnmp/proto/api/__init__.pyfrom pysnmp.proto.api import v1, v2c, verdec # Protocol versions protoVersion1 = 0 protoVersion2c = 1 protoModules = { protoVersion1: v1, protoVersion2c: v2c } decodeMessageVersion = verdec.decodeMessageVersion PK÷\=4¹DÈ**pysnmp/proto/api/v1.pyimport types from pyasn1.type import univ from pysnmp.proto import rfc1155, rfc1157, error from pysnmp import nextid # Shortcuts to SNMP types Integer = univ.Integer OctetString = univ.OctetString Null = univ.Null ObjectIdentifier = univ.ObjectIdentifier IpAddress = rfc1155.IpAddress NetworkAddress = rfc1155.NetworkAddress Counter = rfc1155.Counter Gauge = rfc1155.Gauge TimeTicks = rfc1155.TimeTicks Opaque = rfc1155.Opaque VarBind = rfc1157.VarBind VarBindList = rfc1157.VarBindList GetRequestPDU = rfc1157.GetRequestPDU GetNextRequestPDU = rfc1157.GetNextRequestPDU GetResponsePDU = rfc1157.GetResponsePDU SetRequestPDU = rfc1157.SetRequestPDU TrapPDU = rfc1157.TrapPDU Message = rfc1157.Message class VarBindAPI: _null = Null('') def setOIDVal(self, varBind, (oid, val)): varBind.setComponentByPosition(0, oid) if val is None: val = self._null varBind.setComponentByPosition(1).getComponentByPosition(1).setComponentByType(val.getTagSet(), val, 1) return varBind def getOIDVal(self, varBind): return varBind[0], varBind[1].getComponent(1) apiVarBind = VarBindAPI() getNextRequestID = nextid.Integer(0xffff) class PDUAPI: _null = univ.Null('') def setDefaults(self, pdu): pdu.setComponentByPosition(0, getNextRequestID()) pdu.setComponentByPosition(1, 0) pdu.setComponentByPosition(2, 0) pdu.setComponentByPosition(3) def getRequestID(self, pdu): return pdu.getComponentByPosition(0) def setRequestID(self, pdu, value): pdu.setComponentByPosition(0, value) def getErrorStatus(self, pdu): return pdu.getComponentByPosition(1) def setErrorStatus(self, pdu, value): pdu.setComponentByPosition(1, value) def getErrorIndex(self, pdu): errorIndex = pdu.getComponentByPosition(2) if errorIndex > len(pdu[3]): raise error.ProtocolError( 'Error index out of range: %s > %s' % (errorIndex, len(pdu[3])) ) return errorIndex def setErrorIndex(self, pdu, value): pdu.setComponentByPosition(2, value) def setEndOfMibError(self, pdu, errorIndex): self.setErrorStatus(pdu, 2) def setNoSuchInstanceError(self, pdu, errorIndex): self.setEndOfMibError(pdu, errorIndex) def getVarBindList(self, pdu): return pdu.getComponentByPosition(3) def setVarBindList(self, pdu, varBindList): varBindList = pdu.setComponentByPosition(3, varBindList) def getVarBinds(self, pdu): return map(lambda x: apiVarBind.getOIDVal(x), pdu.getComponentByPosition(3)) def setVarBinds(self, pdu, varBinds): varBindList = pdu.setComponentByPosition(3).getComponentByPosition(3) varBindList.clear() idx = 0 for varBind in varBinds: if type(varBind) is types.InstanceType: varBindList.setComponentByPosition(idx, varBind) else: varBindList.setComponentByPosition(idx) apiVarBind.setOIDVal( varBindList.getComponentByPosition(idx), varBind ) idx = idx + 1 def getResponse(self, reqPDU): rspPDU = GetResponsePDU() self.setDefaults(rspPDU) self.setRequestID(rspPDU, self.getRequestID(reqPDU)) return rspPDU def getVarBindTable(self, reqPDU, rspPDU): if apiPDU.getErrorStatus(rspPDU) == 2: return [ map(lambda (x,y),self=self: (x, self._null), apiPDU.getVarBinds(reqPDU)) ] else: return [ apiPDU.getVarBinds(rspPDU) ] apiPDU = PDUAPI() class TrapPDUAPI: try: import socket agentAddress = IpAddress(socket.gethostbyname(socket.gethostname())) except: agentAddress = IpAddress('0.0.0.0') def setDefaults(self, pdu): pdu.setComponentByPosition(0, (1,3,6,1,4,1,20408)) pdu.setComponentByPosition(1).getComponentByPosition(1).setComponentByPosition(0, self.agentAddress) pdu.setComponentByPosition(2, 0) pdu.setComponentByPosition(3, 0) pdu.setComponentByPosition(4, 0) pdu.setComponentByPosition(5) def getEnterprise(self, pdu): return pdu.getComponentByPosition(0) def setEnterprise(self, pdu, value): pdu.setComponentByPosition(0, value) def getAgentAddr(self, pdu): return pdu.getComponentByPosition(1).getComponentByPosition(0) def setAgentAddr(self, pdu, value): pdu.getComponentByPosition(1).setComponentByPosition(0, value) def getGenericTrap(self, pdu): return pdu.getComponentByPosition(2) def setGenericTrap(self, pdu, value): pdu.setComponentByPosition(2, value) def getSpecificTrap(self, pdu): return pdu.getComponentByPosition(3) def setSpecificTrap(self, pdu, value): pdu.setComponentByPosition(3, value) def getTimeStamp(self, pdu): return pdu.getComponentByPosition(4) def setTimeStamp(self, pdu, value): pdu.setComponentByPosition(4, value) def getVarBindList(self, pdu): return pdu.getComponentByPosition(5) def setVarBindList(self, pdu, varBindList): varBindList = pdu.setComponentByPosition(5, varBindList) def getVarBinds(self, pdu): return map(lambda x: apiVarBind.getOIDVal(x), pdu.getComponentByPosition(5)) def setVarBinds(self, pdu, varBinds): varBindList = pdu.setComponentByPosition(5).getComponentByPosition(5) varBindList.clear() idx = 0 for varBind in varBinds: if type(varBind) is types.InstanceType: varBindList.setComponentByPosition(idx, varBind) else: varBindList.setComponentByPosition(idx) apiVarBind.setOIDVal( varBindList.getComponentByPosition(idx), varBind ) idx = idx + 1 apiTrapPDU = TrapPDUAPI() class MessageAPI: def setDefaults(self, msg): msg.setComponentByPosition(0, 0) msg.setComponentByPosition(1, 'public') return msg def getVersion(self, msg): return msg.getComponentByPosition(0) def setVersion(self, msg, value): msg.setComponentByPosition(0, value) def getCommunity(self, msg): return msg.getComponentByPosition(1) def setCommunity(self, msg, value): msg.setComponentByPosition(1, value) def getPDU(self, msg): return msg.getComponentByPosition(2).getComponent() def setPDU(self, msg, value): msg.setComponentByPosition(2).getComponentByPosition(2).setComponentByType(value.getTagSet(), value, 1) def getResponse(self, reqMsg): rspMsg = Message() self.setDefaults(rspMsg) self.setVersion(rspMsg, self.getVersion(reqMsg)) self.setCommunity(rspMsg, self.getCommunity(reqMsg)) self.setPDU(rspMsg, apiPDU.getResponse(self.getPDU(reqMsg))) return rspMsg apiMessage = MessageAPI() PK†£=¼ œEEpysnmp/proto/api/verdec.pyc;ò ´®Bc@sdklZd„ZdS((sdecodercCs>ti|ddƒ\}}ti|ddƒ\}}|SdS(Ns recursiveFlagi(sdecodersdecodeswholeMsgsseqsver(swholeMsgsversseq((s5build/bdist.linux-i686/egg/pysnmp/proto/api/verdec.pysdecodeMessageVersionsN(spyasn1.codec.bersdecodersdecodeMessageVersion(sdecodeMessageVersionsdecoder((s5build/bdist.linux-i686/egg/pysnmp/proto/api/verdec.pys?s PK†£=ÙBŽç„:„:pysnmp/proto/api/v1.pyc;ò ÒÛMc@sadkZdklZdklZlZlZdklZei Z ei Z ei Z ei Z ei Z eiZeiZeiZeiZeiZeiZeiZeiZeiZeiZeiZeiZeiZdfd„ƒYZeƒZei dƒZdfd„ƒYZeƒZd fd „ƒYZ e ƒZ!d fd „ƒYZ"e"ƒZ#dS( N(suniv(srfc1155srfc1157serror(snextids VarBindAPIcBs&tZedƒZd„Zd„ZRS(NscCsi|\}}|id|ƒ|tjo |i}n|idƒidƒi|i ƒ|dƒ|SdS(Nii( soidsvalsvarBindssetComponentByPositionsNonesselfs_nullsgetComponentByPositionssetComponentByTypes getTagSet(sselfsvarBinds.4soidsval((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys setOIDVals  +cCs|d|didƒfSdS(Nii(svarBinds getComponent(sselfsvarBind((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys getOIDVal$s(s__name__s __module__sNulls_nulls setOIDVals getOIDVal(((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys VarBindAPIs  iÿÿsPDUAPIcBsžtZeidƒZd„Zd„Zd„Zd„Zd„Z d„Z d„Z d „Z d „Z d „Zd „Zd „Zd„Zd„Zd„ZRS(NscCsD|idtƒƒ|iddƒ|iddƒ|idƒdS(Niiii(spdussetComponentByPositionsgetNextRequestID(sselfspdu((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys setDefaults.scCs|idƒSdS(Ni(spdusgetComponentByPosition(sselfspdu((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys getRequestID4scCs|id|ƒdS(Ni(spdussetComponentByPositionsvalue(sselfspdusvalue((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys setRequestID5scCs|idƒSdS(Ni(spdusgetComponentByPosition(sselfspdu((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pysgetErrorStatus7scCs|id|ƒdS(Ni(spdussetComponentByPositionsvalue(sselfspdusvalue((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pyssetErrorStatus8scCsU|idƒ}|t|dƒjo'tid|t|dƒfƒ‚n|SdS(Niis!Error index out of range: %s > %s(spdusgetComponentByPositions errorIndexslenserrors ProtocolError(sselfspdus errorIndex((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys getErrorIndex:s'cCs|id|ƒdS(Ni(spdussetComponentByPositionsvalue(sselfspdusvalue((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys setErrorIndexAscCs|i|dƒdS(Ni(sselfssetErrorStatusspdu(sselfspdus errorIndex((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pyssetEndOfMibErrorDscCs|i||ƒdS(N(sselfssetEndOfMibErrorspdus errorIndex(sselfspdus errorIndex((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pyssetNoSuchInstanceErrorGscCs|idƒSdS(Ni(spdusgetComponentByPosition(sselfspdu((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pysgetVarBindListJscCs|id|ƒ}dS(Ni(spdussetComponentByPositions varBindList(sselfspdus varBindList((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pyssetVarBindListLscCstd„|idƒƒSdS(NcCs ti|ƒS(N(s apiVarBinds getOIDValsx(sx((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pysPsi(smapspdusgetComponentByPosition(sselfspdu((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys getVarBindsOs cCs—|idƒidƒ}|iƒd}xh|D]`}t|ƒt i jo|i||ƒn'|i|ƒt i |i|ƒ|ƒ|d}q/WdS(Niii( spdussetComponentByPositionsgetComponentByPositions varBindListsclearsidxsvarBindssvarBindstypestypess InstanceTypes apiVarBinds setOIDVal(sselfspdusvarBindssidxs varBindListsvarBind((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys setVarBindsRs  cCs7tƒ}|i|ƒ|i||i|ƒƒ|SdS(N(sGetResponsePDUsrspPDUsselfs setDefaultss setRequestIDs getRequestIDsreqPDU(sselfsreqPDUsrspPDU((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys getResponse`s  cCsMti|ƒdjo#t|d„ti|ƒƒgSnti|ƒgSdS(NicCs|\}}||ifS(N(sxsysselfs_null(s.0sselfsxsy((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pysis(sapiPDUsgetErrorStatussrspPDUsmapsselfs getVarBindssreqPDU(sselfsreqPDUsrspPDU((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pysgetVarBindTablefs#(s__name__s __module__sunivsNulls_nulls setDefaultss getRequestIDs setRequestIDsgetErrorStatusssetErrorStatuss getErrorIndexs setErrorIndexssetEndOfMibErrorssetNoSuchInstanceErrorsgetVarBindListssetVarBindLists getVarBindss setVarBindss getResponsesgetVarBindTable(((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pysPDUAPI+s               s TrapPDUAPIcBsÍtZy(dkZeeieiƒƒƒZWnedƒZnXd„Zd„Zd„Z d„Z d„Z d„Z d„Z d „Zd „Zd „Zd „Zd „Zd„Zd„Zd„ZRS(Ns0.0.0.0c Cs‹|iddddddddfƒ|idƒidƒid|iƒ|iddƒ|iddƒ|iddƒ|idƒdS( Niiiiii¸Oii(spdussetComponentByPositionsgetComponentByPositionsselfs agentAddress(sselfspdu((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys setDefaultsvs %%cCs|idƒSdS(Ni(spdusgetComponentByPosition(sselfspdu((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys getEnterprise~scCs|id|ƒdS(Ni(spdussetComponentByPositionsvalue(sselfspdusvalue((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys setEnterprisescCs|idƒidƒSdS(Nii(spdusgetComponentByPosition(sselfspdu((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys getAgentAddrscCs|idƒid|ƒdS(Nii(spdusgetComponentByPositionssetComponentByPositionsvalue(sselfspdusvalue((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys setAgentAddrƒscCs|idƒSdS(Ni(spdusgetComponentByPosition(sselfspdu((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pysgetGenericTrap†scCs|id|ƒdS(Ni(spdussetComponentByPositionsvalue(sselfspdusvalue((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pyssetGenericTrap‡scCs|idƒSdS(Ni(spdusgetComponentByPosition(sselfspdu((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pysgetSpecificTrap‰scCs|id|ƒdS(Ni(spdussetComponentByPositionsvalue(sselfspdusvalue((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pyssetSpecificTrapŠscCs|idƒSdS(Ni(spdusgetComponentByPosition(sselfspdu((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys getTimeStampŒscCs|id|ƒdS(Ni(spdussetComponentByPositionsvalue(sselfspdusvalue((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys setTimeStampscCs|idƒSdS(Ni(spdusgetComponentByPosition(sselfspdu((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pysgetVarBindListscCs|id|ƒ}dS(Ni(spdussetComponentByPositions varBindList(sselfspdus varBindList((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pyssetVarBindList‘scCstd„|idƒƒSdS(NcCs ti|ƒS(N(s apiVarBinds getOIDValsx(sx((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys•si(smapspdusgetComponentByPosition(sselfspdu((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys getVarBinds”s cCs—|idƒidƒ}|iƒd}xh|D]`}t|ƒt i jo|i||ƒn'|i|ƒt i |i|ƒ|ƒ|d}q/WdS(Niii( spdussetComponentByPositionsgetComponentByPositions varBindListsclearsidxsvarBindssvarBindstypestypess InstanceTypes apiVarBinds setOIDVal(sselfspdusvarBindssidxs varBindListsvarBind((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys setVarBinds—s  (s__name__s __module__ssockets IpAddresss gethostbynames gethostnames agentAddresss setDefaultss getEnterprises setEnterprises getAgentAddrs setAgentAddrsgetGenericTrapssetGenericTrapsgetSpecificTrapssetSpecificTraps getTimeStamps setTimeStampsgetVarBindListssetVarBindLists getVarBindss setVarBinds(((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys TrapPDUAPIps(               s MessageAPIcBsPtZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z RS( NcCs(|iddƒ|iddƒ|SdS(Niispublic(smsgssetComponentByPosition(sselfsmsg((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys setDefaults¨scCs|idƒSdS(Ni(smsgsgetComponentByPosition(sselfsmsg((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys getVersion­scCs|id|ƒdS(Ni(smsgssetComponentByPositionsvalue(sselfsmsgsvalue((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys setVersion®scCs|idƒSdS(Ni(smsgsgetComponentByPosition(sselfsmsg((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys getCommunity°scCs|id|ƒdS(Ni(smsgssetComponentByPositionsvalue(sselfsmsgsvalue((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys setCommunity±scCs|idƒiƒSdS(Ni(smsgsgetComponentByPositions getComponent(sselfsmsg((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pysgetPDU³scCs/|idƒidƒi|iƒ|dƒdS(Nii(smsgssetComponentByPositionsgetComponentByPositionssetComponentByTypesvalues getTagSet(sselfsmsgsvalue((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pyssetPDU´scCsrtƒ}|i|ƒ|i||i|ƒƒ|i||i|ƒƒ|i |t i |i |ƒƒƒ|SdS(N( sMessagesrspMsgsselfs setDefaultss setVersions getVersionsreqMsgs setCommunitys getCommunityssetPDUsapiPDUs getResponsesgetPDU(sselfsreqMsgsrspMsg((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys getResponse·s   "( s__name__s __module__s setDefaultss getVersions setVersions getCommunitys setCommunitysgetPDUssetPDUs getResponse(((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys MessageAPI§s       ($stypess pyasn1.typesunivs pysnmp.protosrfc1155srfc1157serrorspysnmpsnextidsIntegers OctetStringsNullsObjectIdentifiers IpAddresssNetworkAddresssCountersGauges TimeTickssOpaquesVarBinds VarBindLists GetRequestPDUsGetNextRequestPDUsGetResponsePDUs SetRequestPDUsTrapPDUsMessages VarBindAPIs apiVarBindsgetNextRequestIDsPDUAPIsapiPDUs TrapPDUAPIs apiTrapPDUs MessageAPIs apiMessage(!sNetworkAddresssOpaques TimeTickssTrapPDUsnextids IpAddresss VarBindAPIs apiVarBindsgetNextRequestIDsunivsIntegers MessageAPIsrfc1155s GetRequestPDUsrfc1157sObjectIdentifiers OctetStringsGetNextRequestPDUsGetResponsePDUs VarBindListsCountersPDUAPIsVarBinds TrapPDUAPIstypess apiMessages apiTrapPDUsGaugeserrorsMessagesNulls SetRequestPDUsapiPDU((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys?s<                      C 5 PK†£=°ªŸsååpysnmp/proto/api/__init__.pyc;ò ´®Bc@sJdklZlZlZdZdZhee<ee’f­ ­ pysnmp/proto/api/v2c.pyc;ò ð"ýLc@sÊdklZlZlZdklZdklZlZl Z ei Z ei Z ei Z ei Z eiZeiZeiZeiZeiZeiZeiZeiZeiZeiZeiZeiZeiZeiZZeiZeiZeiZei Z Z!ei"Z"dei#fd„ƒYZ#ei$Z$ei%Z%dei&fd„ƒYZ&e&ƒZ'de&fd„ƒYZ(e(ƒZ)d ei&fd „ƒYZ*e*ƒZ+d ei,fd „ƒYZ,e,ƒZ-d S((srfc1902srfc1905serror(sv1(sunivs namedtypesnamedvalsMessagecBshtZeieideideiddfƒƒƒeidei ƒƒeide i ƒƒƒZ RS(Nsversions namedValuess version-2is communitysdata( s__name__s __module__s namedtypes NamedTypess NamedTypesunivsIntegersnamedvals NamedValuess OctetStringsrfc1905sPDUss componentType(((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pysMessage!s0sPDUAPIcBs,tZd„Zd„Zd„Zd„ZRS(NcCs7tƒ}|i|ƒ|i||i|ƒƒ|SdS(N(s ResponsePDUsrspPDUsselfs setDefaultss setRequestIDs getRequestIDsreqPDU(sselfsreqPDUsrspPDU((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pys getResponse-s  cCsti|ƒgSdS(N(sapiPDUs getVarBindssrspPDU(sselfsreqPDUsrspPDU((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pysgetVarBindTable3scCs.|i|ƒ}||didtiƒdS(Ni(sselfsgetVarBindListspdus varBindLists errorIndexssetComponentByPositionsrfc1905s endOfMibView(sselfspdus errorIndexs varBindList((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pyssetEndOfMibError6scCs.|i|ƒ}||didtiƒdS(Ni(sselfsgetVarBindListspdus varBindLists errorIndexssetComponentByPositionsrfc1905snoSuchInstance(sselfspdus errorIndexs varBindList((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pyssetNoSuchInstanceError<s(s__name__s __module__s getResponsesgetVarBindTablessetEndOfMibErrorssetNoSuchInstanceError(((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pysPDUAPI,s   s BulkPDUAPIcBs>tZd„Zd„Zd„Zd„Zd„Zd„ZRS(NcCs$ti||ƒ|iddƒdS(Nii (sPDUAPIs setDefaultssselfspdussetComponentByPosition(sselfspdu((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pys setDefaultsEscCs|idƒSdS(Ni(spdusgetComponentByPosition(sselfspdu((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pysgetNonRepeatersIscCs|id|ƒdS(Ni(spdussetComponentByPositionsvalue(sselfspdusvalue((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pyssetNonRepeatersJscCs|idƒSdS(Ni(spdusgetComponentByPosition(sselfspdu((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pysgetMaxRepetitionsLscCs|id|ƒdS(Ni(spdussetComponentByPositionsvalue(sselfspdusvalue((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pyssetMaxRepetitionsMsc Cs|i|ƒ} |i|ƒ}|i|ƒ} tt | ƒt | ƒƒ}t |ƒ}t t | ƒ|dƒ}|i|ƒ} g}|oYxrtdt | ƒ||ƒD]4}| | | |||||!} |i| ƒq¦Wn|o|i| | ƒn|SdS(Ni(sselfsgetNonRepeaterssreqPDUs nonRepeaterssgetMaxRepetitionssmaxRepetitionss getVarBindss reqVarBindssminsintslensNsMsmaxsRsrspPDUs rspVarBindss varBindTablesrangesis varBindRowsappend( sselfsreqPDUsrspPDUsis varBindTablesmaxRepetitionssMsNsRs rspVarBindss varBindRows reqVarBindss nonRepeaters((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pysgetVarBindTableOs  !(s__name__s __module__s setDefaultssgetNonRepeatersssetNonRepeaterssgetMaxRepetitionsssetMaxRepetitionssgetVarBindTable(((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pys BulkPDUAPIDs      s TrapPDUAPIc BsÈtZdddddddddf Zddddddddddf Zddddddddddf Zdddddddddddf Zdddddddddddf Zd„ZRS( Niiiiiiic Csotii||ƒ|itdƒf|itddddddddddf ƒfg}|i ||ƒdS(Niiiii( sv1sPDUAPIs setDefaultssselfspdus sysUpTimes TimeTickss snmpTrapOIDsObjectIdentifiersvarBindss setVarBinds(sselfspdusvarBinds((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pys setDefaultsnsH(s__name__s __module__s sysUpTimessnmpTrapAddressssnmpTrapCommunitys snmpTrapOIDssnmpTrapEnterprises setDefaults(((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pys TrapPDUAPIhs !$$''s MessageAPIcBstZd„Zd„ZRS(NcCs(|iddƒ|iddƒ|SdS(Niispublic(smsgssetComponentByPosition(sselfsmsg((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pys setDefaultszscCsrtƒ}|i|ƒ|i||i|ƒƒ|i||i|ƒƒ|i |t i |i |ƒƒƒ|SdS(N( sMessagesrspMsgsselfs setDefaultss setVersions getVersionsreqMsgs setCommunitys getCommunityssetPDUsapiPDUs getResponsesgetPDU(sselfsreqMsgsrspMsg((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pys getResponses   "(s__name__s __module__s setDefaultss getResponse(((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pys MessageAPIys N(.s pysnmp.protosrfc1902srfc1905serrorspysnmp.proto.apisv1s pyasn1.typesunivs namedtypesnamedvalsNullsObjectIdentifiersIntegers Integer32s OctetStrings IpAddresss Counter32sGauge32s Unsigned32s TimeTickssOpaques Counter64sBitssVarBinds VarBindLists GetRequestPDUsGetNextRequestPDUs ResponsePDUsGetResponsePDUs SetRequestPDUsGetBulkRequestPDUsInformRequestPDUs SNMPv2TrapPDUsTrapPDUs ReportPDUsMessagesgetNextRequestIDs apiVarBindsPDUAPIsapiPDUs BulkPDUAPIs apiBulkPDUs TrapPDUAPIs apiTrapPDUs MessageAPIs apiMessage(+s MessageAPIsOpaques TimeTickssapiPDUsTrapPDUs namedtypes IpAddresss apiVarBindsgetNextRequestIDsBitss ReportPDUs SNMPv2TrapPDUsIntegersnamedvals OctetStringsGetNextRequestPDUsGetResponsePDUs VarBindLists Counter64s Unsigned32s GetRequestPDUs apiBulkPDUsv1sGauge32sunivsVarBindsGetBulkRequestPDUs TrapPDUAPIs BulkPDUAPIs Integer32s ResponsePDUs apiMessages apiTrapPDUsrfc1905srfc1902sInformRequestPDUsObjectIdentifierserrorsMessagesNulls SetRequestPDUs Counter32sPDUAPI((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pys?sH                           "  PKuÎ2æ^Õ¸ÕÕpysnmp/proto/api/verdec.pyfrom pyasn1.codec.ber import decoder def decodeMessageVersion(wholeMsg): seq, wholeMsg = decoder.decode(wholeMsg, recursiveFlag=0) ver, wholeMsg = decoder.decode(wholeMsg, recursiveFlag=0) return ver PK˜¦†=ÙŸÁ_ûûpysnmp/proto/api/v2c.pyfrom pysnmp.proto import rfc1902, rfc1905, error from pysnmp.proto.api import v1 from pyasn1.type import univ, namedtype, namedval # Shortcuts to SNMP types Null = univ.Null ObjectIdentifier = univ.ObjectIdentifier Integer = rfc1902.Integer Integer32 = rfc1902.Integer32 OctetString = rfc1902.OctetString IpAddress = rfc1902.IpAddress Counter32 = rfc1902.Counter32 Gauge32 = rfc1902.Gauge32 Unsigned32 = rfc1902.Unsigned32 TimeTicks = rfc1902.TimeTicks Opaque = rfc1902.Opaque Counter64 = rfc1902.Counter64 Bits = rfc1902.Bits VarBind = rfc1905.VarBind VarBindList = rfc1905.VarBindList GetRequestPDU = rfc1905.GetRequestPDU GetNextRequestPDU = rfc1905.GetNextRequestPDU ResponsePDU = GetResponsePDU = rfc1905.ResponsePDU SetRequestPDU = rfc1905.SetRequestPDU GetBulkRequestPDU = rfc1905.GetBulkRequestPDU InformRequestPDU = rfc1905.InformRequestPDU SNMPv2TrapPDU = TrapPDU = rfc1905.SNMPv2TrapPDU ReportPDU = rfc1905.ReportPDU # v2 model uses v1 messaging but it's not defined in v2 MIB class Message(v1.Message): componentType = namedtype.NamedTypes( namedtype.NamedType('version', univ.Integer(namedValues = namedval.NamedValues(('version-2', 1)))), namedtype.NamedType('community', univ.OctetString()), namedtype.NamedType('data', rfc1905.PDUs()) ) getNextRequestID = v1.getNextRequestID apiVarBind = v1.apiVarBind class PDUAPI(v1.PDUAPI): def getResponse(self, reqPDU): rspPDU = ResponsePDU() self.setDefaults(rspPDU) self.setRequestID(rspPDU, self.getRequestID(reqPDU)) return rspPDU def getVarBindTable(self, reqPDU, rspPDU): return [ apiPDU.getVarBinds(rspPDU) ] def setEndOfMibError(self, pdu, errorIndex): varBindList = self.getVarBindList(pdu) varBindList[errorIndex-1].setComponentByPosition( 1, rfc1905.endOfMibView ) def setNoSuchInstanceError(self, pdu, errorIndex): varBindList = self.getVarBindList(pdu) varBindList[errorIndex-1].setComponentByPosition( 1, rfc1905.noSuchInstance ) apiPDU = PDUAPI() class BulkPDUAPI(PDUAPI): def setDefaults(self, pdu): PDUAPI.setDefaults(self, pdu) pdu.setComponentByPosition(2, 10) def getNonRepeaters(self, pdu): return pdu.getComponentByPosition(1) def setNonRepeaters(self, pdu, value): pdu.setComponentByPosition(1, value) def getMaxRepetitions(self, pdu): return pdu.getComponentByPosition(2) def setMaxRepetitions(self,pdu,value): pdu.setComponentByPosition(2,value) def getVarBindTable(self, reqPDU, rspPDU): nonRepeaters = self.getNonRepeaters(reqPDU) maxRepetitions = self.getMaxRepetitions(reqPDU) reqVarBinds = self.getVarBinds(reqPDU) N = min(int(nonRepeaters), len(reqVarBinds)) M = int(maxRepetitions) R = max(len(reqVarBinds)-N, 0) rspVarBinds = self.getVarBinds(rspPDU) varBindTable = [] if R: for i in range(0, len(rspVarBinds)-N, R): varBindRow = rspVarBinds[:N] + rspVarBinds[N+i:N+R+i] varBindTable.append(varBindRow) elif N: varBindTable.append(rspVarBinds[:N]) return varBindTable apiBulkPDU = BulkPDUAPI() class TrapPDUAPI(v1.PDUAPI): sysUpTime = (1,3,6,1,2,1,1,3,0) snmpTrapAddress = (1,3,6,1,6,3,18,1,3,0) snmpTrapCommunity = (1,3,6,1,6,3,18,1,4,0) snmpTrapOID = (1,3,6,1,6,3,1,1,4,1,0) snmpTrapEnterprise = (1,3,6,1,6,3,1,1,4,3,0) def setDefaults(self, pdu): v1.PDUAPI.setDefaults(self, pdu) varBinds = [ ( self.sysUpTime, TimeTicks(0)), # generic trap ( self.snmpTrapOID, ObjectIdentifier((1,3,6,1,6,3,1,1,5,1))) ] self.setVarBinds(pdu, varBinds) apiTrapPDU = TrapPDUAPI() class MessageAPI(v1.MessageAPI): def setDefaults(self, msg): msg.setComponentByPosition(0, 1) msg.setComponentByPosition(1, 'public') return msg def getResponse(self, reqMsg): rspMsg = Message() self.setDefaults(rspMsg) self.setVersion(rspMsg, self.getVersion(reqMsg)) self.setCommunity(rspMsg, self.getCommunity(reqMsg)) self.setPDU(rspMsg, apiPDU.getResponse(self.getPDU(reqMsg))) return rspMsg apiMessage = MessageAPI() PK†£=ÄïLu.u.pysnmp/smi/view.pyc;ò ´njGc@sfdklZlZlZdklZlZdklZdk l Z dgZ dfd„ƒYZ dS((s ClassTypes InstanceTypes TupleType(s OrderedDictsOidOrderedDict(serror(sdebugsMibViewControllercBs­tZd„Zd„Zd„Zd„Zd„Zdd„Zdd„Zdd „Z dd „Z dd „Z dd „Z dd „Z dd„Zdd„Zdd„ZRS(NcCs||_d|_dS(Niÿÿÿÿ(s mibBuildersselfs lastBuildId(sselfs mibBuilder((s-build/bdist.linux-i686/egg/pysnmp/smi/view.pys__init__ s cCsf|i|iijodSntiti@o tidƒ|iiddƒ\} tƒ|_ |ii d„}|ii i ƒ}|i|ƒxdg|D]ø}hdtƒ<dh<dh<d tƒ<d h<|i |<}| o |}qŸnx–|ii |iƒD]~\}} |d joqnt| ƒtjo\|d i|ƒo(tid |||d |fƒ‚n||d |<||d | (oid, label, suffix)iiÿÿÿÿN( snodeNames labelToOidIdxsgetsoids oidToLabelIdxslabelslensselfs_MibViewController__getOidLabelssuffixsresLabelsresOid( sselfsnodeNames oidToLabelIdxs labelToOidIdxsoidsresOidslabelsresLabelssuffix((s-build/bdist.linux-i686/egg/pysnmp/smi/view.pys __getOidLabels,"  scCsÜ|iƒ|ii|ƒ}|tjotid||fƒ‚n|i ||d|dƒ\}}}||jo#tidd|||fƒ‚ntiti@otid||||fƒ|||fSdS(NsNo module %s at %ss oidToLabelIdxs labelToOidIdxsstrs$Can't resolve node name %s::%s at %ss&getNodeNameByOid: resolved %s:%s -> %s(sselfsindexMibs!_MibViewController__mibSymbolsIdxsgetsmodNamesmibModsNoneserrorsSmiErrors_MibViewController__getOidLabelsnodeNamesoidslabelssuffixsNoSuchObjectErrorsdebugsloggersflagMIB(sselfsnodeNamesmodNamesoidslabelsmibModssuffix((s-build/bdist.linux-i686/egg/pysnmp/smi/view.pysgetNodeNameByOid·s  & #/cCsÈ|iƒ|ii|ƒ}|tjotid||fƒ‚n|di|ƒ}|tjo#ti dd|||fƒ‚nt i t i@ot i d|||fƒ|i||ƒSdS(NsNo module %s at %ss varToNameIdxsstrsNo such symbol %s::%s at %ss'getNodeNameByDesc: resolved %s:%s -> %s(sselfsindexMibs!_MibViewController__mibSymbolsIdxsgetsmodNamesmibModsNoneserrorsSmiErrorsnodeNamesoidsNoSuchObjectErrorsdebugsloggersflagMIBsgetNodeNameByOid(sselfsnodeNamesmodNamesoidsmibMod((s-build/bdist.linux-i686/egg/pysnmp/smi/view.pysgetNodeNameByDescÉs   #+cCsly|i||ƒSWnQtij oB|i|d|ƒ\}}}|i|||d|ƒSnXdS(Nii( sselfsgetNodeNameByOidsnodeNamesmodNameserrorsNoSuchObjectErrorsgetNodeNameByDescsoidslabelssuffix(sselfsnodeNamesmodNamesoidslabelssuffix((s-build/bdist.linux-i686/egg/pysnmp/smi/view.pys getNodeNameØs cCs|iƒ|ii|ƒ}|tjotid||fƒ‚n|d o ti dd||fƒ‚n|di ƒd\}}||ffSdS(NsNo module %s at %ss oidToLabelIdxsstrs#No variables at MIB module %s at %si( sselfsindexMibs!_MibViewController__mibSymbolsIdxsgetsmodNamesmibModsNoneserrorsSmiErrorsNoSuchObjectErrorsitemssoidslabel(sselfsmodNamesoidslabelsmibMod((s-build/bdist.linux-i686/egg/pysnmp/smi/view.pysgetFirstNodeNameès    cCs€|i||ƒ\}}}y,|i|i|di|ƒ||ƒSWn2t j o&t i dd|||fƒ‚nXdS(Ns oidToLabelIdxsstrsNo name next to %s::%s at %s( sselfs getNodeNamesnodeNamesmodNamesoidslabelssuffixs!_MibViewController__mibSymbolsIdxsnextKeysKeyErrorserrorsNoSuchObjectError(sselfsnodeNamesmodNamessuffixsoidslabel((s-build/bdist.linux-i686/egg/pysnmp/smi/view.pysgetNextNodeNameös ,cCsr|i||ƒ\}}}t|ƒdjo#ti dd|||fƒ‚n|d |d |d|fSdS(NisstrsNo parent name for %s::%s at %siÿÿÿÿ( sselfs getNodeNamesnodeNamesmodNamesoidslabelssuffixslenserrorsNoSuchObjectError(sselfsnodeNamesmodNamessuffixsoidslabel((s-build/bdist.linux-i686/egg/pysnmp/smi/view.pysgetParentNodeNames#cCs?|i||ƒ\}}}|idd||d|fSdS(Nss oidToModIdxiÿÿÿÿ(sselfs getNodeNamesnodeNamesmodNamesoidslabelssuffixs!_MibViewController__mibSymbolsIdx(sselfsnodeNamesmodNamessuffixsoidslabel((s-build/bdist.linux-i686/egg/pysnmp/smi/view.pysgetNodeLocation scCs—|iƒ|ii|ƒ}|tjotid||fƒ‚n|di|ƒ}|tjo#ti dd|||fƒ‚n||fSdS(NsNo module %s at %ss typeToModIdxsstrsNo such type %s::%s at %s( sselfsindexMibs!_MibViewController__mibSymbolsIdxsgetsmodNamesmibModsNoneserrorsSmiErrorstypeNamesmsNoSuchObjectError(sselfstypeNamesmodNamesmsmibMod((s-build/bdist.linux-i686/egg/pysnmp/smi/view.pys getTypeNames   #cCsœ|iƒ|ii|ƒ}|tjotid||fƒ‚n|d o ti dd||fƒ‚n|di ƒd}|d||fSdS(NsNo module %s at %ss typeToModIdxsstrsNo types at MIB module %s at %si( sselfsindexMibs!_MibViewController__mibSymbolsIdxsgetsmodNamesmibModsNoneserrorsSmiErrorsNoSuchObjectErrorskeysst(sselfsmodNamesmibModst((s-build/bdist.linux-i686/egg/pysnmp/smi/view.pysgetFirstTypeNames    cCsm|i||ƒ\}}y|i|di|ƒSWn2tj o&t i dd|||fƒ‚nXdS(Ns typeToModIdxsstrsNo type next to %s::%s at %s( sselfs getTypeNamestypeNamesmodNamesmsts!_MibViewController__mibSymbolsIdxsnextKeysKeyErrorserrorsNoSuchObjectError(sselfstypeNamesmodNamesmst((s-build/bdist.linux-i686/egg/pysnmp/smi/view.pys getNextType,s (s__name__s __module__s__init__sindexMibsgetFirstModuleNamesgetNextModuleNames_MibViewController__getOidLabelsgetNodeNameByOidsgetNodeNameByDescs getNodeNamesgetFirstNodeNamesgetNextNodeNamesgetParentNodeNamesgetNodeLocations getTypeNamesgetFirstTypeNames getNextType(((s-build/bdist.linux-i686/egg/pysnmp/smi/view.pysMibViewController s  {         N( stypess ClassTypes InstanceTypes TupleTypespysnmp.smi.indicess OrderedDictsOidOrderedDicts pysnmp.smiserrorspysnmpsdebugs__all__sMibViewController( s OrderedDicts__all__s ClassTypesOidOrderedDictserrorsdebugs TupleTypes InstanceTypesMibViewController((s-build/bdist.linux-i686/egg/pysnmp/smi/view.pys?s    PK¯Šl1£QŽ¥pysnmp/smi/__init__.py"""SNMP SMI""" PK†£=߸¼†¯¯pysnmp/smi/error.pyc;ò m½Fc@sÃdklZdklZdeefd„ƒYZdefd„ƒYZdefd„ƒYZdefd „ƒYZd efd „ƒYZd efd „ƒYZ defd„ƒYZ defd„ƒYZ defd„ƒYZ defd„ƒYZ defd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZd efd!„ƒYZd"efd#„ƒYZd$efd%„ƒYZd&efd'„ƒYZd(S()(s PyAsn1Error(s PySnmpErrorsSmiErrorcBstZRS(N(s__name__s __module__(((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pysSmiErrorssMibOperationErrorcBsJtZd„Zd„Zd„Zd„Zed„Zd„Zd„Z RS(NcKs ||_dS(N(skwargssselfs_MibOperationError__outArgs(sselfskwargs((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pys__init__scCsd|ii|ifSdS(Ns%s(%s)(sselfs __class__s__name__s_MibOperationError__outArgs(sself((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pys__str__scCs|i|SdS(N(sselfs_MibOperationError__outArgsskey(sselfskey((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pys __getitem__ scCs|ii|ƒSdS(N(sselfs_MibOperationError__outArgsshas_keyskey(sselfskey((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pyshas_key scCs|ii||ƒSdS(N(sselfs_MibOperationError__outArgssgetskeysdefVal(sselfskeysdefVal((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pysget scCs|iiƒSdS(N(sselfs_MibOperationError__outArgsskeys(sself((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pyskeys scCs|ii|ƒdS(N(sselfs_MibOperationError__outArgssupdatesd(sselfsd((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pysupdates( s__name__s __module__s__init__s__str__s __getitem__shas_keysNonesgetskeyssupdate(((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pysMibOperationErrors      sGenErrorcBstZRS(N(s__name__s __module__(((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pysGenErrorss NoAccessErrorcBstZRS(N(s__name__s __module__(((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pys NoAccessErrorssWrongTypeErrorcBstZRS(N(s__name__s __module__(((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pysWrongTypeErrorssWrongValueErrorcBstZRS(N(s__name__s __module__(((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pysWrongValueErrorssNoCreationErrorcBstZRS(N(s__name__s __module__(((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pysNoCreationErrorssInconsistentValueErrorcBstZRS(N(s__name__s __module__(((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pysInconsistentValueErrorssResourceUnavailableErrorcBstZRS(N(s__name__s __module__(((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pysResourceUnavailableErrorssCommitFailedErrorcBstZRS(N(s__name__s __module__(((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pysCommitFailedErrorssUndoFailedErrorcBstZRS(N(s__name__s __module__(((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pysUndoFailedErrorssAuthorizationErrorcBstZRS(N(s__name__s __module__(((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pysAuthorizationErrorssNotWritableErrorcBstZRS(N(s__name__s __module__(((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pysNotWritableErrorssInconsistentNameErrorcBstZRS(N(s__name__s __module__(((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pysInconsistentNameErrorssNoSuchObjectErrorcBstZRS(N(s__name__s __module__(((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pysNoSuchObjectErrorssNoSuchInstanceErrorcBstZRS(N(s__name__s __module__(((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pysNoSuchInstanceError ssEndOfMibViewErrorcBstZRS(N(s__name__s __module__(((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pysEndOfMibViewError!ssRowCreationWantedcBstZRS(N(s__name__s __module__(((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pysRowCreationWanted$ssRowDestructionWantedcBstZRS(N(s__name__s __module__(((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pysRowDestructionWanted%sN(s pyasn1.errors PyAsn1Errors pysnmp.errors PySnmpErrorsSmiErrorsMibOperationErrorsGenErrors NoAccessErrorsWrongTypeErrorsWrongValueErrorsNoCreationErrorsInconsistentValueErrorsResourceUnavailableErrorsCommitFailedErrorsUndoFailedErrorsAuthorizationErrorsNotWritableErrorsInconsistentNameErrorsNoSuchObjectErrorsNoSuchInstanceErrorsEndOfMibViewErrorsRowCreationWantedsRowDestructionWanted(sRowCreationWantedsNoSuchInstanceErrors PySnmpErrorsMibOperationErrorsAuthorizationErrorsRowDestructionWantedsInconsistentNameErrorsGenErrorsSmiErrorsEndOfMibViewErrorsCommitFailedErrors PyAsn1ErrorsNoSuchObjectErrorsNotWritableErrorsNoCreationErrorsResourceUnavailableErrorsUndoFailedErrorsWrongValueErrorsInconsistentValueErrorsWrongTypeErrors NoAccessError((s.build/bdist.linux-i686/egg/pysnmp/smi/error.pys?s(   PKT` 7"pysnmp/smi/error.pyfrom pyasn1.error import PyAsn1Error from pysnmp.error import PySnmpError class SmiError(PySnmpError, PyAsn1Error): pass class MibOperationError(SmiError): def __init__(self, **kwargs): self.__outArgs = kwargs def __str__(self): return '%s(%s)' % ( self.__class__.__name__, self.__outArgs ) def __getitem__(self, key): return self.__outArgs[key] def has_key(self, key): return self.__outArgs.has_key(key) def get(self, key, defVal=None): return self.__outArgs.get(key, defVal) def keys(self): return self.__outArgs.keys() def update(self, d): self.__outArgs.update(d) # Aligned with SNMPv2 PDU error-status class GenError(MibOperationError): pass class NoAccessError(MibOperationError): pass class WrongTypeError(MibOperationError): pass class WrongValueError(MibOperationError): pass class NoCreationError(MibOperationError): pass class InconsistentValueError(MibOperationError): pass class ResourceUnavailableError(MibOperationError): pass class CommitFailedError(MibOperationError): pass class UndoFailedError(MibOperationError): pass class AuthorizationError(MibOperationError): pass class NotWritableError(MibOperationError): pass class InconsistentNameError(MibOperationError): pass # Aligned with SNMPv2 Var-Bind exceptions class NoSuchObjectError(MibOperationError): pass class NoSuchInstanceError(NoSuchObjectError): pass class EndOfMibViewError(MibOperationError): pass # Row management class RowCreationWanted(MibOperationError): pass class RowDestructionWanted(MibOperationError): pass PK†£=c#annpysnmp/smi/exval.pyc;ò žsàLc@s0dklZeiZeiZeiZZdS((srfc1905N(s pysnmp.protosrfc1905s noSuchObjectsnoSuchInstances endOfMibViewsendOfMib(sendOfMibs noSuchObjectsrfc1905s endOfMibViewsnoSuchInstance((s.build/bdist.linux-i686/egg/pysnmp/smi/exval.pys?s   PKÐÜ<žTS!!pysnmp/smi/instrum.py# MIB modules management from types import InstanceType from pysnmp.smi import error from pysnmp import debug __all__ = [ 'MibInstrumController' ] class MibInstrumController: fsmReadVar = { # ( state, status ) -> newState ('start', 'ok'): 'readTest', ('readTest', 'ok'): 'readGet', ('readGet', 'ok'): 'stop', ('*', 'err'): 'stop' } fsmReadNextVar = { # ( state, status ) -> newState ('start', 'ok'): 'readTestNext', ('readTestNext', 'ok'): 'readGetNext', ('readGetNext', 'ok'): 'stop', ('*', 'err'): 'stop' } fsmWriteVar = { # ( state, status ) -> newState ('start', 'ok'): 'writeTest', ('writeTest', 'ok'): 'writeCommit', ('writeCommit', 'ok'): 'writeCleanup', ('writeCleanup', 'ok'): 'readTest', # Do read after successful write ('readTest', 'ok'): 'readGet', ('readGet', 'ok'): 'stop', # Error handling ('writeTest', 'err'): 'writeCleanup', ('writeCommit', 'err'): 'writeUndo', ('writeUndo', 'ok'): 'readTest', # Ignore read errors (removed columns) ('readTest', 'err'): 'stop', ('readGet', 'err'): 'stop', ('*', 'err'): 'stop' } def __init__(self, mibBuilder): self.mibBuilder = mibBuilder self.lastBuildId = -1 self.lastBuildSyms = {} # MIB indexing def __indexMib(self): # Build a tree from MIB objects found at currently loaded modules if self.lastBuildId == self.mibBuilder.lastBuildId: return ( MibScalarInstance, MibScalar, MibTableColumn, MibTableRow, MibTable, MibTree ) = self.mibBuilder.importSymbols( 'SNMPv2-SMI', 'MibScalarInstance', 'MibScalar', 'MibTableColumn', 'MibTableRow', 'MibTable', 'MibTree' ) mibTree, = self.mibBuilder.importSymbols('SNMPv2-SMI', 'iso') # # Management Instrumentation gets organized as follows: # # MibTree # | # +----MibScalar # | | # | +-----MibScalarInstance # | # +----MibTable # | # +----MibTableRow # | # +-------MibTableColumn # | # +------MibScalarInstance(s) # # Mind you, only Managed Objects get indexed here, various MIB defs and # constants can't be SNMP managed so we drop them. # scalars = {}; instances = {}; tables = {}; rows = {}; cols = {} # Sort by module name to give user a chance to slip-in # custom MIB modules (that would be sorted out first) mibSymbols = self.mibBuilder.mibSymbols.items() mibSymbols.sort(lambda x,y: cmp(y[0], x[0])) for modName, mibMod in mibSymbols: for symObj in mibMod.values(): if type(symObj) != InstanceType: continue if isinstance(symObj, MibTable): tables[symObj.name] = symObj elif isinstance(symObj, MibTableRow): rows[symObj.name] = symObj elif isinstance(symObj, MibTableColumn): cols[symObj.name] = symObj elif isinstance(symObj, MibScalarInstance): instances[symObj.name] = symObj elif isinstance(symObj, MibScalar): scalars[symObj.name] = symObj # Detach items from each other for symName, parentName in self.lastBuildSyms.items(): if scalars.has_key(parentName): scalars[parentName].unregisterSubtrees(symName) elif cols.has_key(parentName): cols[parentName].unregisterSubtrees(symName) elif rows.has_key(parentName): rows[parentName].unregisterSubtrees(symName) else: mibTree.unregisterSubtrees(symName) lastBuildSyms = {} # Attach Managed Objects Instances to Managed Objects for inst in instances.values(): if scalars.has_key(inst.typeName): scalars[inst.typeName].registerSubtrees(inst) elif cols.has_key(inst.typeName): cols[inst.typeName].registerSubtrees(inst) else: raise error.SmiError( 'Orphan MIB scalar instance %s at %s' % (inst, self) ) lastBuildSyms[inst.name] = inst.typeName # Attach Table Columns to Table Rows for col in cols.values(): rowName = col.name[:-1] # XXX if rows.has_key(rowName): rows[rowName].registerSubtrees(col) else: raise error.SmiError( 'Orphan MIB table column %s at %s' % (col, self) ) lastBuildSyms[col.name] = rowName # Attach Table Rows to MIB tree for row in rows.values(): mibTree.registerSubtrees(row) lastBuildSyms[row.name] = mibTree.name # Attach Tables to MIB tree for table in tables.values(): mibTree.registerSubtrees(table) lastBuildSyms[table.name] = mibTree.name # Attach Scalars to MIB tree for scalar in scalars.values(): mibTree.registerSubtrees(scalar) lastBuildSyms[scalar.name] = mibTree.name self.lastBuildSyms = lastBuildSyms self.lastBuildId = self.mibBuilder.lastBuildId debug.logger & debug.flagIns and debug.logger('__indexMib: rebuilt') # MIB instrumentation def flipFlopFsm(self, fsmTable, inputNameVals, (acFun, acCtx)): self.__indexMib() debug.logger & debug.flagIns and debug.logger('flipFlopFsm: inputNameVals %s' % repr(inputNameVals)) mibTree, = self.mibBuilder.importSymbols('SNMPv2-SMI', 'iso') outputNameVals = [] state, status = 'start', 'ok' myErr = None while 1: fsmState = fsmTable.get((state, status)) if fsmState is None: fsmState = fsmTable.get(('*', status)) if fsmState is None: raise error.SmiError( 'Unresolved FSM state %s, %s' % (state, status) ) debug.logger & debug.flagIns and debug.logger('flipFlopFsm: state %s status %s -> fsmState %s' % (state, status, fsmState)) state = fsmState status = 'ok' if state == 'stop': break idx = 0 for name, val in inputNameVals: f = getattr(mibTree, state, None) if f is None: raise error.SmiError( 'Unsupported state handler %s at %s' % (state, self) ) try: # Convert to tuple to avoid ObjectName instantiation # on subscription rval = f(tuple(name), val, idx, (acFun, acCtx)) except error.SmiError, why: debug.logger & debug.flagIns and debug.logger('flipFlopFsm: fun %s failed %s for %s=%s' % (f, why, name, repr(val))) if myErr is None: # Take the first exception myErr = why status = 'err' break else: debug.logger & debug.flagIns and debug.logger('flipFlopFsm: fun %s suceeded for %s=%s' % (f, name, repr(val))) if rval is not None: outputNameVals.append((rval[0], rval[1])) idx = idx + 1 if myErr: raise myErr return outputNameVals def readVars(self, vars, (acFun, acCtx)=(None, None)): return self.flipFlopFsm(self.fsmReadVar, vars, (acFun, acCtx)) def readNextVars(self, vars, (acFun, acCtx)=(None, None)): return self.flipFlopFsm(self.fsmReadNextVar, vars, (acFun, acCtx)) def writeVars(self, vars, (acFun, acCtx)=(None, None)): return self.flipFlopFsm(self.fsmWriteVar, vars, (acFun, acCtx)) PK†£=Sòœ±¿¿pysnmp/smi/instrum.pyc;ò ¹§(Lc@sGdklZdklZdklZdgZdfd„ƒYZdS((s InstanceType(serror(sdebugsMibInstrumControllercBs—tZhddfd<ddfd<ddfd<ddfd`ss#Orphan MIB scalar instance %s at %siÿÿÿÿs Orphan MIB table column %s at %ss__indexMib: rebuilt(-sselfs lastBuildIds mibBuilders importSymbolssMibScalarInstances MibScalarsMibTableColumns MibTableRowsMibTablesMibTreesmibTreesscalarss instancesstablessrowsscolss mibSymbolssitemsssortsmodNamesmibModsvaluesssymObjstypes InstanceTypes isinstancesnames lastBuildSymsssymNames parentNameshas_keysunregisterSubtreessinststypeNamesregisterSubtreesserrorsSmiErrorscolsrowNamesrowstablesscalarsdebugsloggersflagIns(sselfsrowNames MibScalars lastBuildSymss parentNamescolss instancessscalarstables mibSymbolsstablessrowssMibTableColumnsMibTablesmibTreesrowsmodNames MibTableRowsscalarsssymNamesMibScalarInstancesMibTreessymObjsmibModsinstscol((s0build/bdist.linux-i686/egg/pysnmp/smi/instrum.pys __indexMib1sŠ              cCsœ|\}}|iƒtiti@otidt|ƒƒ|i i ddƒ\} g}ddf\} } t}x no|i| | fƒ} | tjoC|id| fƒ} | tjotid| | fƒ‚qãntiti@otid | | | fƒ| } d} | d joPnd }xI|D]A\}}t| | tƒ}|tjotid | |fƒ‚ny%|t|ƒ||||fƒ} Wnjtij o[}titi@o#tid |||t|ƒfƒ|tjo |}nd} Pn_Xtiti@o tid||t|ƒfƒ| tj o|i| d | dfƒn|d}q9Wq~W|o |‚n|SdS(NsflipFlopFsm: inputNameVals %ss SNMPv2-SMIsisosstartsokis*sUnresolved FSM state %s, %ss.flipFlopFsm: state %s status %s -> fsmState %ssstopis"Unsupported state handler %s at %ss'flipFlopFsm: fun %s failed %s for %s=%sserrs&flipFlopFsm: fun %s suceeded for %s=%s(sacFunsacCtxsselfs_MibInstrumController__indexMibsdebugsloggersflagInssreprs inputNameValss mibBuilders importSymbolssmibTreesoutputNameValssstatesstatussNonesmyErrsfsmTablesgetsfsmStateserrorsSmiErrorsidxsnamesvalsgetattrsfstuplesrvalswhysappend(sselfsfsmTables inputNameValss.6sacFunsacCtxsoutputNameValssmyErrsvalsrvalsstatesmibTreesstatussfsmStateswhysnamesidxsf((s0build/bdist.linux-i686/egg/pysnmp/smi/instrum.pys flipFlopFsm¬sN  (  !+   %4  1  cCs,|\}}|i|i|||fƒSdS(N(sacFunsacCtxsselfs flipFlopFsms fsmReadVarsvars(sselfsvarss.4sacFunsacCtx((s0build/bdist.linux-i686/egg/pysnmp/smi/instrum.pysreadVarsÚs cCs,|\}}|i|i|||fƒSdS(N(sacFunsacCtxsselfs flipFlopFsmsfsmReadNextVarsvars(sselfsvarss.4sacFunsacCtx((s0build/bdist.linux-i686/egg/pysnmp/smi/instrum.pys readNextVarsÜs cCs,|\}}|i|i|||fƒSdS(N(sacFunsacCtxsselfs flipFlopFsms fsmWriteVarsvars(sselfsvarss.4sacFunsacCtx((s0build/bdist.linux-i686/egg/pysnmp/smi/instrum.pys writeVarsÞs ( s__name__s __module__s fsmReadVarsfsmReadNextVars fsmWriteVars__init__s_MibInstrumController__indexMibs flipFlopFsmsNonesreadVarss readNextVarss writeVars(((s0build/bdist.linux-i686/egg/pysnmp/smi/instrum.pysMibInstrumControllersBBº  { .N(stypess InstanceTypes pysnmp.smiserrorspysnmpsdebugs__all__sMibInstrumController(sdebugsMibInstrumControllers InstanceTypes__all__serror((s0build/bdist.linux-i686/egg/pysnmp/smi/instrum.pys?s    PK†£=&¾€æS7S7pysnmp/smi/indices.pyc;ò —S×Ec@sÌdZdklZlZdklZlZlZdklZydk l Z Wne j oddfZ nXe ddfjodfd„ƒYZ ndefd „ƒYZ d e fd „ƒYZ d S( s-Ordered dictionaries classes used for indices(sDictTypes TupleType(sjoinssplitsatol(sbisect(s version_infoiis OrderedDictcBs³tZd„Zd„Zd„Zd„Zd„Zd„Zd„ZeZ d„Z e d „Z d „Z d „Zd „Zd „Zd„Zd„Zd„Zd„Zd„ZRS(NcKs@h|_g|_d|_|o|i|ƒd|_ndS(Ni(sselfs_OrderedDict__dicts_OrderedDict__keyss_OrderedDict__dirtyskwargssupdate(sselfskwargs((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pys__init__ s     cCst|iƒSdS(N(slensselfs_OrderedDict__dict(sself((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pys__len__scCs|i|SdS(N(sselfs_OrderedDict__dictskey(sselfskey((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pys __getitem__scCsB|ii|ƒ o|ii|ƒn||i||ii|ƒo|ii|ƒn|i|=d|_dS(Ni(sselfs_OrderedDict__dictshas_keyskeys_OrderedDict__keyssremoves_OrderedDict__dirty(sselfskey((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pys __delitem__!s cCs#|iiƒg|_d|_dS(Ni(sselfs_OrderedDict__dictsclears_OrderedDict__keyss_OrderedDict__dirty(sself((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pysclear's  cCs|ii||ƒSdS(N(sselfs_OrderedDict__dictsgetskeysdefault(sselfskeysdefault((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pysget+scCs|ii|ƒSdS(N(sselfs_OrderedDict__dictshas_keyskey(sselfskey((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pyshas_key,scCs)|io|iƒnt|iƒSdS(N(sselfs_OrderedDict__dirtys_OrderedDict__orderslists_OrderedDict__keys(sself((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pyskeys-s cCs5|io|iƒnt|id„|iƒSdS(NcCs||S(N(sdsk(sksd((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pys2s(sselfs_OrderedDict__dirtys_OrderedDict__ordersmaps_OrderedDict__dicts_OrderedDict__keys(sself((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pysvalues0s cCs5|io|iƒnt|id„|iƒSdS(NcCs|||fS(N(sksd(sksd((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pys5s(sselfs_OrderedDict__dirtys_OrderedDict__ordersmaps_OrderedDict__dicts_OrderedDict__keys(sself((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pysitems3s cCst|d„|iƒƒdS(NcCs|\}}|i||ƒS(N(sksvsselfs __setitem__(s.0sselfsksv((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pys7s(smapsselfsdsitems(sselfsd((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pysupdate6scCs|iƒdS(N(skeysssort(sselfskeys((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pys sortingFun8scCsv|i|iƒh}x!|iD]}d|t|ƒrs(sselfs_OrderedDict__dirtys_OrderedDict__ordersmaps_OrderedDict__keys(sself((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pysvaluesps cCs2|io|iƒnt|d„|iƒSdS(NcCs|||fS(N(sksd(sksd((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pysus(sselfs_OrderedDict__dirtys_OrderedDict__ordersmaps_OrderedDict__keys(sself((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pysitemsss cCst|d„|iƒƒdS(NcCs|\}}|i||ƒS(N(sksvsselfs __setitem__(s.0sselfsksv((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pysws(smapsselfsdsitems(sselfsd((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pysupdatevscCs|iƒdS(N(skeysssort(sselfskeys((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pys sortingFunxscCsv|i|iƒh}x!|iD]}d|t|ƒss.( sselfs_OidOrderedDict__keysCacheshas_keyskeystypes TupleTypesmapsfiltersNonessplits OrderedDicts __setitem__svalue(sselfskeysvalue((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pys __setitem__—s /cCs5|ii|ƒo|i|=nti||ƒdS(N(sselfs_OidOrderedDict__keysCacheshas_keyskeys OrderedDicts __delitem__(sselfskey((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pys __delitem__¡scCs|d„}|i|ƒdS(NcCst|i||i|ƒSdS(N(scmpsselfs_OidOrderedDict__keysCacheso1so2(so1so2sself((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pysf¨s(sselfsfskeysssort(sselfskeyssf((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pys sortingFun§s (s__name__s __module__s__init__s __setitem__s __delitem__s __delattr__s sortingFun(((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pysOidOrderedDict’s   N(s__doc__stypessDictTypes TupleTypesstringsjoinssplitsatolsbisectssyss version_infos ImportErrors OrderedDictsOidOrderedDict( sDictTypesjoins version_infosbisectsOidOrderedDictssplitsatols OrderedDicts TupleType((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pys?s EAPK†£=0FgÏ  pysnmp/smi/__init__.pyc;ò êÆ”Ac@s dZdS(sSNMP SMIN(s__doc__(((s1build/bdist.linux-i686/egg/pysnmp/smi/__init__.pys?sPKðƒ”7ý|Æ`-`-pysnmp/smi/view.py# MIB modules management from types import ClassType, InstanceType, TupleType from pysnmp.smi.indices import OrderedDict, OidOrderedDict from pysnmp.smi import error from pysnmp import debug __all__ = [ 'MibViewController' ] class MibViewController: def __init__(self, mibBuilder): self.mibBuilder = mibBuilder self.lastBuildId = -1 # Indexing part def indexMib(self): if self.lastBuildId == self.mibBuilder.lastBuildId: return debug.logger & debug.flagMIB and debug.logger('indexMib: re-indexing MIB view') MibScalarInstance, = self.mibBuilder.importSymbols( 'SNMPv2-SMI', 'MibScalarInstance' ) # # Create indices # # Module name -> module-scope indices self.__mibSymbolsIdx = OrderedDict() # Oid <-> label indices # This is potentionally ambiguous mapping. Sort modules in # ascending age for resolution def __sortFun(x, y, s=self.mibBuilder.mibSymbols): m1 = s[x].get("PYSNMP_MODULE_ID") m2 = s[y].get("PYSNMP_MODULE_ID") r1 = r2 = "1970-01-01 00:00" if m1: r = m1.getRevisions() if r: r1 = r[0] if m2: r = m2.getRevisions() if r: r2 = r[0] return cmp(r1, r2) modNames = self.mibBuilder.mibSymbols.keys() modNames.sort(__sortFun) # Index modules names for modName in [ '' ] + modNames: # Modules index self.__mibSymbolsIdx[modName] = mibMod = { 'oidToLabelIdx': OidOrderedDict(), 'labelToOidIdx': {}, 'varToNameIdx': {}, 'typeToModIdx': OrderedDict(), 'oidToModIdx': {} } if not modName: globMibMod = mibMod continue # Types & MIB vars indices for n, v in self.mibBuilder.mibSymbols[modName].items(): if n == "PYSNMP_MODULE_ID": # do not index this special symbol continue if type(v) == ClassType: if mibMod['typeToModIdx'].has_key(n): raise error.SmiError( 'Duplicate SMI type %s::%s, has %s' % \ (modName, n, mibMod['typeToModIdx'][n]) ) globMibMod['typeToModIdx'][n] = modName mibMod['typeToModIdx'][n] = modName elif type(v) == InstanceType: if isinstance(v, MibScalarInstance): continue if mibMod['varToNameIdx'].has_key(n): raise error.SmiError( 'Duplicate MIB variable %s::%s has %s' % \ (modName, n, mibMod['varToNameIdx'][n]) ) globMibMod['varToNameIdx'][n] = v.name mibMod['varToNameIdx'][n] = v.name # Potentionally ambiguous mapping ahead globMibMod['oidToModIdx'][v.name] = modName mibMod['oidToModIdx'][v.name] = modName globMibMod['oidToLabelIdx'][v.name] = (n, ) mibMod['oidToLabelIdx'][v.name] = (n, ) else: raise error.SmiError( 'Unexpected object %s::%s' % (modName, n) ) # Build oid->long-label index oidToLabelIdx = self.__mibSymbolsIdx['']['oidToLabelIdx'] labelToOidIdx = self.__mibSymbolsIdx['']['labelToOidIdx'] if oidToLabelIdx: prevOid = oidToLabelIdx.keys()[0] else: prevOid = () baseLabel = () for key in oidToLabelIdx.keys(): keydiff = len(key) - len(prevOid) if keydiff > 0: baseLabel = oidToLabelIdx[prevOid] if keydiff > 1: baseLabel = baseLabel + key[-keydiff:-1] if keydiff < 0: keyLen = len(key) i = keyLen-1 while i: baseLabel = oidToLabelIdx.get(key[:i]) if baseLabel: if i != keyLen-1: baseLabel = baseLabel + key[i:-1] break i = i - 1 # Build oid->long-label index oidToLabelIdx[key] = baseLabel + oidToLabelIdx[key] # Build label->oid index labelToOidIdx[oidToLabelIdx[key]] = key prevOid = key # Build module-scope oid->long-label index for mibMod in self.__mibSymbolsIdx.values(): for oid in mibMod['oidToLabelIdx'].keys(): mibMod['oidToLabelIdx'][oid] = oidToLabelIdx[oid] mibMod['labelToOidIdx'][oidToLabelIdx[oid]] = oid self.lastBuildId = self.mibBuilder.lastBuildId # Module management def getFirstModuleName(self): self.indexMib() modNames = self.__mibSymbolsIdx.keys() if modNames: return modNames[0] raise error.SmiError('No modules loaded at %s' % self) def getNextModuleName(self, modName): self.indexMib() try: return self.__mibSymbolsIdx.nextKey(modName) except KeyError: raise error.SmiError( 'No module next to %s at %s' % (modName, self) ) # MIB tree node management def __getOidLabel(self, nodeName, oidToLabelIdx, labelToOidIdx): """getOidLabel(nodeName) -> (oid, label, suffix)""" if not nodeName: return nodeName, nodeName, () oid = labelToOidIdx.get(nodeName) if oid: return oid, nodeName, () label = oidToLabelIdx.get(nodeName) if label: return nodeName, label, () if len(nodeName) < 2: return nodeName, nodeName, () oid, label, suffix = self.__getOidLabel( nodeName[:-1], oidToLabelIdx, labelToOidIdx ) suffix = suffix + nodeName[-1:] resLabel = label + suffix resOid = labelToOidIdx.get(resLabel) if resOid: return resOid, resLabel, () resOid = oid + suffix resLabel = oidToLabelIdx.get(resOid) if resLabel: return resOid, resLabel, () return oid, label, suffix def getNodeNameByOid(self, nodeName, modName=''): self.indexMib() mibMod = self.__mibSymbolsIdx.get(modName) if mibMod is None: raise error.SmiError( 'No module %s at %s' % (modName, self) ) oid, label, suffix = self.__getOidLabel( nodeName, mibMod['oidToLabelIdx'], mibMod['labelToOidIdx'] ) if oid == label: raise error.NoSuchObjectError( str='Can\'t resolve node name %s::%s at %s' % (modName, nodeName, self) ) debug.logger & debug.flagMIB and debug.logger('getNodeNameByOid: resolved %s:%s -> %s' % (modName, nodeName, label + suffix)) return oid, label, suffix def getNodeNameByDesc(self, nodeName, modName=''): self.indexMib() mibMod = self.__mibSymbolsIdx.get(modName) if mibMod is None: raise error.SmiError( 'No module %s at %s' % (modName, self) ) oid = mibMod['varToNameIdx'].get(nodeName) if oid is None: raise error.NoSuchObjectError( str='No such symbol %s::%s at %s' % (modName, nodeName, self) ) debug.logger & debug.flagMIB and debug.logger('getNodeNameByDesc: resolved %s:%s -> %s' % (modName, nodeName, oid)) return self.getNodeNameByOid(oid, modName) def getNodeName(self, nodeName, modName=''): # nodeName may be either an absolute OID/label or a # ( MIB-symbol, su, ff, ix) try: # First try nodeName as an OID/label return self.getNodeNameByOid(nodeName, modName) except error.NoSuchObjectError: # ...on failure, try as MIB symbol oid, label, suffix = self.getNodeNameByDesc( nodeName[0], modName ) # ...with trailing suffix return self.getNodeNameByOid( oid + suffix + nodeName[1:], modName ) def getFirstNodeName(self, modName=''): self.indexMib() mibMod = self.__mibSymbolsIdx.get(modName) if mibMod is None: raise error.SmiError( 'No module %s at %s' % (modName, self) ) if not mibMod['oidToLabelIdx']: raise error.NoSuchObjectError( str='No variables at MIB module %s at %s' % (modName, self) ) oid, label = mibMod['oidToLabelIdx'].items()[0] return oid, label, () def getNextNodeName(self, nodeName, modName=''): oid, label, suffix = self.getNodeName(nodeName, modName) try: return self.getNodeName( self.__mibSymbolsIdx[modName]['oidToLabelIdx'].nextKey(oid) + suffix, modName ) except KeyError: raise error.NoSuchObjectError( str='No name next to %s::%s at %s' % (modName, nodeName, self) ) def getParentNodeName(self, nodeName, modName=''): oid, label, suffix = self.getNodeName(nodeName, modName) if len(oid) < 2: raise error.NoSuchObjectError( str='No parent name for %s::%s at %s' % (modName, nodeName, self) ) return oid[:-1], label[:-1], oid[-1:] + suffix def getNodeLocation(self, nodeName, modName=''): oid, label, suffix = self.getNodeName(nodeName, modName) return self.__mibSymbolsIdx['']['oidToModIdx'][oid], label[-1], suffix # MIB type management def getTypeName(self, typeName, modName=''): self.indexMib() mibMod = self.__mibSymbolsIdx.get(modName) if mibMod is None: raise error.SmiError( 'No module %s at %s' % (modName, self) ) m = mibMod['typeToModIdx'].get(typeName) if m is None: raise error.NoSuchObjectError( str='No such type %s::%s at %s' % (modName, typeName, self) ) return m, typeName def getFirstTypeName(self, modName=''): self.indexMib() mibMod = self.__mibSymbolsIdx.get(modName) if mibMod is None: raise error.SmiError( 'No module %s at %s' % (modName, self) ) if not mibMod['typeToModIdx']: raise error.NoSuchObjectError( str='No types at MIB module %s at %s' % (modName, self) ) t = mibMod['typeToModIdx'].keys()[0] return mibMod['typeToModIdx'][t], t def getNextType(self, typeName, modName=''): m, t = self.getTypeName(typeName, modName) try: return self.__mibSymbolsIdx[m]['typeToModIdx'].nextKey(t) except KeyError: raise error.NoSuchObjectError( str='No type next to %s::%s at %s' % (modName, typeName, self) ) PK†£=o‹3ïÈ9È9pysnmp/smi/builder.pyc;ò æ·«Kc@s¯dkZdkZdkZdkZdkZdkZdkZdklZdk l Z dfd„ƒYZ de fd„ƒYZ de fd„ƒYZ d fd „ƒYZdS( N(serror(sdebugs__AbstractMibSourcecBsMtZd„Zd„Zd„Zddd„Zd„Zd„Zd„ZRS( NcCsƒ||_tiƒ|_h|_x9tiƒD]+\}}}|t |ƒ|f|i|q>Wq Wt |iƒƒSdS(Ni s __init__.(susfilessfsimps PY_SOURCEs PY_COMPILEDstypsselfs_AbstractMibSource__sfxssfxssfxLensmodesNonestupleskeys(sselfsfilesssfxsfssfxLensusmodestyp((s0build/bdist.linux-i686/egg/pysnmp/smi/builder.pys _uniqNamessscCs(|i|oti||pdSdS(Ns(sselfs_srcNamesfsosssepssfx(sselfsfssfx((s0build/bdist.linux-i686/egg/pysnmp/smi/builder.pysfullPath scCs|iƒSdS(N(sselfs_init(sself((s0build/bdist.linux-i686/egg/pysnmp/smi/builder.pysinit#scCs|iƒSdS(N(sselfs_listdir(sself((s0build/bdist.linux-i686/egg/pysnmp/smi/builder.pyslistdir$sc Cs÷|iti\} }}tii |i |ƒ| }y|i ||ƒ} Wntj o d}npX|i| d jo2| d} tid| d ƒd}| d} n)titi@otid|ƒd}titi@otid||fƒ|iti\}} }tii |i |ƒ|}y|i|ƒ}Wnttfj o d}nXtiti@otid||fƒ|djo ||joti| ƒ| fSn|djo|i ||ƒ|fSntdƒ‚dS(NiÿÿÿÿistitiddƒD]}|i t|ƒi ƒƒq¶Wn|ioWxTti|idƒD]9}y|i t |ƒi ƒƒWqýtj oqýXqýWnh|_h|_h|_t|i|ƒdS(NlsPYSNMP_MIB_PKGSs:sPYSNMP_MIB_DIRsPYSNMP_MIB_DIRS(sselfs lastBuildIds _autoNamessourcessstringssplitsossenvironsgetsdefaultCoreMibssmsappends ZipMibSourcesinitshas_keys DirMibSourcesdefaultMiscMibss ImportErrors mibSymbolss_MibBuilder__modSeens_MibBuilder__modPathsSeensapplys setMibSources(sselfsmssources((s0build/bdist.linux-i686/egg/pysnmp/smi/builder.pys__init__‰s,%!     cGs5||_titi@otid|ifƒdS(NssetMibPath: new MIB sources %s(s mibSourcessselfs_MibBuilder__mibSourcessdebugsloggersflagBld(sselfs mibSources((s0build/bdist.linux-i686/egg/pysnmp/smi/builder.pys setMibSources£s cCs |iSdS(N(sselfs_MibBuilder__mibSources(sself((s0build/bdist.linux-i686/egg/pysnmp/smi/builder.pys getMibSources§scGst|itt|ƒƒdS(N(sapplysselfs setMibSourcessmaps DirMibSourcesmibPaths(sselfsmibPaths((s0build/bdist.linux-i686/egg/pysnmp/smi/builder.pys setMibPathªscCsRg}x;|iƒD]-}t|tƒo|i|iƒƒqqWt|ƒSdS(N( slsselfs getMibSourcess mibSources isinstances DirMibSourcesappendsfullPathstuple(sselfs mibSourcesl((s0build/bdist.linux-i686/egg/pysnmp/smi/builder.pys getMibPath­s  c Fsf| oKh}x2|iD]'}x|iƒD]}e||= pyTime: return marshal.loads(pycData), pycSfx if pyTime != -1: return self._getData(p, pyMode), pySfx raise IOError('No suitable module found') class ZipMibSource(__AbstractMibSource): def _init(self): p = __import__( self._srcName, globals(),locals(), string.split(self._srcName, '.') ) if hasattr(p, '__loader__'): self.__loader = p.__loader__ self._srcName = string.replace(self._srcName, '.', os.sep) return self else: return DirMibSource(os.path.split(p.__file__)[0]).init() def _parseDosTime(self, dosdate, dostime): t = ( ((dosdate >> 9) & 0x7f) + 1980, # year ((dosdate >> 5) & 0x0f), # month dosdate & 0x1f, # mday (dostime >> 11) & 0x1f, # hour (dostime >> 5) & 0x3f, # min (dostime & 0x1f) * 2, # sec -1, # wday -1, # yday -1 ) # dst return time.mktime(t) def _listdir(self): l = [] for f in self.__loader._files.keys(): d, f = os.path.split(f) if d == self._srcName: l.append(f) return tuple(self._uniqNames(l)) def _getTimestamp(self, p): if self.__loader._files.has_key(p): return self._parseDosTime( self.__loader._files[p][6], self.__loader._files[p][5] ) else: raise IOError('No file in ZIP: %s' % p) def _getData(self, p, mode=None): return self.__loader.get_data(p) class DirMibSource(__AbstractMibSource): def _init(self): self._srcName = os.path.normpath(self._srcName) return self def _listdir(self): return self._uniqNames(os.listdir(self._srcName)) def _getTimestamp(self, p): return os.stat(p)[8] def _getData(self, p, mode): return open(p, mode).read() class MibBuilder: loadTexts = 0 defaultCoreMibs = 'pysnmp.smi.mibs.instances:pysnmp.smi.mibs' defaultMiscMibs = 'pysnmp_mibs' def __init__(self): self.lastBuildId = self._autoName = 0L sources = [] for m in string.split( os.environ.get('PYSNMP_MIB_PKGS', self.defaultCoreMibs), ':' ): sources.append(ZipMibSource(m).init()) # Compatibility variable if os.environ.has_key('PYSNMP_MIB_DIR'): os.environ['PYSNMP_MIB_DIRS'] = os.environ['PYSNMP_MIB_DIR'] if os.environ.has_key('PYSNMP_MIB_DIRS'): for m in string.split(os.environ['PYSNMP_MIB_DIRS'], ':'): sources.append(DirMibSource(m).init()) if self.defaultMiscMibs: for m in string.split(self.defaultMiscMibs, ':'): try: sources.append(ZipMibSource(m).init()) except ImportError: pass self.mibSymbols = {} self.__modSeen = {} self.__modPathsSeen = {} apply(self.setMibSources, sources) # MIB modules management def setMibSources(self, *mibSources): self.__mibSources = mibSources debug.logger & debug.flagBld and debug.logger('setMibPath: new MIB sources %s' % (self.__mibSources,)) def getMibSources(self): return self.__mibSources # Legacy/compatibility methods def setMibPath(self, *mibPaths): apply(self.setMibSources, map(DirMibSource, mibPaths)) def getMibPath(self): l = [] for mibSource in self.getMibSources(): if isinstance(mibSource, DirMibSource): l.append(mibSource.fullPath()) return tuple(l) def loadModules(self, *modNames): # Build a list of available modules if not modNames: modNames = {} for mibSource in self.__mibSources: for modName in mibSource.listdir(): modNames[modName] = None modNames = modNames.keys() if not modNames: raise error.SmiError( 'No MIB module to load at %s' % (self,) ) for modName in modNames: for mibSource in self.__mibSources: debug.logger & debug.flagBld and debug.logger('loadModules: trying %s at %s' % (modName, mibSource)) try: modData, sfx = mibSource.read(modName) except IOError, why: debug.logger & debug.flagBld and debug.logger('loadModules: read %s from %s failed: %s' % (modName, mibSource, why)) continue modPath = mibSource.fullPath(modName, sfx) if self.__modPathsSeen.has_key(modPath): debug.logger & debug.flagBld and debug.logger('loadModules: seen %s' % modPath) break else: self.__modPathsSeen[modPath] = 1 debug.logger & debug.flagBld and debug.logger('loadModules: evaluating %s' % modPath) g = { 'mibBuilder': self } try: exec(modData, g) except StandardError, why: del self.__modPathsSeen[modPath] raise error.SmiError( 'MIB module \"%s\" load error: %s' % (modPath, why) ) self.__modSeen[modName] = modPath debug.logger & debug.flagBld and debug.logger('loadModules: loaded %s' % modPath) break if not self.__modSeen.has_key(modName): raise error.SmiError( 'MIB file \"%s\" not found in search path' % (modName and modName + ".py[co]") ) return self def unloadModules(self, *modNames): if not modNames: modNames = self.mibSymbols.keys() for modName in modNames: if not self.mibSymbols.has_key(modName): raise error.SmiError( 'No module %s at %s' % (modName, self) ) self.unexportSymbols(modName) del self.__modPathsSeen[self.__modSeen[modName]] del self.__modSeen[modName] debug.logger & debug.flagBld and debug.logger('unloadModules: ' % (modName)) return self def importSymbols(self, modName, *symNames): if not modName: raise error.SmiError( 'importSymbols: empty MIB module name' ) r = () for symName in symNames: if not self.mibSymbols.has_key(modName): self.loadModules(modName) if not self.mibSymbols.has_key(modName): raise error.SmiError( 'No module %s loaded at %s' % (modName, self) ) if not self.mibSymbols[modName].has_key(symName): raise error.SmiError( 'No symbol %s::%s at %s' % (modName, symName, self) ) r = r + (self.mibSymbols[modName][symName],) return r def exportSymbols(self, modName, *anonymousSyms, **namedSyms): if not self.mibSymbols.has_key(modName): self.mibSymbols[modName] = {} mibSymbols = self.mibSymbols[modName] for symObj in anonymousSyms: debug.logger & debug.flagBld and debug.logger('exportSymbols: anonymous symbol %s::__pysnmp_%ld' % (modName, self._autoName)) mibSymbols['__pysnmp_%ld' % self._autoName] = symObj self._autoName = self._autoName + 1 for symName, symObj in namedSyms.items(): if mibSymbols.has_key(symName): raise error.SmiError( 'Symbol %s already exported at %s' % (symName, modName) ) if hasattr(symObj, 'label'): symName = symObj.label or symName # class if type(symObj) == types.InstanceType: symName = symObj.getLabel() or symName # class instance mibSymbols[symName] = symObj debug.logger & debug.flagBld and debug.logger('exportSymbols: symbol %s::%s' % (modName, symName)) self.lastBuildId = self.lastBuildId + 1 def unexportSymbols(self, modName, *symNames): if not self.mibSymbols.has_key(modName): raise error.SmiError( 'No module %s at %s' % (modName, self) ) mibSymbols = self.mibSymbols[modName] if not symNames: symNames = mibSymbols.keys() for symName in symNames: if not mibSymbols.has_key(symName): raise error.SmiError( 'No symbol %s::%s at %s' % (modName, symName, self) ) del mibSymbols[symName] debug.logger & debug.flagBld and debug.logger('unexportSymbols: symbol %s::%s' % (modName, symName)) if not self.mibSymbols[modName]: del self.mibSymbols[modName] self.lastBuildId = self.lastBuildId + 1 PK†£=_MY=~~pysnmp/smi/mibs/ASN1.pyc;ò 1¯®Bc @svdklZdklZeiZeiZeiZeiZei Z e i ddedededede ƒdS( (suniv(srfc1902sASN1sIntegers OctetStrings BitStringsNullsObjectIdentifierN( s pyasn1.typesunivs pysnmp.protosrfc1902s Integer32sIntegers OctetStrings BitStringsNullsObjectIdentifiers mibBuilders exportSymbols(s OctetStringsrfc1902s BitStringsObjectIdentifiersIntegersNullsuniv((s2build/bdist.linux-i686/egg/pysnmp/smi/mibs/ASN1.pys?s       PK†£=t=¨éépysnmp/smi/mibs/SNMPv2-SMI.pyc;ò :zÝLcN@sbdkZdklZdklZlZdklZdkl Z dk l Z l Z dk lZeiddd d ƒ\ZZZeiZeiZeiZeiZeiZeiZeiZeiZeiZeiZd efd „ƒYZd fd„ƒYZdefd„ƒYZ defd„ƒYZ!defd„ƒYZ"defd„ƒYZ#defd„ƒYZ$de$fd„ƒYZ%de%fd„ƒYZ&de%fd„ƒYZ'de&fd „ƒYZ(d!e%fd"„ƒYZ)d#e%fd$„ƒYZ*e!d%d%fƒZ+e%d&fƒZ,e#e,i-d'fƒZ.e#e.i-d(fƒZ/e#e/i-d&fƒZ0e#e0i-d&fƒZ1e#e0i-d)fƒZ2e#e2i-d&fƒZ3d*e3_4e#e3i-d+fƒZ5e#e0i-d'fƒZ6e#e0i-d,fƒZ7e#e7i-d&fƒZ8e#e0i-d-fƒZ9e#e0i-d(fƒZ:e#e:i-d&fƒZ;e#e:i-d)fƒZ<e#e:i-d'fƒZ=ei>d.d/ed0ed1ed2ed3ed4ed5ed6ed7ed ed ede de!de"de&de'de#de%de(d!e)d#e*d8e+d9e,d:e.d;e/d<e0d=e1d>e2d?e3d@e5dAe6dBe7dCe8dDe9dEe:dFe;dGe<dHe=ƒ&dS(IN(sOidOrderedDict(sexvalserror(srfc1902(s constraint(sValueConstraintErrors PyAsn1Error(sdebugsASN1sIntegersObjectIdentifiersNulls ExtUTCTimecBs9tZeieieiddƒeiddƒƒZRS(Ni i (s__name__s __module__s OctetStrings subtypeSpecs constraintsConstraintsUnionsValueSizeConstraint(((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys ExtUTCTimessMibNodecBsGtZdZd„Zd„Zd„Zd„Zd„Zed„Z RS(NscCs ||_dS(N(snamesself(sselfsname((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys__init__scCsd|ii|ifSdS(Ns%s(%s)(sselfs __class__s__name__sname(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys__repr__"scCs |iSdS(N(sselfsname(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pysgetName%scCs |iSdS(N(sselfslabel(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pysgetLabel'scCs||_|SdS(N(slabelsself(sselfslabel((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pyssetLabel(s cCsT|i|iƒ}|tj o ||_n|itj o|i|_n|SdS(N(sselfs __class__snamesmyClonesNoneslabel(sselfsnamesmyClone((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pysclone,s   ( s__name__s __module__slabels__init__s__repr__sgetNamesgetLabelssetLabelsNonesclone(((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pysMibNodes     sModuleIdentitycBsktZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d „Z d „Z d „Z RS( NcCst|ddƒSdS(Ns lastUpdateds(sgetattrsself(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pysgetLastUpdated7scCs||_|SdS(N(svsselfs lastUpdated(sselfsv((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pyssetLastUpdated9s cCst|ddƒSdS(Ns organizations(sgetattrsself(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pysgetOrganization<scCs||_|SdS(N(svsselfs organization(sselfsv((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pyssetOrganization>s cCst|ddƒSdS(Ns contactInfos(sgetattrsself(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pysgetContactInfoAscCs||_|SdS(N(svsselfs contactInfo(sselfsv((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pyssetContactInfoCs cCst|ddƒSdS(Ns descriptions(sgetattrsself(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pysgetDescriptionFscCs||_|SdS(N(svsselfs description(sselfsv((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pyssetDescriptionHs cCst|dfƒSdS(Ns revisions(sgetattrsself(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys getRevisionsKscCs||_|SdS(N(sargssselfs revisions(sselfsargs((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys setRevisionsMs c CsNd|iƒ|iƒ|iƒ|iƒtitd„|iƒƒƒfSdS(NsaMODULE-IDENTITY LAST-UPDATED %s ORGANIZATION "%s" CONTACT-INFO "%s" DESCRIPTION "%s" %scCsd|S(NsREVISION "%s" (sx(sx((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys]s( sselfsgetLastUpdatedsgetOrganizationsgetContactInfosgetDescriptionsstringsjoinsmaps getRevisions(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys asn1PrintQs( s__name__s __module__sgetLastUpdatedssetLastUpdatedsgetOrganizationssetOrganizationsgetContactInfossetContactInfosgetDescriptionssetDescriptions getRevisionss setRevisionss asn1Print(((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pysModuleIdentity6s          sObjectIdentitycBsGtZd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(NcCst|ddƒSdS(Nsstatusscurrent(sgetattrsself(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys getStatus`scCs||_|SdS(N(svsselfsstatus(sselfsv((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys setStatusbs cCst|ddƒSdS(Ns descriptions(sgetattrsself(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pysgetDescriptionescCs||_|SdS(N(svsselfs description(sselfsv((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pyssetDescriptiongs cCst|ddƒSdS(Ns references(sgetattrsself(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys getReferencejscCs||_|SdS(N(svsselfs reference(sselfsv((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys setReferencels cCs'd|iƒ|iƒ|iƒfSdS(Ns?OBJECT-IDENTITY STATUS %s DESCRIPTION "%s" REFERENCE "%s"(sselfs getStatussgetDescriptions getReference(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys asn1Printps( s__name__s __module__s getStatuss setStatussgetDescriptionssetDescriptions getReferences setReferences asn1Print(((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pysObjectIdentity_s      sNotificationTypecBsYtZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d „Z RS( NcCst|dfƒSdS(Nsobjects(sgetattrsself(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys getObjects}scGs||_|SdS(N(sargssselfsobjects(sselfsargs((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys setObjectss cCst|ddƒSdS(Nsstatusscurrent(sgetattrsself(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys getStatus‚scCs||_|SdS(N(svsselfsstatus(sselfsv((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys setStatus„s cCst|ddƒSdS(Ns descriptions(sgetattrsself(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pysgetDescription‡scCs||_|SdS(N(svsselfs description(sselfsv((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pyssetDescription‰s cCst|dfƒSdS(Ns revisions(sgetattrsself(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys getRevisionsŒscCs||_|SdS(N(sargssselfs revisions(sselfsargs((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys setRevisionsŽs cCsZdtd„|iƒddfƒ|iƒ|iƒtitd„|iƒƒƒfSdS(NsFNOTIFICATION-TYPE OBJECTS { %s } STATUS %s DESCRIPTION "%s" %scCsd|d|dfS(Ns%s, %si(sxsy(sxsy((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys™sscCsd|S(NsREVISION "%s" (sx(sx((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pysœs( sreducesselfs getObjectss getStatussgetDescriptionsstringsjoinsmaps getRevisions(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys asn1Print’s( s__name__s __module__s getObjectss setObjectss getStatuss setStatussgetDescriptionssetDescriptions getRevisionss setRevisionss asn1Print(((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pysNotificationType|s        s MibIdentifiercBstZd„ZRS(NcCsdSdS(NsOBJECT IDENTIFIER((sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys asn1PrintŸs(s__name__s __module__s asn1Print(((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys MibIdentifieržss ObjectTypecBs˜tZeZed„Zd„Zd„Zd„Zd„Zd„Z d„Z d„Z d „Z d „Z d „Zd „Zd „Zd„Zd„ZRS(NcCsti||ƒ||_dS(N(sMibNodes__init__sselfsnamessyntax(sselfsnamessyntax((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys__init__¤scCst|i|ƒSdS(N(scmpsselfssyntaxsother(sselfsother((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys__cmp__©scCs!d|ii|i|ifSdS(Ns %s(%s, %s)(sselfs __class__s__name__snamessyntax(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys__repr__«scCs |iSdS(N(sselfssyntax(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys getSyntax¯scCst|ddƒSdS(Nsunitss(sgetattrsself(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pysgetUnits±scCs||_|SdS(N(svsselfsunits(sselfsv((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pyssetUnits³s cCst|ddƒSdS(Ns maxAccesssnot-accessible(sgetattrsself(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys getMaxAccess¶scCs||_|SdS(N(svsselfs maxAccess(sselfsv((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys setMaxAccess¸s cCst|ddƒSdS(Nsstatusscurrent(sgetattrsself(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys getStatus»scCs||_|SdS(N(svsselfsstatus(sselfsv((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys setStatus½s cCst|ddƒSdS(Ns descriptions(sgetattrsself(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pysgetDescriptionÀscCs||_|SdS(N(svsselfs description(sselfsv((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pyssetDescriptionÂs cCst|ddƒSdS(Ns references(sgetattrsself(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys getReferenceÅscCs||_|SdS(N(svsselfs reference(sselfsv((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys setReferenceÇs cCsHd|iƒii|iƒ|iƒ|iƒ|iƒ|iƒfSdS(NsdOBJECT-TYPE SYNTAX %s UNITS "%s" MAX-ACCESS %s STATUS %s DESCRIPTION "%s" REFERENCE "%s"( sselfs getSyntaxs __class__s__name__sgetUnitss getMaxAccesss getStatussgetDescriptions getReference(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys asn1PrintËs(s__name__s __module__sNones maxAccesss__init__s__cmp__s__repr__s getSyntaxsgetUnitsssetUnitss getMaxAccesss setMaxAccesss getStatuss setStatussgetDescriptionssetDescriptions getReferences setReferences asn1Print(((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys ObjectType¢s               sMibTreecBs›tZdZdZed„Zd„Zd„Zd„Zed„Z ed„Z d „Z d „Z d „Z d „Zd „Zd„Zd„Zd„ZRS(Nlsnot-accessiblecCs#ti|||ƒtƒ|_dS(N(s ObjectTypes__init__sselfsnamessyntaxsOidOrderedDicts_vars(sselfsnamessyntax((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys__init__ÞscGskxd|D]\}|ii|iƒo tid|i|fƒ‚n||i|iscCs t|ƒS(N(schrsx(sx((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pyssssUnknown value type for index %s(svalueserrorsSmiErrorsreprsobjsselfs_MibTableRow__intValues isSuperTypeOfs_MibTableRow__uint32Values_MibTableRow__timeticksValues_MibTableRow__counter32Values_MibTableRow__counter64Valuesclones_MibTableRow__ipaddrValuesstringsjoinsmapsstrs_MibTableRow__strValues impliedFlagsreducesss isFixedLengthsgetFixedLengthslens_MibTableRow__oidValues_MibTableRow__bitsValue(sselfsobjsvalues impliedFlagssslen((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys setFromName s2_4  " '#20#cCsŸ|ii|ƒpI|ii|ƒp6|ii|ƒp#|ii|ƒp|ii|ƒot|ƒfSn,|i i|ƒot t t |ƒƒSn|i i|ƒoP|p |iƒo f}nt|ƒf}td„t d„|ƒ|ƒSnŸ|ii|ƒo3|ot |ƒSq›t|iƒft |ƒSnY|ii|ƒo,td„t d„|ƒt|ƒfƒSntidt|ƒƒ‚dS(NcCs ||fS(N(sxsy(sxsy((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys@scCs t|ƒS(N(sordsx(sx((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys@ssUnknown value type for index %s(sselfs_MibTableRow__intValues isSuperTypeOfsobjs_MibTableRow__uint32Values_MibTableRow__timeticksValues_MibTableRow__counter32Values_MibTableRow__counter64Valuesints_MibTableRow__ipaddrValuestuplesmapsords_MibTableRow__strValues impliedFlags isFixedLengthsinitialslensreduces_MibTableRow__oidValuesnames_MibTableRow__bitsValueserrorsSmiErrorsrepr(sselfsobjs impliedFlagsinitial((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys getAsName1s _ #,cCs^|\}}|t|iƒd} g} x~|iD]s\}}} t i || ƒ\} |i| i| |ƒ\}} |i| id jo| i| i|fƒq3q3W| otid|| fƒ‚n| odSnxy|iiƒD]h\}} t i || ƒ\} titi@otid|| fƒ| i|| ||||fƒqîWdS(Niiÿÿÿÿs5Excessive instance identifier sub-OIDs left at %s: %ss announceManagementEvent %s to %s(sacFunsacCtxsnameslensselfsinstIds baseIndicess indexNamess impliedFlagsmodNamessymNames mibBuilders importSymbolssmibObjs setFromNamessyntaxsappendserrorsSmiErrorsaugmentingRowsskeyssmibSymsdebugsloggersflagInssactionsreceiveManagementEventsvalsidx(sselfsactionsnamesvalsidxs.10sacFunsacCtxsmodNamesinstIdssymNames baseIndicessmibSymsmibObjs impliedFlagssyntax((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pysannounceManagementEventQs"   (cCsÞ|\}}f}xp|iD]e\} } } ti | | ƒ\} x>|D]6\}} || i jo||i| | ƒ}qGqGWqW|oNtiti@otid||fƒ|i|f|||||fƒndS(Ns'receiveManagementEvent %s for suffix %s(sacFunsacCtxs newSuffixsselfs indexNamess impliedFlagsmodNamessymNames mibBuilders importSymbolssmibObjs baseIndicessnamessyntaxs getAsNamesdebugsloggersflagInssactions_MibTableRow__manageColumnssvalsidx(sselfsactions baseIndicessvalsidxs.10sacFunsacCtxs newSuffixssymNamesmodNamesmibObjs impliedFlagssyntaxsname((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pysreceiveManagementEventjs   "(cGsnxc|D][\}}|ii||fƒo#tid|i||fƒ‚nd|i||fed?ed@edAe"dBe#dCe$dDe&d-e(dEe)dFe*dGe+dHe,d<e-dIe.dJe/dKe0dLe1dMe2dNe3dOe4ƒdPS(Q(s constraintsnamedvalsASN1sIntegersObjectIdentifiers OctetStrings PYSNMP-MIBspysnmpModuleIDssSNMP-FRAMEWORK-MIBsSnmpAdminStringsSNMP-USER-BASED-SM-MIBs usmUserEntrys SNMPv2-SMIsBitss Integer32sModuleIdentitys MibIdentifiers MibScalarsMibTables MibTableRowsMibTableColumns TimeTickss SNMPv2-TCs RowStatusiiiii¸Os2005-05-14 00:00sThe PySNMP projectsPE-mail: ilya@glas.net Subscribe: pysnmp-users-request@lists.sourceforge.nets_This MIB module defines objects specific to User Security Model (USM) implementation at PySNMP.s subtypeSpecis namedValuessnotDiscoverables discoverables readwritesQWhether SNMP engine would support its discovery by responding to unknown clients.is doNotDiscovers doDiscoversdWhether SNMP engine would try to figure out the EngineIDs of its peers by sending discover requests.shThe table of USM users passphrases configured in the SNMP engine's Local Configuration Datastore (LCD).sPYSNMP-USM-MIBspysnmpUsmSecretUserNames4Information about a particular USM user credentials.i snoaccesssMThe username string for which a row in this table represents a configuration.iiÿÿsCUser's authentication passphrase used for localized key generation.s?User's encryption passphrase used for localized key generation.s readcreates Table statuss-User's localized key used for authentication.s)User's localized key used for encryption.s1User's non-localized key used for authentication.s-User's non-localized key used for encryption.spysnmpUsmKeyEntrysPYSNMP_MODULE_IDs pysnmpUsmMIBspysnmpUsmMIBObjectss pysnmpUsmCfgspysnmpUsmDiscoverablespysnmpUsmDiscoveryspysnmpUsmSecretTablespysnmpUsmSecretEntryspysnmpUsmSecretAuthKeyspysnmpUsmSecretPrivKeyspysnmpUsmSecretStatuss pysnmpUsmUserspysnmpUsmKeyAuthLocalizedspysnmpUsmKeyPrivLocalizedspysnmpUsmKeyAuthspysnmpUsmKeyPrivspysnmpUsmMIBConformancespysnmpUsmMIBCompliancesspysnmpUsmMIBGroupsN(9s pyasn1.types constraintsnamedvals mibBuilders importSymbolssIntegersObjectIdentifiers OctetStringspysnmpModuleIDssSnmpAdminStrings usmUserEntrysBitss Integer32sModuleIdentitys MibIdentifiers MibScalarsMibTables MibTableRowsMibTableColumns TimeTickss RowStatuss setRevisionss pysnmpUsmMIBs loadTextsssetOrganizationssetContactInfossetDescriptionspysnmpUsmMIBObjectss pysnmpUsmCfgssubtypesSingleValueConstraints NamedValuessclones setMaxAccessspysnmpUsmDiscoverablespysnmpUsmDiscoveryspysnmpUsmSecretTables setIndexNamesspysnmpUsmSecretEntrysValueSizeConstraintspysnmpUsmSecretUserNamespysnmpUsmSecretAuthKeyspysnmpUsmSecretPrivKeyspysnmpUsmSecretStatuss pysnmpUsmUserspysnmpUsmKeyEntryspysnmpUsmKeyAuthLocalizedspysnmpUsmKeyPrivLocalizedspysnmpUsmKeyAuthspysnmpUsmKeyPrivspysnmpUsmMIBConformancespysnmpUsmMIBCompliancesspysnmpUsmMIBGroupssregisterAugmentionssapplys getIndexNamess exportSymbols(&sSnmpAdminStringspysnmpUsmSecretTables MibScalars TimeTicksspysnmpUsmKeyPrivLocalizedspysnmpUsmKeyAuthLocalizedsModuleIdentityspysnmpUsmMIBConformancespysnmpUsmMIBCompliancesspysnmpUsmDiscoverablesBitsspysnmpUsmDiscoverysMibTableColumnsMibTables pysnmpUsmCfgspysnmpUsmKeyPrivs RowStatussObjectIdentifiersnamedvals OctetStrings MibTableRowspysnmpUsmSecretStatuss pysnmpUsmMIBs usmUserEntryspysnmpUsmMIBObjectssIntegers pysnmpUsmUsers Integer32spysnmpUsmSecretPrivKeys constraintspysnmpUsmSecretUserNamespysnmpUsmKeyAuthspysnmpUsmMIBGroupsspysnmpModuleIDss MibIdentifierspysnmpUsmSecretEntryspysnmpUsmSecretAuthKeyspysnmpUsmKeyEntry((s<build/bdist.linux-i686/egg/pysnmp/smi/mibs/PYSNMP-USM-MIB.pys?s~!E6   -0‡ ‡ 0 E ] ] ] E 03 ] ] ] ] -00PK†£=Á¿!kjkj*pysnmp/smi/mibs/SNMP-USER-BASED-SM-MIB.pyc;ò qŨGcF@sÖ dklZlZeiddddƒ\ZZZeiddddd ƒ\ZZ Z Z eid d d ƒ\Z Z eid ddddddddddddƒ \ ZZZZZZZZZZZZeiddddddd ƒ\ZZZZZZd!efd"„ƒYZ ed#d$d%d#d%d$d&d#d#d#f ƒZ!ei"oe!i#d'ƒned#d$d%d#d%d$d&d#d#d(f ƒZ$ei"oe$i#d)ƒned#d$d%d#d%d$d&d#d#d$f ƒZ%ei"oe%i#d*ƒned#d$d%d#d%d$d&d#d(d#f ƒZ&ei"oe&i#d+ƒned#d$d%d#d%d$d&d#d(d(f ƒZ'ei"oe'i#d,ƒned#d$d%d#d%d$d-fƒi(d.d/d0fƒZ)ei"oe)i*d1ƒnei"oe)i+d2ƒnei"oe)i#d3ƒned#d$d%d#d%d$d-d#fƒZ,ed#d$d%d#d%d$d-d#d#f ƒZ-ed#d$d%d#d%d$d-d#d#d#f eƒƒi.d4ƒZ/ei"oe/i#d5ƒned#d$d%d#d%d$d-d#d#d(f eƒƒi.d4ƒZ0ei"oe0i#d6ƒned#d$d%d#d%d$d-d#d#d$f eƒƒi.d4ƒZ1ei"oe1i#d7ƒned#d$d%d#d%d$d-d#d#d8f eƒƒi.d4ƒZ2ei"oe2i#d9ƒned#d$d%d#d%d$d-d#d#d:f eƒƒi.d4ƒZ3ei"oe3i#d;ƒned#d$d%d#d%d$d-d#d#d%f eƒƒi.d4ƒZ4ei"oe4i#d<ƒned#d$d%d#d%d$d-d#d(f ƒZ5ed#d$d%d#d%d$d-d#d(d#f eƒƒi.d=ƒZ6ei"oe6i#d>ƒned#d$d%d#d%d$d-d#d(d(f ƒZ7ei"oe7i#d?ƒned#d$d%d#d%d$d-d#d(d(d#f ƒi8d@dAdBfd@dAdCfƒZ9ei"oe9i#dDƒned#d$d%d#d%d$d-d#d(d(d#d#f e ƒƒi.dEƒZ:ei"oe:i#dFƒned#d$d%d#d%d$d-d#d(d(d#d(f eƒi;dGei<d#dHƒƒƒi.dEƒZ=ei"oe=i#dIƒndJefdK„ƒYZ>e>d#d$d%d#d%d$d-d#d(d(d#d$f eƒƒi.d4ƒZ?ei"oe?i#dLƒned#d$d%d#d%d$d-d#d(d(d#d8f eƒƒi.dMƒZ@ei"oe@i#dNƒned#d$d%d#d%d$d-d#d(d(d#d:f eƒiAdOƒƒi.dMƒZBei"oeBi#dPƒned#d$d%d#d%d$d-d#d(d(d#d%f e ƒiAdQƒƒi.dMƒZCei"oeCi#dRƒned#d$d%d#d%d$d-d#d(d(d#dSf e ƒiAdQƒƒi.dMƒZDei"oeDi#dTƒned#d$d%d#d%d$d-d#d(d(d#dUf eƒiAdVƒƒi.dMƒZEei"oeEi#dWƒned#d$d%d#d%d$d-d#d(d(d#dXf e ƒiAdQƒƒi.dMƒZFei"oeFi#dYƒned#d$d%d#d%d$d-d#d(d(d#d&f e ƒiAdQƒƒi.dMƒZGei"oeGi#dZƒned#d$d%d#d%d$d-d#d(d(d#d[f eƒi;dGei<d@dHƒƒiAdQƒƒi.dMƒZHei"oeHi#d\ƒned#d$d%d#d%d$d-d#d(d(d#d]f eƒiAd^ƒƒi.dMƒZIei"oeIi#d_ƒned#d$d%d#d%d$d-d#d(d(d#d`f eƒƒi.dMƒZJei"oeJi#daƒned#d$d%d#d%d$d-d(fƒZKed#d$d%d#d%d$d-d(d#f ƒZLed#d$d%d#d%d$d-d(d(f ƒZMe d#d$d%d#d%d$d-d(d(d#f ƒiNdAdbfdAdcfdAddfdAdefdAdffdAdgfdAdhfdAdifdAdjfdAdkfdAdlfdAdmfdAdnfdAdofdAdpfdAdqfdAdrfdAdsfƒZOeiPdAdte)ƒeiPdAd!e ƒeiPdAdue!dve$dwe%dxe&dye'dze)d{e,d|e-dge/dde0dee1dbe2dre3dhe4d}e5dme6d~e7de9dBe:dCe=dfe?doe@dqeBdneCdceDdpeEdjeFdkeGdseHdleIdieJd€eKdeLd‚eMƒ"eiPdAdƒeOƒd„S(…(s constraintsnamedvalsASN1sIntegersObjectIdentifiers OctetStringsSNMP-FRAMEWORK-MIBsSnmpAdminStrings SnmpEngineIDssnmpAuthProtocolsssnmpPrivProtocolss SNMPv2-CONFsModuleCompliances ObjectGroups SNMPv2-SMIsBitss Counter32s Integer32sModuleIdentitys MibIdentifiersObjectIdentitys MibScalarsMibTables MibTableRowsMibTableColumns TimeTickss snmpModuless SNMPv2-TCsAutonomousTypes RowPointers RowStatuss StorageTypesTextualConventions TestAndIncrs KeyChangecBstZRS(N(s__name__s __module__(((sDbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-USER-BASED-SM-MIB.pys KeyChangesiiii sNo Authentication Protocol.is/The HMAC-MD5-96 Digest Authentication Protocol.s/The HMAC-SHA-96 Digest Authentication Protocol.sNo Privacy Protocol.s*The CBC-DES Symmetric Encryption Protocol.is2002-10-16 00:00s1999-01-20 00:00s1997-11-20 00:00sSNMPv3 Working GroupsÆWG-email: snmpv3@lists.tislabs.com Subscribe: majordomo@lists.tislabs.com In msg body: subscribe snmpv3 Chair: Russ Mundy Network Associates Laboratories postal: 15204 Omega Drive, Suite 300 Rockville, MD 20850-4601 USA email: mundy@tislabs.com phone: +1 301-947-7107 Co-Chair: David Harrington Enterasys Networks Postal: 35 Industrial Way P. O. Box 5004 Rochester, New Hampshire 03866-5005 USA EMail: dbh@enterasys.com Phone: +1 603-337-2614 Co-editor Uri Blumenthal Lucent Technologies postal: 67 Whippany Rd. Whippany, NJ 07981 USA email: uri@lucent.com phone: +1-973-386-2163 Co-editor: Bert Wijnen Lucent Technologies postal: Schagen 33 3461 GL Linschoten Netherlands email: bwijnen@lucent.com phone: +31-348-480-685sÚThe management information definitions for the SNMP User-based Security Model. Copyright (C) The Internet Society (2002). This version of this MIB module is part of RFC 3414; see the RFC itself for full legal notices.sreadonlys¯The total number of packets received by the SNMP engine which were dropped because they requested a securityLevel that was unknown to the SNMP engine or otherwise unavailable.s“The total number of packets received by the SNMP engine which were dropped because they appeared outside of the authoritative SNMP engine's window.sThe total number of packets received by the SNMP engine which were dropped because they referenced a user that was not known to the SNMP engine.is™The total number of packets received by the SNMP engine which were dropped because they referenced an snmpEngineID that was not known to the SNMP engine.isThe total number of packets received by the SNMP engine which were dropped because they didn't contain the expected digest value.soThe total number of packets received by the SNMP engine which were dropped because they could not be decrypted.s readwritesAn advisory lock used to allow several cooperating Command Generator Applications to coordinate their use of facilities to alter secrets in the usmUserTable.sáThe table of users configured in the SNMP engine's Local Configuration Datastore (LCD). To create a new user (i.e., to instantiate a new conceptual row in this table), it is recommended to follow this procedure: 1) GET(usmUserSpinLock.0) and save in sValue. 2) SET(usmUserSpinLock.0=sValue, usmUserCloneFrom=templateUser, usmUserStatus=createAndWait) You should use a template user to clone from which has the proper auth/priv protocol defined. If the new user is to use privacy: 3) generate the keyChange value based on the secret privKey of the clone-from user and the secret key to be used for the new user. Let us call this pkcValue. 4) GET(usmUserSpinLock.0) and save in sValue. 5) SET(usmUserSpinLock.0=sValue, usmUserPrivKeyChange=pkcValue usmUserPublic=randomValue1) 6) GET(usmUserPulic) and check it has randomValue1. If not, repeat steps 4-6. If the new user will never use privacy: 7) SET(usmUserPrivProtocol=usmNoPrivProtocol) If the new user is to use authentication: 8) generate the keyChange value based on the secret authKey of the clone-from user and the secret key to be used for the new user. Let us call this akcValue. 9) GET(usmUserSpinLock.0) and save in sValue. 10) SET(usmUserSpinLock.0=sValue, usmUserAuthKeyChange=akcValue usmUserPublic=randomValue2) 11) GET(usmUserPulic) and check it has randomValue2. If not, repeat steps 9-11. If the new user will never use authentication: 12) SET(usmUserAuthProtocol=usmNoAuthProtocol) Finally, activate the new user: 13) SET(usmUserStatus=active) The new user should now be available and ready to be used for SNMPv3 communication. Note however that access to MIB data must be provided via configuration of the SNMP-VIEW-BASED-ACM-MIB. The use of usmUserSpinlock is to avoid conflicts with another SNMP command generator application which may also be acting on the usmUserTable.isSNMP-USER-BASED-SM-MIBsusmUserEngineIDs usmUserNamesmA user configured in the SNMP engine's Local Configuration Datastore (LCD) for the User-based Security Model.snoaccesss÷An SNMP engine's administratively-unique identifier. In a simple agent, this value is always that agent's own snmpEngineID value. The value can also take the value of the snmpEngineID of a remote SNMP engine with which this user can communicate.s subtypeSpeci szA human readable string representing the name of the user. This is the (User-based Security) Model dependent security ID.sUsmUserSecurityNamecBs5tZd„Zd„Zd„Zd„Zd„ZRS(NcCs?tiddƒ\}|i|t|iƒƒ\}}|SdS(NsSNMP-USER-BASED-SM-MIBs usmUserEntry( s mibBuilders importSymbolss"_UsmUserSecurityName__usmUserEntrysgetIndicesFromInstIdsnameslensselfs%_UsmUserSecurityName__usmUserEngineIDs!_UsmUserSecurityName__usmUserName(sselfsnames!_UsmUserSecurityName__usmUserNames"_UsmUserSecurityName__usmUserEntrys%_UsmUserSecurityName__usmUserEngineID((sDbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-USER-BASED-SM-MIB.pys__getUsmUserNameBs"cCs8|\}}ti|||i|ƒ|||fƒSdS(N(sacFunsacCtxsMibTableColumns createTestsselfsnames$_UsmUserSecurityName__getUsmUserNamesidx(sselfsnamesvalsidxs.8sacFunsacCtx((sDbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-USER-BASED-SM-MIB.pys createTestJs cCs8|\}}ti|||i|ƒ|||fƒSdS(N(sacFunsacCtxsMibTableColumns createCommitsselfsnames$_UsmUserSecurityName__getUsmUserNamesidx(sselfsnamesvalsidxs.8sacFunsacCtx((sDbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-USER-BASED-SM-MIB.pys createCommitNs cCs8|\}}ti|||i|ƒ|||fƒSdS(N(sacFunsacCtxsMibTableColumns createCleanupsselfsnames$_UsmUserSecurityName__getUsmUserNamesidx(sselfsnamesvalsidxs.8sacFunsacCtx((sDbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-USER-BASED-SM-MIB.pys createCleanupRs cCs8|\}}ti|||i|ƒ|||fƒSdS(N(sacFunsacCtxsMibTableColumns createUndosselfsnames$_UsmUserSecurityName__getUsmUserNamesidx(sselfsnamesvalsidxs.8sacFunsacCtx((sDbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-USER-BASED-SM-MIB.pys createUndoVs (s__name__s __module__s$_UsmUserSecurityName__getUsmUserNames createTests createCommits createCleanups createUndo(((sDbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-USER-BASED-SM-MIB.pysUsmUserSecurityNameAs     sA human readable string representing the user in Security Model independent format. The default transformation of the User-based Security Model dependent security ID to the securityName and vice versa is the identity function so that the securityName is the same as the userName.s readcreatesùA pointer to another conceptual row in this usmUserTable. The user in this other conceptual row is called the clone-from user. When a new user is created (i.e., a new conceptual row is instantiated in this table), the privacy and authentication parameters of the new user must be cloned from its clone-from user. These parameters are: - authentication protocol (usmUserAuthProtocol) - privacy protocol (usmUserPrivProtocol) They will be copied regardless of what the current value is. Cloning also causes the initial values of the secret authentication key (authKey) and the secret encryption key (privKey) of the new user to be set to the same values as the corresponding secrets of the clone-from user to allow the KeyChange process to occur as required during user creation. The first time an instance of this object is set by a management operation (either at or after its instantiation), the cloning process is invoked. Subsequent writes are successful but invoke no action to be taken by the receiver. The cloning process fails with an 'inconsistentName' error if the conceptual row representing the clone-from user does not exist or is not in an active state when the cloning process is invoked. When this object is read, the ZeroDotZero OID is returned.s1.3.6.1.6.3.10.1.1.1s¹An indication of whether messages sent on behalf of this user to/from the SNMP engine identified by usmUserEngineID, can be authenticated, and if so, the type of authentication protocol which is used. An instance of this object is created concurrently with the creation of any other object instance for the same user (i.e., as part of the processing of the set operation which creates the first object instance in the same conceptual row). If an initial set operation (i.e. at row creation time) tries to set a value for an unknown or unsupported protocol, then a 'wrongValue' error must be returned. The value will be overwritten/set when a set operation is performed on the corresponding instance of usmUserCloneFrom. Once instantiated, the value of such an instance of this object can only be changed via a set operation to the value of the usmNoAuthProtocol. If a set operation tries to change the value of an existing instance of this object to any value other than usmNoAuthProtocol, then an 'inconsistentValue' error must be returned. If a set operation tries to set the value to the usmNoAuthProtocol while the usmUserPrivProtocol value in the same row is not equal to usmNoPrivProtocol, then an 'inconsistentValue' error must be returned. That means that an SNMP command generator application must first ensure that the usmUserPrivProtocol is set to the usmNoPrivProtocol value before it can set the usmUserAuthProtocol value to usmNoAuthProtocol.ssVAn object, which when modified, causes the secret authentication key used for messages sent on behalf of this user to/from the SNMP engine identified by usmUserEngineID, to be modified via a one-way function. The associated protocol is the usmUserAuthProtocol. The associated secret key is the user's secret authentication key (authKey). The associated hash algorithm is the algorithm used by the user's usmUserAuthProtocol. When creating a new user, it is an 'inconsistentName' error for a set operation to refer to this object unless it is previously or concurrently initialized through a set operation on the corresponding instance of usmUserCloneFrom. When the value of the corresponding usmUserAuthProtocol is usmNoAuthProtocol, then a set is successful, but effectively is a no-op. When this object is read, the zero-length (empty) string is returned. The recommended way to do a key change is as follows: 1) GET(usmUserSpinLock.0) and save in sValue. 2) generate the keyChange value based on the old (existing) secret key and the new secret key, let us call this kcValue. If you do the key change on behalf of another user: 3) SET(usmUserSpinLock.0=sValue, usmUserAuthKeyChange=kcValue usmUserPublic=randomValue) If you do the key change for yourself: 4) SET(usmUserSpinLock.0=sValue, usmUserOwnAuthKeyChange=kcValue usmUserPublic=randomValue) If you get a response with error-status of noError, then the SET succeeded and the new key is active. If you do not get a response, then you can issue a GET(usmUserPublic) and check if the value is equal to the randomValue you did send in the SET. If so, then the key change succeeded and the new key is active (probably the response got lost). If not, then the SET request probably never reached the target and so you can start over with the procedure above.is2Behaves exactly as usmUserAuthKeyChange, with one notable difference: in order for the set operation to succeed, the usmUserName of the operation requester must match the usmUserName that indexes the row which is targeted by this operation. In addition, the USM security model must be used for this operation. The idea here is that access to this column can be public, since it will only allow a user to change his own secret authentication key (authKey). Note that this can only be done once the row is active. When a set is received and the usmUserName of the requester is not the same as the umsUserName that indexes the row which is targeted by this operation, then a 'noAccess' error must be returned. When a set is received and the security model in use is not USM, then a 'noAccess' error must be returned.is1.3.6.1.6.3.10.1.2.1suAn indication of whether messages sent on behalf of this user to/from the SNMP engine identified by usmUserEngineID, can be protected from disclosure, and if so, the type of privacy protocol which is used. An instance of this object is created concurrently with the creation of any other object instance for the same user (i.e., as part of the processing of the set operation which creates the first object instance in the same conceptual row). If an initial set operation (i.e. at row creation time) tries to set a value for an unknown or unsupported protocol, then a 'wrongValue' error must be returned. The value will be overwritten/set when a set operation is performed on the corresponding instance of usmUserCloneFrom. Once instantiated, the value of such an instance of this object can only be changed via a set operation to the value of the usmNoPrivProtocol. If a set operation tries to change the value of an existing instance of this object to any value other than usmNoPrivProtocol, then an 'inconsistentValue' error must be returned. Note that if any privacy protocol is used, then you must also use an authentication protocol. In other words, if usmUserPrivProtocol is set to anything else than usmNoPrivProtocol, then the corresponding instance of usmUserAuthProtocol cannot have a value of usmNoAuthProtocol. If it does, then an 'inconsistentValue' error must be returned.i sµAn object, which when modified, causes the secret encryption key used for messages sent on behalf of this user to/from the SNMP engine identified by usmUserEngineID, to be modified via a one-way function. The associated protocol is the usmUserPrivProtocol. The associated secret key is the user's secret privacy key (privKey). The associated hash algorithm is the algorithm used by the user's usmUserAuthProtocol. When creating a new user, it is an 'inconsistentName' error for a set operation to refer to this object unless it is previously or concurrently initialized through a set operation on the corresponding instance of usmUserCloneFrom. When the value of the corresponding usmUserPrivProtocol is usmNoPrivProtocol, then a set is successful, but effectively is a no-op. When this object is read, the zero-length (empty) string is returned. See the description clause of usmUserAuthKeyChange for a recommended procedure to do a key change.s,Behaves exactly as usmUserPrivKeyChange, with one notable difference: in order for the Set operation to succeed, the usmUserName of the operation requester must match the usmUserName that indexes the row which is targeted by this operation. In addition, the USM security model must be used for this operation. The idea here is that access to this column can be public, since it will only allow a user to change his own secret privacy key (privKey). Note that this can only be done once the row is active. When a set is received and the usmUserName of the requester is not the same as the umsUserName that indexes the row which is targeted by this operation, then a 'noAccess' error must be returned. When a set is received and the security model in use is not USM, then a 'noAccess' error must be returned.i sÒA publicly-readable value which can be written as part of the procedure for changing a user's secret authentication and/or privacy key, and later read to determine whether the change of the secret was effected.i s nonVolatiles-The storage type for this conceptual row. Conceptual rows having the value 'permanent' must allow write-access at a minimum to: - usmUserAuthKeyChange, usmUserOwnAuthKeyChange and usmUserPublic for a user who employs authentication, and - usmUserPrivKeyChange, usmUserOwnPrivKeyChange and usmUserPublic for a user who employs privacy. Note that any user who employs authentication or privacy must allow its secret(s) to be updated and thus cannot be 'readOnly'. If an initial set operation tries to set the value to 'readOnly' for a user who employs authentication or privacy, then an 'inconsistentValue' error must be returned. Note that if the value has been previously set (implicit or explicit) to any value, then the rules as defined in the StorageType Textual Convention apply. It is an implementation issue to decide if a SET for a readOnly or permanent row is accepted at all. In some contexts this may make sense, in others it may not. If a SET for a readOnly or permanent row is not accepted at all, then a 'wrongValue' error must be returned.i ssThe status of this conceptual row. Until instances of all corresponding columns are appropriately configured, the value of the corresponding instance of the usmUserStatus column is 'notReady'. In particular, a newly created row for a user who employs authentication, cannot be made active until the corresponding usmUserCloneFrom and usmUserAuthKeyChange have been set. Further, a newly created row for a user who also employs privacy, cannot be made active until the usmUserPrivKeyChange has been set. The RowStatus TC [RFC2579] requires that this DESCRIPTION clause states under which circumstances other objects in this row can be modified: The value of this object has no effect on whether other objects in this conceptual row can be modified, except for usmUserOwnAuthKeyChange and usmUserOwnPrivKeyChange. For these 2 objects, the value of usmUserStatus MUST be active.susmStatsUnknownEngineIDssusmUserOwnAuthKeyChangesusmStatsNotInTimeWindowssusmStatsUnknownUserNamessusmUserSecurityNamesusmStatsUnsupportedSecLevelssusmStatsDecryptionErrorss usmUserStatussusmUserPrivKeyChangesusmUserOwnPrivKeyChangesusmUserStorageTypesusmUserSpinLocksusmUserAuthKeyChangesusmUserCloneFromsusmUserPrivProtocolsusmUserAuthProtocolsusmStatsWrongDigestss usmUserPublicsPYSNMP_MODULE_IDsusmNoAuthProtocolsusmHMACMD5AuthProtocolsusmHMACSHAAuthProtocolsusmNoPrivProtocolsusmDESPrivProtocols snmpUsmMIBs usmMIBObjectssusmStatssusmUsers usmUserTables usmUserEntrysusmMIBConformancesusmMIBCompliancess usmMIBGroupssusmMIBBasicGroupN(Qs pyasn1.types constraintsnamedvals mibBuilders importSymbolssIntegersObjectIdentifiers OctetStringsSnmpAdminStrings SnmpEngineIDssnmpAuthProtocolsssnmpPrivProtocolssModuleCompliances ObjectGroupsBitss Counter32s Integer32sModuleIdentitys MibIdentifiersObjectIdentitys MibScalarsMibTables MibTableRowsMibTableColumns TimeTickss snmpModulessAutonomousTypes RowPointers RowStatuss StorageTypesTextualConventions TestAndIncrs KeyChangesusmNoAuthProtocols loadTextsssetDescriptionsusmHMACMD5AuthProtocolsusmHMACSHAAuthProtocolsusmNoPrivProtocolsusmDESPrivProtocols setRevisionss snmpUsmMIBssetOrganizationssetContactInfos usmMIBObjectssusmStatss setMaxAccesssusmStatsUnsupportedSecLevelssusmStatsNotInTimeWindowssusmStatsUnknownUserNamessusmStatsUnknownEngineIDssusmStatsWrongDigestssusmStatsDecryptionErrorssusmUsersusmUserSpinLocks usmUserTables setIndexNamess usmUserEntrysusmUserEngineIDssubtypesValueSizeConstraints usmUserNamesUsmUserSecurityNamesusmUserSecurityNamesusmUserCloneFromsclonesusmUserAuthProtocolsusmUserAuthKeyChangesusmUserOwnAuthKeyChangesusmUserPrivProtocolsusmUserPrivKeyChangesusmUserOwnPrivKeyChanges usmUserPublicsusmUserStorageTypes usmUserStatussusmMIBConformancesusmMIBCompliancess usmMIBGroupss setObjectssusmMIBBasicGroups exportSymbols(BsusmUserOwnAuthKeyChangesSnmpAdminStringsusmNoAuthProtocols MibScalarsAutonomousTypesusmStatsDecryptionErrorss TimeTickssusmStatsWrongDigestssusmUserEngineIDsModuleIdentitys SnmpEngineIDsusmUserSpinLocksusmUserCloneFroms snmpModulessusmUserAuthProtocolsusmUserOwnPrivKeyChangesBitss usmUserPublics ObjectGroupsMibTableColumnsusmStatsUnknownUserNamessModuleCompliancesusmStatsUnsupportedSecLevelssMibTables usmUserStatuss usmMIBGroupssusmMIBBasicGroups RowStatussusmMIBCompliancess usmUserTablesObjectIdentifiersnamedvalsusmStatssusmUserSecurityNames OctetStringsusmNoPrivProtocols MibTableRows RowPointers usmUserEntrysusmStatsUnknownEngineIDsssnmpAuthProtocolss usmMIBObjectss TestAndIncrsusmUserAuthKeyChangessnmpPrivProtocolssusmDESPrivProtocolsIntegersusmHMACMD5AuthProtocolsusmUsers Integer32s KeyChangesusmStatsNotInTimeWindowss constraints StorageTypesusmUserStorageTypesusmHMACSHAAuthProtocolsUsmUserSecurityNamesTextualConventions snmpUsmMIBs usmUserNamesusmMIBConformances MibIdentifiersusmUserPrivProtocolsusmUserPrivKeyChangesObjectIdentitys Counter32((sDbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-USER-BASED-SM-MIB.pys?sÔ!'W3* * * * * 3   $'9 9 9 9 9 9 '9 * K ? W ? ? H H H H H H ` H ? $''ÒÙPK†o1pysnmp/smi/mibs/__init__.pyPK†£=׿ HHpysnmp/smi/mibs/SNMPv2-CONF.pyc;ò ž7ôLc @s–eiddƒ\Zdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd „ƒYZeid dedededeƒd S( s SNMPv2-SMIsMibNodes ObjectGroupcBs5tZd„Zd„Zd„Zd„Zd„ZRS(NcCst|dfƒSdS(Nsobjects(sgetattrsself(sself((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-CONF.pys getObjectsscGs||_|SdS(N(sargssselfsobjects(sselfsargs((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-CONF.pys setObjectss cCst|ddƒSdS(Ns descriptions(sgetattrsself(sself((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-CONF.pysgetDescription scCs||_|SdS(N(svsselfs description(sselfsv((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-CONF.pyssetDescription s cCs3dtd„|iƒddfƒ|iƒfSdS(Ns0OBJECT-GROUP OBJECTS { %s } DESCRIPTION "%s"cCsd|d|dfS(Ns%s, %si(sxsy(sxsy((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-CONF.pysss(sreducesselfs getObjectssgetDescription(sself((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-CONF.pys asn1Prints(s__name__s __module__s getObjectss setObjectssgetDescriptionssetDescriptions asn1Print(((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-CONF.pys ObjectGroups     sNotificationGroupcBs5tZd„Zd„Zd„Zd„Zd„ZRS(NcCst|dfƒSdS(Nsobjects(sgetattrsself(sself((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-CONF.pys getObjectsscGs||_|SdS(N(sargssselfsobjects(sselfsargs((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-CONF.pys setObjectss cCst|ddƒSdS(Ns descriptions(sgetattrsself(sself((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-CONF.pysgetDescriptionscCs||_|SdS(N(svsselfs description(sselfsv((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-CONF.pyssetDescriptions cCs3dtd„|iƒddfƒ|iƒfSdS(Ns<NOTIFICATION-GROUP NOTIFICATIONS { %s } DESCRIPTION "%s"cCsd|d|dfS(Ns%s, %si(sxsy(sxsy((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-CONF.pys&ss(sreducesselfs getObjectssgetDescription(sself((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-CONF.pys asn1Print!s(s__name__s __module__s getObjectss setObjectssgetDescriptionssetDescriptions asn1Print(((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-CONF.pysNotificationGroups     sModuleCompliancecBs5tZd„Zd„Zd„Zd„Zd„ZRS(NcCst|dfƒSdS(Nsobjects(sgetattrsself(sself((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-CONF.pys getObjects*scGs||_|SdS(N(sargssselfsobjects(sselfsargs((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-CONF.pys setObjects,s cCst|ddƒSdS(Ns descriptions(sgetattrsself(sself((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-CONF.pysgetDescription/scCs||_|SdS(N(svsselfs description(sselfsv((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-CONF.pyssetDescription1s cCs3dtd„|iƒddfƒ|iƒfSdS(Ns6MODULE-COMPLIANCE OBJECT { %s } DESCRIPTION "%s" cCsd|d|dfS(Ns%s, %si(sxsy(sxsy((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-CONF.pys9ss(sreducesselfs getObjectssgetDescription(sself((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-CONF.pys asn1Print4s(s__name__s __module__s getObjectss setObjectssgetDescriptionssetDescriptions asn1Print(((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-CONF.pysModuleCompliance)s     sAgentCapabilitiescBs#tZd„Zd„Zd„ZRS(NcCst|ddƒSdS(Ns descriptions(sgetattrsself(sself((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-CONF.pysgetDescription=scCs||_|SdS(N(svsselfs description(sselfsv((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-CONF.pyssetDescription?s cCsd|iƒSdS(Ns&AGENT-CAPABILITIES DESCRIPTION "%s" (sselfsgetDescription(sself((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-CONF.pys asn1PrintBs(s__name__s __module__sgetDescriptionssetDescriptions asn1Print(((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-CONF.pysAgentCapabilities<s  s SNMPv2-CONFN(s mibBuilders importSymbolssMibNodes ObjectGroupsNotificationGroupsModuleCompliancesAgentCapabilitiess exportSymbols(sAgentCapabilitiess ObjectGroupsModuleCompliancesMibNodesNotificationGroup((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-CONF.pys?s  PKz£,<ÿ6r·  pysnmp/smi/mibs/SNMPv2-TM.pyimport types, string from pyasn1.type import constraint OctetString, = mibBuilder.importSymbols('ASN1', 'OctetString') ( ModuleIdentity, MibIdentifier, ObjectIdentity, snmpModules, snmpDomains, snmpProxys ) = mibBuilder.importSymbols( 'SNMPv2-SMI', 'ModuleIdentity', 'MibIdentifier', 'ObjectIdentity', 'snmpModules', 'snmpDomains', 'snmpProxys' ) TextualConvention, = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention') snmpv2tm = ModuleIdentity(snmpModules.name + (19,)).setRevisions(("2002-10-16 00:00",)) snmpUDPDomain = ObjectIdentity(snmpDomains.name + (1,)) class SnmpUDPAddress(TextualConvention, OctetString): subtypeSpec = OctetString.subtypeSpec + constraint.ValueSizeConstraint(6, 6) displayHint = "1d.1d.1d.1d/2d" def prettyIn(self, value): if type(value) == types.TupleType: # Wild hack -- need to implement TextualConvention.prettyIn return reduce(lambda x,y: x+y, map(lambda x: chr(string.atoi(x)), string.split(value[0], '.'))) + chr((value[1] >> 8) & 0xff) + chr((value[1] & 0xff)) else: return OctetString.prettyIn(self, value) # Socket address syntax coercion def __getitem__(self, i): if not hasattr(self, '__tuple_value'): self.__tuple_value = ( string.join(map(lambda x: str(ord(x)), self._value[:4]), '.'), ord(self._value[4:5]) << 8 | ord(self._value[5:6]) ) return self.__tuple_value[i] snmpCLNSDomain = ObjectIdentity(snmpDomains.name + (2,)) snmpCONSDomain = ObjectIdentity(snmpDomains.name + (3,)) class SnmpOSIAddress(TextualConvention, OctetString): subtypeSpec = OctetString.subtypeSpec + constraint.ValueSizeConstraint(1, 85) displayHint = "*1x:/1x:" snmpDDPDomain = ObjectIdentity(snmpDomains.name + (4,)) class SnmpNBPAddress(OctetString, TextualConvention): subtypeSpec = OctetString.subtypeSpec + constraint.ValueSizeConstraint(3, 99) snmpIPXDomain = ObjectIdentity(snmpDomains.name + (5,)) class SnmpIPXAddress(TextualConvention, OctetString): subtypeSpec = OctetString.subtypeSpec + constraint.ValueSizeConstraint(12, 12) displayHint = "4x.1x:1x:1x:1x:1x:1x.2d" rfc1157Proxy = MibIdentifier(snmpProxys.name + (1,)) rfc1157Domain = MibIdentifier(rfc1157Proxy.name + (1,)) # Module identity mibBuilder.exportSymbols("SNMPv2-TM", PYSNMP_MODULE_ID=snmpv2tm) mibBuilder.exportSymbols( 'SNMPv2-TM', snmpv2tm=snmpv2tm, snmpUDPDomain=snmpUDPDomain, SnmpUDPAddress=SnmpUDPAddress, snmpCLNSDomain=snmpCLNSDomain, snmpCONSDomain=snmpCONSDomain, SnmpOSIAddress=SnmpOSIAddress, snmpDDPDomain=snmpDDPDomain, SnmpNBPAddress=SnmpNBPAddress, snmpIPXDomain=snmpIPXDomain, SnmpIPXAddress=SnmpIPXAddress, rfc1157Proxy=rfc1157Proxy, rfc1157Domain=rfc1157Domain ) PKà©z:Goà——pysnmp/smi/mibs/RFC1213-MIB.py# PySNMP SMI module. Autogenerated from smidump -f python RFC1213-MIB # by libsmi2pysnmp-0.0.9-alpha at Thu Mar 26 20:59:40 2009, # Python version (2, 4, 4, 'final', 0) # Imported just in case new ASN.1 types would be created from pyasn1.type import constraint, namedval # Imports ( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") ( NetworkAddress, ) = mibBuilder.importSymbols("RFC1155-SMI", "NetworkAddress") ( Bits, Counter32, Gauge32, Integer32, Integer32, IpAddress, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, TimeTicks, mgmt, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "Counter32", "Gauge32", "Integer32", "Integer32", "IpAddress", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "TimeTicks", "mgmt") # Types class DisplayString(OctetString): pass class PhysAddress(OctetString): pass # Objects mib_2 = MibIdentifier((1, 3, 6, 1, 2, 1)).setLabel("mib-2") system = MibIdentifier((1, 3, 6, 1, 2, 1, 1)) sysDescr = MibScalar((1, 3, 6, 1, 2, 1, 1, 1), DisplayString().subtype(subtypeSpec=constraint.ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: sysDescr.setDescription("A textual description of the entity. This value\nshould include the full name and version\nidentification of the system's hardware type,\nsoftware operating-system, and networking\nsoftware. It is mandatory that this only contain\nprintable ASCII characters.") sysObjectID = MibScalar((1, 3, 6, 1, 2, 1, 1, 2), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysObjectID.setDescription("The vendor's authoritative identification of the\nnetwork management subsystem contained in the\nentity. This value is allocated within the SMI\nenterprises subtree (1.3.6.1.4.1) and provides an\neasy and unambiguous means for determining `what\nkind of box' is being managed. For example, if\nvendor `Flintstones, Inc.' was assigned the\nsubtree 1.3.6.1.4.1.4242, it could assign the\nidentifier 1.3.6.1.4.1.4242.1.1 to its `Fred\nRouter'.") sysUpTime = MibScalar((1, 3, 6, 1, 2, 1, 1, 3), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysUpTime.setDescription("The time (in hundredths of a second) since the\nnetwork management portion of the system was last\nre-initialized.") sysContact = MibScalar((1, 3, 6, 1, 2, 1, 1, 4), DisplayString().subtype(subtypeSpec=constraint.ValueSizeConstraint(0, 255))).setMaxAccess("readwrite") if mibBuilder.loadTexts: sysContact.setDescription("The textual identification of the contact person\nfor this managed node, together with information\non how to contact this person.") sysName = MibScalar((1, 3, 6, 1, 2, 1, 1, 5), DisplayString().subtype(subtypeSpec=constraint.ValueSizeConstraint(0, 255))).setMaxAccess("readwrite") if mibBuilder.loadTexts: sysName.setDescription("An administratively-assigned name for this\nmanaged node. By convention, this is the node's\nfully-qualified domain name.") sysLocation = MibScalar((1, 3, 6, 1, 2, 1, 1, 6), DisplayString().subtype(subtypeSpec=constraint.ValueSizeConstraint(0, 255))).setMaxAccess("readwrite") if mibBuilder.loadTexts: sysLocation.setDescription("The physical location of this node (e.g.,\n`telephone closet, 3rd floor').") sysServices = MibScalar((1, 3, 6, 1, 2, 1, 1, 7), Integer32().subtype(subtypeSpec=constraint.ValueRangeConstraint(0, 127))).setMaxAccess("readonly") if mibBuilder.loadTexts: sysServices.setDescription("A value which indicates the set of services that\nthis entity primarily offers.\n\nThe value is a sum. This sum initially takes the\nvalue zero, Then, for each layer, L, in the range\n1 through 7, that this node performs transactions\nfor, 2 raised to (L - 1) is added to the sum. For\nexample, a node which performs primarily routing\nfunctions would have a value of 4 (2^(3-1)). In\ncontrast, a node which is a host offering\napplication services would have a value of 72\n(2^(4-1) + 2^(7-1)). Note that in the context of\nthe Internet suite of protocols, values should be\ncalculated accordingly:\n\n layer functionality\n 1 physical (e.g., repeaters)\n 2 datalink/subnetwork (e.g., bridges)\n 3 internet (e.g., IP gateways)\n 4 end-to-end (e.g., IP hosts)\n 7 applications (e.g., mail relays)\n\nFor systems including OSI protocols, layers 5 and\n6 may also be counted.") interfaces = MibIdentifier((1, 3, 6, 1, 2, 1, 2)) ifNumber = MibScalar((1, 3, 6, 1, 2, 1, 2, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifNumber.setDescription("The number of network interfaces (regardless of\ntheir current state) present on this system.") ifTable = MibTable((1, 3, 6, 1, 2, 1, 2, 2)) if mibBuilder.loadTexts: ifTable.setDescription("A list of interface entries. The number of\nentries is given by the value of ifNumber.") ifEntry = MibTableRow((1, 3, 6, 1, 2, 1, 2, 2, 1)).setIndexNames((0, "RFC1213-MIB", "ifIndex")) if mibBuilder.loadTexts: ifEntry.setDescription("An interface entry containing objects at the\nsubnetwork layer and below for a particular\ninterface.") ifIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifIndex.setDescription("A unique value for each interface. Its value\nranges between 1 and the value of ifNumber. The\nvalue for each interface must remain constant at\nleast from one re-initialization of the entity's\nnetwork management system to the next re-\ninitialization.") ifDescr = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 2), DisplayString().subtype(subtypeSpec=constraint.ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: ifDescr.setDescription("A textual string containing information about the\ninterface. This string should include the name of\nthe manufacturer, the product name and the version\nof the hardware interface.") ifType = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 3), Integer().subtype(subtypeSpec=constraint.SingleValueConstraint(22,32,24,5,30,23,4,28,12,26,31,7,1,17,16,8,14,20,6,21,19,15,13,11,25,9,18,3,27,2,10,29,)).subtype(namedValues=namedval.NamedValues(("other", 1), ("iso88026-man", 10), ("starLan", 11), ("proteon-10Mbit", 12), ("proteon-80Mbit", 13), ("hyperchannel", 14), ("fddi", 15), ("lapb", 16), ("sdlc", 17), ("ds1", 18), ("e1", 19), ("regular1822", 2), ("basicISDN", 20), ("primaryISDN", 21), ("propPointToPointSerial", 22), ("ppp", 23), ("softwareLoopback", 24), ("eon", 25), ("ethernet-3Mbit", 26), ("nsip", 27), ("slip", 28), ("ultra", 29), ("hdh1822", 3), ("ds3", 30), ("sip", 31), ("frame-relay", 32), ("ddn-x25", 4), ("rfc877-x25", 5), ("ethernet-csmacd", 6), ("iso88023-csmacd", 7), ("iso88024-tokenBus", 8), ("iso88025-tokenRing", 9), ))).setMaxAccess("readonly") if mibBuilder.loadTexts: ifType.setDescription("The type of interface, distinguished according to\nthe physical/link protocol(s) immediately `below'\nthe network layer in the protocol stack.") ifMtu = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifMtu.setDescription("The size of the largest datagram which can be\nsent/received on the interface, specified in\noctets. For interfaces that are used for\ntransmitting network datagrams, this is the size\nof the largest network datagram that can be sent\non the interface.") ifSpeed = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 5), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifSpeed.setDescription("An estimate of the interface's current bandwidth\nin bits per second. For interfaces which do not\nvary in bandwidth or for those where no accurate\nestimation can be made, this object should contain\nthe nominal bandwidth.") ifPhysAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 6), PhysAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifPhysAddress.setDescription("The interface's address at the protocol layer\nimmediately `below' the network layer in the\nprotocol stack. For interfaces which do not have\nsuch an address (e.g., a serial line), this object\nshould contain an octet string of zero length.") ifAdminStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 7), Integer().subtype(subtypeSpec=constraint.SingleValueConstraint(2,3,1,)).subtype(namedValues=namedval.NamedValues(("up", 1), ("down", 2), ("testing", 3), ))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ifAdminStatus.setDescription("The desired state of the interface. The\ntesting(3) state indicates that no operational\npackets can be passed.") ifOperStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 8), Integer().subtype(subtypeSpec=constraint.SingleValueConstraint(2,3,1,)).subtype(namedValues=namedval.NamedValues(("up", 1), ("down", 2), ("testing", 3), ))).setMaxAccess("readonly") if mibBuilder.loadTexts: ifOperStatus.setDescription("The current operational state of the interface.\nThe testing(3) state indicates that no operational\npackets can be passed.") ifLastChange = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 9), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifLastChange.setDescription("The value of sysUpTime at the time the interface\nentered its current operational state. If the\ncurrent state was entered prior to the last re-\ninitialization of the local network management\nsubsystem, then this object contains a zero\nvalue.") ifInOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifInOctets.setDescription("The total number of octets received on the\ninterface, including framing characters.") ifInUcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifInUcastPkts.setDescription("The number of subnetwork-unicast packets\ndelivered to a higher-layer protocol.") ifInNUcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifInNUcastPkts.setDescription("The number of non-unicast (i.e., subnetwork-\nbroadcast or subnetwork-multicast) packets\ndelivered to a higher-layer protocol.") ifInDiscards = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifInDiscards.setDescription("The number of inbound packets which were chosen\nto be discarded even though no errors had been\ndetected to prevent their being deliverable to a\nhigher-layer protocol. One possible reason for\ndiscarding such a packet could be to free up\nbuffer space.") ifInErrors = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifInErrors.setDescription("The number of inbound packets that contained\nerrors preventing them from being deliverable to a\nhigher-layer protocol.") ifInUnknownProtos = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifInUnknownProtos.setDescription("The number of packets received via the interface\nwhich were discarded because of an unknown or\nunsupported protocol.") ifOutOctets = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifOutOctets.setDescription("The total number of octets transmitted out of the\ninterface, including framing characters.") ifOutUcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifOutUcastPkts.setDescription("The total number of packets that higher-level\nprotocols requested be transmitted to a\nsubnetwork-unicast address, including those that\nwere discarded or not sent.") ifOutNUcastPkts = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifOutNUcastPkts.setDescription("The total number of packets that higher-level\nprotocols requested be transmitted to a non-\nunicast (i.e., a subnetwork-broadcast or\nsubnetwork-multicast) address, including those\nthat were discarded or not sent.") ifOutDiscards = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifOutDiscards.setDescription("The number of outbound packets which were chosen\nto be discarded even though no errors had been\ndetected to prevent their being transmitted. One\npossible reason for discarding such a packet could\nbe to free up buffer space.") ifOutErrors = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifOutErrors.setDescription("The number of outbound packets that could not be\ntransmitted because of errors.") ifOutQLen = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 21), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifOutQLen.setDescription("The length of the output packet queue (in\npackets).") ifSpecific = MibTableColumn((1, 3, 6, 1, 2, 1, 2, 2, 1, 22), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: ifSpecific.setDescription("A reference to MIB definitions specific to the\nparticular media being used to realize the\ninterface. For example, if the interface is\nrealized by an ethernet, then the value of this\nobject refers to a document defining objects\nspecific to ethernet. If this information is not\npresent, its value should be set to the OBJECT\nIDENTIFIER { 0 0 }, which is a syntatically valid\nobject identifier, and any conformant\nimplementation of ASN.1 and BER must be able to\ngenerate and recognize this value.") at = MibIdentifier((1, 3, 6, 1, 2, 1, 3)) atTable = MibTable((1, 3, 6, 1, 2, 1, 3, 1)) if mibBuilder.loadTexts: atTable.setDescription("The Address Translation tables contain the\nNetworkAddress to `physical' address equivalences.\nSome interfaces do not use translation tables for\ndetermining address equivalences (e.g., DDN-X.25\nhas an algorithmic method); if all interfaces are\nof this type, then the Address Translation table\nis empty, i.e., has zero entries.") atEntry = MibTableRow((1, 3, 6, 1, 2, 1, 3, 1, 1)).setIndexNames((0, "RFC1213-MIB", "atIfIndex"), (0, "RFC1213-MIB", "atNetAddressPlaceholder"), (0, "RFC1213-MIB", "atNetAddress")) if mibBuilder.loadTexts: atEntry.setDescription("Each entry contains one NetworkAddress to\n`physical' address equivalence.") atIfIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 3, 1, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: atIfIndex.setDescription("The interface on which this entry's equivalence\nis effective. The interface identified by a\nparticular value of this index is the same\ninterface as identified by the same value of\nifIndex.") atPhysAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 3, 1, 1, 2), PhysAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: atPhysAddress.setDescription("The media-dependent `physical' address.\n\nSetting this object to a null string (one of zero\nlength) has the effect of invaliding the\ncorresponding entry in the atTable object. That\nis, it effectively dissasociates the interface\nidentified with said entry from the mapping\nidentified with said entry. It is an\nimplementation-specific matter as to whether the\nagent removes an invalidated entry from the table.\nAccordingly, management stations must be prepared\nto receive tabular information from agents that\ncorresponds to entries not currently in use.\nProper interpretation of such entries requires\nexamination of the relevant atPhysAddress object.") atNetAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 3, 1, 1, 3), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: atNetAddress.setDescription("The NetworkAddress (e.g., the IP address)\ncorresponding to the media-dependent `physical'\naddress.") # Pre-index placeholder.Should be done by smidump but it is not for some reason # See RFC2576 2.1.1.10 for details atNetAddressPlaceholder = MibTableColumn((1, 3, 6, 1, 2, 1, 3, 1, 1, 9993), Integer(1)).setMaxAccess("not-accessible") ip = MibIdentifier((1, 3, 6, 1, 2, 1, 4)) ipForwarding = MibScalar((1, 3, 6, 1, 2, 1, 4, 1), Integer().subtype(subtypeSpec=constraint.SingleValueConstraint(1,2,)).subtype(namedValues=namedval.NamedValues(("forwarding", 1), ("not-forwarding", 2), ))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipForwarding.setDescription("The indication of whether this entity is acting\nas an IP gateway in respect to the forwarding of\ndatagrams received by, but not addressed to, this\nentity. IP gateways forward datagrams. IP hosts\ndo not (except those source-routed via the host).\n\nNote that for some managed nodes, this object may\ntake on only a subset of the values possible.\nAccordingly, it is appropriate for an agent to\nreturn a `badValue' response if a management\nstation attempts to change this object to an\ninappropriate value.") ipDefaultTTL = MibScalar((1, 3, 6, 1, 2, 1, 4, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipDefaultTTL.setDescription("The default value inserted into the Time-To-Live\nfield of the IP header of datagrams originated at\nthis entity, whenever a TTL value is not supplied\nby the transport layer protocol.") ipInReceives = MibScalar((1, 3, 6, 1, 2, 1, 4, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipInReceives.setDescription("The total number of input datagrams received from\ninterfaces, including those received in error.") ipInHdrErrors = MibScalar((1, 3, 6, 1, 2, 1, 4, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipInHdrErrors.setDescription("The number of input datagrams discarded due to\nerrors in their IP headers, including bad\nchecksums, version number mismatch, other format\nerrors, time-to-live exceeded, errors discovered\nin processing their IP options, etc.") ipInAddrErrors = MibScalar((1, 3, 6, 1, 2, 1, 4, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipInAddrErrors.setDescription("The number of input datagrams discarded because\nthe IP address in their IP header's destination\nfield was not a valid address to be received at\nthis entity. This count includes invalid\naddresses (e.g., 0.0.0.0) and addresses of\nunsupported Classes (e.g., Class E). For entities\nwhich are not IP Gateways and therefore do not\nforward datagrams, this counter includes datagrams\ndiscarded because the destination address was not\na local address.") ipForwDatagrams = MibScalar((1, 3, 6, 1, 2, 1, 4, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipForwDatagrams.setDescription("The number of input datagrams for which this\nentity was not their final IP destination, as a\nresult of which an attempt was made to find a\nroute to forward them to that final destination.\nIn entities which do not act as IP Gateways, this\ncounter will include only those packets which were\nSource-Routed via this entity, and the Source-\nRoute option processing was successful.") ipInUnknownProtos = MibScalar((1, 3, 6, 1, 2, 1, 4, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipInUnknownProtos.setDescription("The number of locally-addressed datagrams\nreceived successfully but discarded because of an\nunknown or unsupported protocol.") ipInDiscards = MibScalar((1, 3, 6, 1, 2, 1, 4, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipInDiscards.setDescription("The number of input IP datagrams for which no\nproblems were encountered to prevent their\ncontinued processing, but which were discarded\n(e.g., for lack of buffer space). Note that this\ncounter does not include any datagrams discarded\nwhile awaiting re-assembly.") ipInDelivers = MibScalar((1, 3, 6, 1, 2, 1, 4, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipInDelivers.setDescription("The total number of input datagrams successfully\ndelivered to IP user-protocols (including ICMP).") ipOutRequests = MibScalar((1, 3, 6, 1, 2, 1, 4, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipOutRequests.setDescription("The total number of IP datagrams which local IP\nuser-protocols (including ICMP) supplied to IP in\nrequests for transmission. Note that this counter\ndoes not include any datagrams counted in\nipForwDatagrams.") ipOutDiscards = MibScalar((1, 3, 6, 1, 2, 1, 4, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipOutDiscards.setDescription("The number of output IP datagrams for which no\nproblem was encountered to prevent their\ntransmission to their destination, but which were\ndiscarded (e.g., for lack of buffer space). Note\nthat this counter would include datagrams counted\nin ipForwDatagrams if any such packets met this\n(discretionary) discard criterion.") ipOutNoRoutes = MibScalar((1, 3, 6, 1, 2, 1, 4, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipOutNoRoutes.setDescription("The number of IP datagrams discarded because no\nroute could be found to transmit them to their\ndestination. Note that this counter includes any\npackets counted in ipForwDatagrams which meet this\n`no-route' criterion. Note that this includes any\ndatagarms which a host cannot route because all of\nits default gateways are down.") ipReasmTimeout = MibScalar((1, 3, 6, 1, 2, 1, 4, 13), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipReasmTimeout.setDescription("The maximum number of seconds which received\nfragments are held while they are awaiting\nreassembly at this entity.") ipReasmReqds = MibScalar((1, 3, 6, 1, 2, 1, 4, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipReasmReqds.setDescription("The number of IP fragments received which needed\nto be reassembled at this entity.") ipReasmOKs = MibScalar((1, 3, 6, 1, 2, 1, 4, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipReasmOKs.setDescription("The number of IP datagrams successfully re-\nassembled.") ipReasmFails = MibScalar((1, 3, 6, 1, 2, 1, 4, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipReasmFails.setDescription("The number of failures detected by the IP re-\nassembly algorithm (for whatever reason: timed\nout, errors, etc). Note that this is not\nnecessarily a count of discarded IP fragments\nsince some algorithms (notably the algorithm in\nRFC 815) can lose track of the number of fragments\nby combining them as they are received.") ipFragOKs = MibScalar((1, 3, 6, 1, 2, 1, 4, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipFragOKs.setDescription("The number of IP datagrams that have been\nsuccessfully fragmented at this entity.") ipFragFails = MibScalar((1, 3, 6, 1, 2, 1, 4, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipFragFails.setDescription("The number of IP datagrams that have been\ndiscarded because they needed to be fragmented at\nthis entity but could not be, e.g., because their\nDon't Fragment flag was set.") ipFragCreates = MibScalar((1, 3, 6, 1, 2, 1, 4, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipFragCreates.setDescription("The number of IP datagram fragments that have\nbeen generated as a result of fragmentation at\nthis entity.") ipAddrTable = MibTable((1, 3, 6, 1, 2, 1, 4, 20)) if mibBuilder.loadTexts: ipAddrTable.setDescription("The table of addressing information relevant to\nthis entity's IP addresses.") ipAddrEntry = MibTableRow((1, 3, 6, 1, 2, 1, 4, 20, 1)).setIndexNames((0, "RFC1213-MIB", "ipAdEntAddr")) if mibBuilder.loadTexts: ipAddrEntry.setDescription("The addressing information for one of this\nentity's IP addresses.") ipAdEntAddr = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 20, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipAdEntAddr.setDescription("The IP address to which this entry's addressing\ninformation pertains.") ipAdEntIfIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 20, 1, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipAdEntIfIndex.setDescription("The index value which uniquely identifies the\ninterface to which this entry is applicable. The\ninterface identified by a particular value of this\nindex is the same interface as identified by the\nsame value of ifIndex.") ipAdEntNetMask = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 20, 1, 3), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipAdEntNetMask.setDescription("The subnet mask associated with the IP address of\nthis entry. The value of the mask is an IP\naddress with all the network bits set to 1 and all\nthe hosts bits set to 0.") ipAdEntBcastAddr = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 20, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipAdEntBcastAddr.setDescription("The value of the least-significant bit in the IP\nbroadcast address used for sending datagrams on\nthe (logical) interface associated with the IP\naddress of this entry. For example, when the\nInternet standard all-ones broadcast address is\nused, the value will be 1. This value applies to\nboth the subnet and network broadcasts addresses\nused by the entity on this (logical) interface.") ipAdEntReasmMaxSize = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 20, 1, 5), Integer32().subtype(subtypeSpec=constraint.ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipAdEntReasmMaxSize.setDescription("The size of the largest IP datagram which this\nentity can re-assemble from incoming IP fragmented\ndatagrams received on this interface.") ipRouteTable = MibTable((1, 3, 6, 1, 2, 1, 4, 21)) if mibBuilder.loadTexts: ipRouteTable.setDescription("This entity's IP Routing table.") ipRouteEntry = MibTableRow((1, 3, 6, 1, 2, 1, 4, 21, 1)).setIndexNames((0, "RFC1213-MIB", "ipRouteDest")) if mibBuilder.loadTexts: ipRouteEntry.setDescription("A route to a particular destination.") ipRouteDest = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 21, 1, 1), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipRouteDest.setDescription("The destination IP address of this route. An\nentry with a value of 0.0.0.0 is considered a\ndefault route. Multiple routes to a single\ndestination can appear in the table, but access to\nsuch multiple entries is dependent on the table-\naccess mechanisms defined by the network\nmanagement protocol in use.") ipRouteIfIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 21, 1, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipRouteIfIndex.setDescription("The index value which uniquely identifies the\nlocal interface through which the next hop of this\nroute should be reached. The interface identified\nby a particular value of this index is the same\ninterface as identified by the same value of\nifIndex.") ipRouteMetric1 = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 21, 1, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipRouteMetric1.setDescription("The primary routing metric for this route. The\nsemantics of this metric are determined by the\nrouting-protocol specified in the route's\nipRouteProto value. If this metric is not used,\nits value should be set to -1.") ipRouteMetric2 = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 21, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipRouteMetric2.setDescription("An alternate routing metric for this route. The\nsemantics of this metric are determined by the\nrouting-protocol specified in the route's\nipRouteProto value. If this metric is not used,\nits value should be set to -1.") ipRouteMetric3 = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 21, 1, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipRouteMetric3.setDescription("An alternate routing metric for this route. The\nsemantics of this metric are determined by the\nrouting-protocol specified in the route's\nipRouteProto value. If this metric is not used,\nits value should be set to -1.") ipRouteMetric4 = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 21, 1, 6), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipRouteMetric4.setDescription("An alternate routing metric for this route. The\nsemantics of this metric are determined by the\nrouting-protocol specified in the route's\nipRouteProto value. If this metric is not used,\nits value should be set to -1.") ipRouteNextHop = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 21, 1, 7), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipRouteNextHop.setDescription("The IP address of the next hop of this route.\n(In the case of a route bound to an interface\nwhich is realized via a broadcast media, the value\nof this field is the agent's IP address on that\ninterface.)") ipRouteType = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 21, 1, 8), Integer().subtype(subtypeSpec=constraint.SingleValueConstraint(4,1,3,2,)).subtype(namedValues=namedval.NamedValues(("other", 1), ("invalid", 2), ("direct", 3), ("indirect", 4), ))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipRouteType.setDescription("The type of route. Note that the values\ndirect(3) and indirect(4) refer to the notion of\ndirect and indirect routing in the IP\narchitecture.\n\nSetting this object to the value invalid(2) has\nthe effect of invalidating the corresponding entry\nin the ipRouteTable object. That is, it\neffectively dissasociates the destination\nidentified with said entry from the route\nidentified with said entry. It is an\nimplementation-specific matter as to whether the\nagent removes an invalidated entry from the table.\nAccordingly, management stations must be prepared\nto receive tabular information from agents that\ncorresponds to entries not currently in use.\nProper interpretation of such entries requires\nexamination of the relevant ipRouteType object.") ipRouteProto = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 21, 1, 9), Integer().subtype(subtypeSpec=constraint.SingleValueConstraint(14,12,3,13,5,8,10,11,1,9,4,2,7,6,)).subtype(namedValues=namedval.NamedValues(("other", 1), ("es-is", 10), ("ciscoIgrp", 11), ("bbnSpfIgp", 12), ("ospf", 13), ("bgp", 14), ("local", 2), ("netmgmt", 3), ("icmp", 4), ("egp", 5), ("ggp", 6), ("hello", 7), ("rip", 8), ("is-is", 9), ))).setMaxAccess("readonly") if mibBuilder.loadTexts: ipRouteProto.setDescription("The routing mechanism via which this route was\nlearned. Inclusion of values for gateway routing\nprotocols is not intended to imply that hosts\nshould support those protocols.") ipRouteAge = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 21, 1, 10), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipRouteAge.setDescription("The number of seconds since this route was last\nupdated or otherwise determined to be correct.\nNote that no semantics of `too old' can be implied\nexcept through knowledge of the routing protocol\nby which the route was learned.") ipRouteMask = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 21, 1, 11), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipRouteMask.setDescription("Indicate the mask to be logical-ANDed with the\ndestination address before being compared to the\nvalue in the ipRouteDest field. For those systems\nthat do not support arbitrary subnet masks, an\nagent constructs the value of the ipRouteMask by\ndetermining whether the value of the correspondent\nipRouteDest field belong to a class-A, B, or C\nnetwork, and then using one of:\n\n mask network\n 255.0.0.0 class-A\n 255.255.0.0 class-B\n 255.255.255.0 class-C\nIf the value of the ipRouteDest is 0.0.0.0 (a\ndefault route), then the mask value is also\n0.0.0.0. It should be noted that all IP routing\nsubsystems implicitly use this mechanism.") ipRouteMetric5 = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 21, 1, 12), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipRouteMetric5.setDescription("An alternate routing metric for this route. The\nsemantics of this metric are determined by the\nrouting-protocol specified in the route's\nipRouteProto value. If this metric is not used,\nits value should be set to -1.") ipRouteInfo = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 21, 1, 13), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipRouteInfo.setDescription("A reference to MIB definitions specific to the\nparticular routing protocol which is responsible\nfor this route, as determined by the value\nspecified in the route's ipRouteProto value. If\nthis information is not present, its value should\nbe set to the OBJECT IDENTIFIER { 0 0 }, which is\na syntatically valid object identifier, and any\nconformant implementation of ASN.1 and BER must be\nable to generate and recognize this value.") ipNetToMediaTable = MibTable((1, 3, 6, 1, 2, 1, 4, 22)) if mibBuilder.loadTexts: ipNetToMediaTable.setDescription("The IP Address Translation table used for mapping\nfrom IP addresses to physical addresses.") ipNetToMediaEntry = MibTableRow((1, 3, 6, 1, 2, 1, 4, 22, 1)).setIndexNames((0, "RFC1213-MIB", "ipNetToMediaIfIndex"), (0, "RFC1213-MIB", "ipNetToMediaNetAddress")) if mibBuilder.loadTexts: ipNetToMediaEntry.setDescription("Each entry contains one IpAddress to `physical'\naddress equivalence.") ipNetToMediaIfIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 22, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipNetToMediaIfIndex.setDescription("The interface on which this entry's equivalence\nis effective. The interface identified by a\nparticular value of this index is the same\ninterface as identified by the same value of\nifIndex.") ipNetToMediaPhysAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 22, 1, 2), PhysAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipNetToMediaPhysAddress.setDescription("The media-dependent `physical' address.") ipNetToMediaNetAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 22, 1, 3), IpAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipNetToMediaNetAddress.setDescription("The IpAddress corresponding to the media-\ndependent `physical' address.") ipNetToMediaType = MibTableColumn((1, 3, 6, 1, 2, 1, 4, 22, 1, 4), Integer().subtype(subtypeSpec=constraint.SingleValueConstraint(4,1,3,2,)).subtype(namedValues=namedval.NamedValues(("other", 1), ("invalid", 2), ("dynamic", 3), ("static", 4), ))).setMaxAccess("readwrite") if mibBuilder.loadTexts: ipNetToMediaType.setDescription("The type of mapping.\n\nSetting this object to the value invalid(2) has\nthe effect of invalidating the corresponding entry\nin the ipNetToMediaTable. That is, it effectively\ndissasociates the interface identified with said\nentry from the mapping identified with said entry.\nIt is an implementation-specific matter as to\nwhether the agent removes an invalidated entry\nfrom the table. Accordingly, management stations\nmust be prepared to receive tabular information\nfrom agents that corresponds to entries not\ncurrently in use. Proper interpretation of such\nentries requires examination of the relevant\nipNetToMediaType object.") ipRoutingDiscards = MibScalar((1, 3, 6, 1, 2, 1, 4, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: ipRoutingDiscards.setDescription("The number of routing entries which were chosen\nto be discarded even though they are valid. One\npossible reason for discarding such an entry could\nbe to free-up buffer space for other routing\nentries.") icmp = MibIdentifier((1, 3, 6, 1, 2, 1, 5)) icmpInMsgs = MibScalar((1, 3, 6, 1, 2, 1, 5, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInMsgs.setDescription("The total number of ICMP messages which the\nentity received. Note that this counter includes\nall those counted by icmpInErrors.") icmpInErrors = MibScalar((1, 3, 6, 1, 2, 1, 5, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInErrors.setDescription("The number of ICMP messages which the entity\nreceived but determined as having ICMP-specific\nerrors (bad ICMP checksums, bad length, etc.).") icmpInDestUnreachs = MibScalar((1, 3, 6, 1, 2, 1, 5, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInDestUnreachs.setDescription("The number of ICMP Destination Unreachable\nmessages received.") icmpInTimeExcds = MibScalar((1, 3, 6, 1, 2, 1, 5, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInTimeExcds.setDescription("The number of ICMP Time Exceeded messages\nreceived.") icmpInParmProbs = MibScalar((1, 3, 6, 1, 2, 1, 5, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInParmProbs.setDescription("The number of ICMP Parameter Problem messages\nreceived.") icmpInSrcQuenchs = MibScalar((1, 3, 6, 1, 2, 1, 5, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInSrcQuenchs.setDescription("The number of ICMP Source Quench messages\nreceived.") icmpInRedirects = MibScalar((1, 3, 6, 1, 2, 1, 5, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInRedirects.setDescription("The number of ICMP Redirect messages received.") icmpInEchos = MibScalar((1, 3, 6, 1, 2, 1, 5, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInEchos.setDescription("The number of ICMP Echo (request) messages\nreceived.") icmpInEchoReps = MibScalar((1, 3, 6, 1, 2, 1, 5, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInEchoReps.setDescription("The number of ICMP Echo Reply messages received.") icmpInTimestamps = MibScalar((1, 3, 6, 1, 2, 1, 5, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInTimestamps.setDescription("The number of ICMP Timestamp (request) messages\nreceived.") icmpInTimestampReps = MibScalar((1, 3, 6, 1, 2, 1, 5, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInTimestampReps.setDescription("The number of ICMP Timestamp Reply messages\nreceived.") icmpInAddrMasks = MibScalar((1, 3, 6, 1, 2, 1, 5, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInAddrMasks.setDescription("The number of ICMP Address Mask Request messages\nreceived.") icmpInAddrMaskReps = MibScalar((1, 3, 6, 1, 2, 1, 5, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpInAddrMaskReps.setDescription("The number of ICMP Address Mask Reply messages\nreceived.") icmpOutMsgs = MibScalar((1, 3, 6, 1, 2, 1, 5, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutMsgs.setDescription("The total number of ICMP messages which this\nentity attempted to send. Note that this counter\nincludes all those counted by icmpOutErrors.") icmpOutErrors = MibScalar((1, 3, 6, 1, 2, 1, 5, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutErrors.setDescription("The number of ICMP messages which this entity did\nnot send due to problems discovered within ICMP\nsuch as a lack of buffers. This value should not\ninclude errors discovered outside the ICMP layer\nsuch as the inability of IP to route the resultant\ndatagram. In some implementations there may be no\ntypes of error which contribute to this counter's\nvalue.") icmpOutDestUnreachs = MibScalar((1, 3, 6, 1, 2, 1, 5, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutDestUnreachs.setDescription("The number of ICMP Destination Unreachable\nmessages sent.") icmpOutTimeExcds = MibScalar((1, 3, 6, 1, 2, 1, 5, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutTimeExcds.setDescription("The number of ICMP Time Exceeded messages sent.") icmpOutParmProbs = MibScalar((1, 3, 6, 1, 2, 1, 5, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutParmProbs.setDescription("The number of ICMP Parameter Problem messages\nsent.") icmpOutSrcQuenchs = MibScalar((1, 3, 6, 1, 2, 1, 5, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutSrcQuenchs.setDescription("The number of ICMP Source Quench messages sent.") icmpOutRedirects = MibScalar((1, 3, 6, 1, 2, 1, 5, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutRedirects.setDescription("The number of ICMP Redirect messages sent. For a\nhost, this object will always be zero, since hosts\ndo not send redirects.") icmpOutEchos = MibScalar((1, 3, 6, 1, 2, 1, 5, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutEchos.setDescription("The number of ICMP Echo (request) messages sent.") icmpOutEchoReps = MibScalar((1, 3, 6, 1, 2, 1, 5, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutEchoReps.setDescription("The number of ICMP Echo Reply messages sent.") icmpOutTimestamps = MibScalar((1, 3, 6, 1, 2, 1, 5, 23), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutTimestamps.setDescription("The number of ICMP Timestamp (request) messages\nsent.") icmpOutTimestampReps = MibScalar((1, 3, 6, 1, 2, 1, 5, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutTimestampReps.setDescription("The number of ICMP Timestamp Reply messages\nsent.") icmpOutAddrMasks = MibScalar((1, 3, 6, 1, 2, 1, 5, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutAddrMasks.setDescription("The number of ICMP Address Mask Request messages\nsent.") icmpOutAddrMaskReps = MibScalar((1, 3, 6, 1, 2, 1, 5, 26), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: icmpOutAddrMaskReps.setDescription("The number of ICMP Address Mask Reply messages\nsent.") tcp = MibIdentifier((1, 3, 6, 1, 2, 1, 6)) tcpRtoAlgorithm = MibScalar((1, 3, 6, 1, 2, 1, 6, 1), Integer().subtype(subtypeSpec=constraint.SingleValueConstraint(4,1,2,3,)).subtype(namedValues=namedval.NamedValues(("other", 1), ("constant", 2), ("rsre", 3), ("vanj", 4), ))).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpRtoAlgorithm.setDescription("The algorithm used to determine the timeout value\nused for retransmitting unacknowledged octets.") tcpRtoMin = MibScalar((1, 3, 6, 1, 2, 1, 6, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpRtoMin.setDescription("The minimum value permitted by a TCP\nimplementation for the retransmission timeout,\nmeasured in milliseconds. More refined semantics\nfor objects of this type depend upon the algorithm\nused to determine the retransmission timeout. In\nparticular, when the timeout algorithm is rsre(3),\nan object of this type has the semantics of the\nLBOUND quantity described in RFC 793.") tcpRtoMax = MibScalar((1, 3, 6, 1, 2, 1, 6, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpRtoMax.setDescription("The maximum value permitted by a TCP\nimplementation for the retransmission timeout,\nmeasured in milliseconds. More refined semantics\nfor objects of this type depend upon the algorithm\nused to determine the retransmission timeout. In\nparticular, when the timeout algorithm is rsre(3),\nan object of this type has the semantics of the\nUBOUND quantity described in RFC 793.") tcpMaxConn = MibScalar((1, 3, 6, 1, 2, 1, 6, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpMaxConn.setDescription("The limit on the total number of TCP connections\nthe entity can support. In entities where the\nmaximum number of connections is dynamic, this\nobject should contain the value -1.") tcpActiveOpens = MibScalar((1, 3, 6, 1, 2, 1, 6, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpActiveOpens.setDescription("The number of times TCP connections have made a\ndirect transition to the SYN-SENT state from the\nCLOSED state.") tcpPassiveOpens = MibScalar((1, 3, 6, 1, 2, 1, 6, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpPassiveOpens.setDescription("The number of times TCP connections have made a\ndirect transition to the SYN-RCVD state from the\nLISTEN state.") tcpAttemptFails = MibScalar((1, 3, 6, 1, 2, 1, 6, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpAttemptFails.setDescription("The number of times TCP connections have made a\ndirect transition to the CLOSED state from either\nthe SYN-SENT state or the SYN-RCVD state, plus the\nnumber of times TCP connections have made a direct\ntransition to the LISTEN state from the SYN-RCVD\nstate.") tcpEstabResets = MibScalar((1, 3, 6, 1, 2, 1, 6, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEstabResets.setDescription("The number of times TCP connections have made a\ndirect transition to the CLOSED state from either\nthe ESTABLISHED state or the CLOSE-WAIT state.") tcpCurrEstab = MibScalar((1, 3, 6, 1, 2, 1, 6, 9), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpCurrEstab.setDescription("The number of TCP connections for which the\ncurrent state is either ESTABLISHED or CLOSE-\nWAIT.") tcpInSegs = MibScalar((1, 3, 6, 1, 2, 1, 6, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpInSegs.setDescription("The total number of segments received, including\nthose received in error. This count includes\nsegments received on currently established\nconnections.") tcpOutSegs = MibScalar((1, 3, 6, 1, 2, 1, 6, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpOutSegs.setDescription("The total number of segments sent, including\nthose on current connections but excluding those\ncontaining only retransmitted octets.") tcpRetransSegs = MibScalar((1, 3, 6, 1, 2, 1, 6, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpRetransSegs.setDescription("The total number of segments retransmitted - that\nis, the number of TCP segments transmitted\ncontaining one or more previously transmitted\noctets.") tcpConnTable = MibTable((1, 3, 6, 1, 2, 1, 6, 13)) if mibBuilder.loadTexts: tcpConnTable.setDescription("A table containing TCP connection-specific\ninformation.") tcpConnEntry = MibTableRow((1, 3, 6, 1, 2, 1, 6, 13, 1)).setIndexNames((0, "RFC1213-MIB", "tcpConnLocalAddress"), (0, "RFC1213-MIB", "tcpConnLocalPort"), (0, "RFC1213-MIB", "tcpConnRemAddress"), (0, "RFC1213-MIB", "tcpConnRemPort")) if mibBuilder.loadTexts: tcpConnEntry.setDescription("Information about a particular current TCP\nconnection. An object of this type is transient,\nin that it ceases to exist when (or soon after)\nthe connection makes the transition to the CLOSED\nstate.") tcpConnState = MibTableColumn((1, 3, 6, 1, 2, 1, 6, 13, 1, 1), Integer().subtype(subtypeSpec=constraint.SingleValueConstraint(4,5,7,11,9,8,12,6,1,10,2,3,)).subtype(namedValues=namedval.NamedValues(("closed", 1), ("closing", 10), ("timeWait", 11), ("deleteTCB", 12), ("listen", 2), ("synSent", 3), ("synReceived", 4), ("established", 5), ("finWait1", 6), ("finWait2", 7), ("closeWait", 8), ("lastAck", 9), ))).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpConnState.setDescription("The state of this TCP connection.\n\nThe only value which may be set by a management\nstation is deleteTCB(12). Accordingly, it is\nappropriate for an agent to return a `badValue'\nresponse if a management station attempts to set\nthis object to any other value.\n\nIf a management station sets this object to the\nvalue deleteTCB(12), then this has the effect of\ndeleting the TCB (as defined in RFC 793) of the\ncorresponding connection on the managed node,\nresulting in immediate termination of the\nconnection.\n\nAs an implementation-specific option, a RST\nsegment may be sent from the managed node to the\nother TCP endpoint (note however that RST segments\nare not sent reliably).") tcpConnLocalAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 6, 13, 1, 2), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpConnLocalAddress.setDescription("The local IP address for this TCP connection. In\nthe case of a connection in the listen state which\nis willing to accept connections for any IP\ninterface associated with the node, the value\n0.0.0.0 is used.") tcpConnLocalPort = MibTableColumn((1, 3, 6, 1, 2, 1, 6, 13, 1, 3), Integer32().subtype(subtypeSpec=constraint.ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpConnLocalPort.setDescription("The local port number for this TCP connection.") tcpConnRemAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 6, 13, 1, 4), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpConnRemAddress.setDescription("The remote IP address for this TCP connection.") tcpConnRemPort = MibTableColumn((1, 3, 6, 1, 2, 1, 6, 13, 1, 5), Integer32().subtype(subtypeSpec=constraint.ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpConnRemPort.setDescription("The remote port number for this TCP connection.") tcpInErrs = MibScalar((1, 3, 6, 1, 2, 1, 6, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpInErrs.setDescription("The total number of segments received in error\n(e.g., bad TCP checksums).") tcpOutRsts = MibScalar((1, 3, 6, 1, 2, 1, 6, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpOutRsts.setDescription("The number of TCP segments sent containing the\nRST flag.") udp = MibIdentifier((1, 3, 6, 1, 2, 1, 7)) udpInDatagrams = MibScalar((1, 3, 6, 1, 2, 1, 7, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: udpInDatagrams.setDescription("The total number of UDP datagrams delivered to\nUDP users.") udpNoPorts = MibScalar((1, 3, 6, 1, 2, 1, 7, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: udpNoPorts.setDescription("The total number of received UDP datagrams for\nwhich there was no application at the destination\nport.") udpInErrors = MibScalar((1, 3, 6, 1, 2, 1, 7, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: udpInErrors.setDescription("The number of received UDP datagrams that could\nnot be delivered for reasons other than the lack\nof an application at the destination port.") udpOutDatagrams = MibScalar((1, 3, 6, 1, 2, 1, 7, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: udpOutDatagrams.setDescription("The total number of UDP datagrams sent from this\nentity.") udpTable = MibTable((1, 3, 6, 1, 2, 1, 7, 5)) if mibBuilder.loadTexts: udpTable.setDescription("A table containing UDP listener information.") udpEntry = MibTableRow((1, 3, 6, 1, 2, 1, 7, 5, 1)).setIndexNames((0, "RFC1213-MIB", "udpLocalAddress"), (0, "RFC1213-MIB", "udpLocalPort")) if mibBuilder.loadTexts: udpEntry.setDescription("Information about a particular current UDP\nlistener.") udpLocalAddress = MibTableColumn((1, 3, 6, 1, 2, 1, 7, 5, 1, 1), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: udpLocalAddress.setDescription("The local IP address for this UDP listener. In\nthe case of a UDP listener which is willing to\naccept datagrams for any IP interface associated\nwith the node, the value 0.0.0.0 is used.") udpLocalPort = MibTableColumn((1, 3, 6, 1, 2, 1, 7, 5, 1, 2), Integer32().subtype(subtypeSpec=constraint.ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: udpLocalPort.setDescription("The local port number for this UDP listener.") egp = MibIdentifier((1, 3, 6, 1, 2, 1, 8)) egpInMsgs = MibScalar((1, 3, 6, 1, 2, 1, 8, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: egpInMsgs.setDescription("The number of EGP messages received without\nerror.") egpInErrors = MibScalar((1, 3, 6, 1, 2, 1, 8, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: egpInErrors.setDescription("The number of EGP messages received that proved\nto be in error.") egpOutMsgs = MibScalar((1, 3, 6, 1, 2, 1, 8, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: egpOutMsgs.setDescription("The total number of locally generated EGP\nmessages.") egpOutErrors = MibScalar((1, 3, 6, 1, 2, 1, 8, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: egpOutErrors.setDescription("The number of locally generated EGP messages not\nsent due to resource limitations within an EGP\nentity.") egpNeighTable = MibTable((1, 3, 6, 1, 2, 1, 8, 5)) if mibBuilder.loadTexts: egpNeighTable.setDescription("The EGP neighbor table.") egpNeighEntry = MibTableRow((1, 3, 6, 1, 2, 1, 8, 5, 1)).setIndexNames((0, "RFC1213-MIB", "egpNeighAddr")) if mibBuilder.loadTexts: egpNeighEntry.setDescription("Information about this entity's relationship with\na particular EGP neighbor.") egpNeighState = MibTableColumn((1, 3, 6, 1, 2, 1, 8, 5, 1, 1), Integer().subtype(subtypeSpec=constraint.SingleValueConstraint(4,3,1,5,2,)).subtype(namedValues=namedval.NamedValues(("idle", 1), ("acquisition", 2), ("down", 3), ("up", 4), ("cease", 5), ))).setMaxAccess("readonly") if mibBuilder.loadTexts: egpNeighState.setDescription("The EGP state of the local system with respect to\nthis entry's EGP neighbor. Each EGP state is\nrepresented by a value that is one greater than\nthe numerical value associated with said state in\nRFC 904.") egpNeighAddr = MibTableColumn((1, 3, 6, 1, 2, 1, 8, 5, 1, 2), IpAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: egpNeighAddr.setDescription("The IP address of this entry's EGP neighbor.") egpNeighAs = MibTableColumn((1, 3, 6, 1, 2, 1, 8, 5, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: egpNeighAs.setDescription("The autonomous system of this EGP peer. Zero\nshould be specified if the autonomous system\nnumber of the neighbor is not yet known.") egpNeighInMsgs = MibTableColumn((1, 3, 6, 1, 2, 1, 8, 5, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: egpNeighInMsgs.setDescription("The number of EGP messages received without error\nfrom this EGP peer.") egpNeighInErrs = MibTableColumn((1, 3, 6, 1, 2, 1, 8, 5, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: egpNeighInErrs.setDescription("The number of EGP messages received from this EGP\npeer that proved to be in error (e.g., bad EGP\nchecksum).") egpNeighOutMsgs = MibTableColumn((1, 3, 6, 1, 2, 1, 8, 5, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: egpNeighOutMsgs.setDescription("The number of locally generated EGP messages to\nthis EGP peer.") egpNeighOutErrs = MibTableColumn((1, 3, 6, 1, 2, 1, 8, 5, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: egpNeighOutErrs.setDescription("The number of locally generated EGP messages not\nsent to this EGP peer due to resource limitations\nwithin an EGP entity.") egpNeighInErrMsgs = MibTableColumn((1, 3, 6, 1, 2, 1, 8, 5, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: egpNeighInErrMsgs.setDescription("The number of EGP-defined error messages received\nfrom this EGP peer.") egpNeighOutErrMsgs = MibTableColumn((1, 3, 6, 1, 2, 1, 8, 5, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: egpNeighOutErrMsgs.setDescription("The number of EGP-defined error messages sent to\nthis EGP peer.") egpNeighStateUps = MibTableColumn((1, 3, 6, 1, 2, 1, 8, 5, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: egpNeighStateUps.setDescription("The number of EGP state transitions to the UP\nstate with this EGP peer.") egpNeighStateDowns = MibTableColumn((1, 3, 6, 1, 2, 1, 8, 5, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: egpNeighStateDowns.setDescription("The number of EGP state transitions from the UP\nstate to any other state with this EGP peer.") egpNeighIntervalHello = MibTableColumn((1, 3, 6, 1, 2, 1, 8, 5, 1, 12), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: egpNeighIntervalHello.setDescription("The interval between EGP Hello command\nretransmissions (in hundredths of a second). This\nrepresents the t1 timer as defined in RFC 904.") egpNeighIntervalPoll = MibTableColumn((1, 3, 6, 1, 2, 1, 8, 5, 1, 13), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: egpNeighIntervalPoll.setDescription("The interval between EGP poll command\nretransmissions (in hundredths of a second). This\nrepresents the t3 timer as defined in RFC 904.") egpNeighMode = MibTableColumn((1, 3, 6, 1, 2, 1, 8, 5, 1, 14), Integer().subtype(subtypeSpec=constraint.SingleValueConstraint(1,2,)).subtype(namedValues=namedval.NamedValues(("active", 1), ("passive", 2), ))).setMaxAccess("readonly") if mibBuilder.loadTexts: egpNeighMode.setDescription("The polling mode of this EGP entity, either\npassive or active.") egpNeighEventTrigger = MibTableColumn((1, 3, 6, 1, 2, 1, 8, 5, 1, 15), Integer().subtype(subtypeSpec=constraint.SingleValueConstraint(1,2,)).subtype(namedValues=namedval.NamedValues(("start", 1), ("stop", 2), ))).setMaxAccess("readwrite") if mibBuilder.loadTexts: egpNeighEventTrigger.setDescription("A control variable used to trigger operator-\ninitiated Start and Stop events. When read, this\nvariable always returns the most recent value that\negpNeighEventTrigger was set to. If it has not\nbeen set since the last initialization of the\nnetwork management subsystem on the node, it\nreturns a value of `stop'.\n\nWhen set, this variable causes a Start or Stop\nevent on the specified neighbor, as specified on\npages 8-10 of RFC 904. Briefly, a Start event\ncauses an Idle peer to begin neighbor acquisition\nand a non-Idle peer to reinitiate neighbor\nacquisition. A stop event causes a non-Idle peer\nto return to the Idle state until a Start event\noccurs, either via egpNeighEventTrigger or\notherwise.") egpAs = MibScalar((1, 3, 6, 1, 2, 1, 8, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: egpAs.setDescription("The autonomous system number of this EGP entity.") transmission = MibIdentifier((1, 3, 6, 1, 2, 1, 10)) snmp = MibIdentifier((1, 3, 6, 1, 2, 1, 11)) snmpInPkts = MibScalar((1, 3, 6, 1, 2, 1, 11, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInPkts.setDescription("The total number of Messages delivered to the\nSNMP entity from the transport service.") snmpOutPkts = MibScalar((1, 3, 6, 1, 2, 1, 11, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutPkts.setDescription("The total number of SNMP Messages which were\npassed from the SNMP protocol entity to the\ntransport service.") snmpInBadVersions = MibScalar((1, 3, 6, 1, 2, 1, 11, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInBadVersions.setDescription("The total number of SNMP Messages which were\ndelivered to the SNMP protocol entity and were for\nan unsupported SNMP version.") snmpInBadCommunityNames = MibScalar((1, 3, 6, 1, 2, 1, 11, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInBadCommunityNames.setDescription("The total number of SNMP Messages delivered to\nthe SNMP protocol entity which used a SNMP\ncommunity name not known to said entity.") snmpInBadCommunityUses = MibScalar((1, 3, 6, 1, 2, 1, 11, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInBadCommunityUses.setDescription("The total number of SNMP Messages delivered to\nthe SNMP protocol entity which represented an SNMP\noperation which was not allowed by the SNMP\ncommunity named in the Message.") snmpInASNParseErrs = MibScalar((1, 3, 6, 1, 2, 1, 11, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInASNParseErrs.setDescription("The total number of ASN.1 or BER errors\nencountered by the SNMP protocol entity when\ndecoding received SNMP Messages.") snmpInTooBigs = MibScalar((1, 3, 6, 1, 2, 1, 11, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInTooBigs.setDescription("The total number of SNMP PDUs which were\ndelivered to the SNMP protocol entity and for\nwhich the value of the error-status field is\n`tooBig'.") snmpInNoSuchNames = MibScalar((1, 3, 6, 1, 2, 1, 11, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInNoSuchNames.setDescription("The total number of SNMP PDUs which were\ndelivered to the SNMP protocol entity and for\nwhich the value of the error-status field is\n`noSuchName'.") snmpInBadValues = MibScalar((1, 3, 6, 1, 2, 1, 11, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInBadValues.setDescription("The total number of SNMP PDUs which were\ndelivered to the SNMP protocol entity and for\nwhich the value of the error-status field is\n`badValue'.") snmpInReadOnlys = MibScalar((1, 3, 6, 1, 2, 1, 11, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInReadOnlys.setDescription("The total number valid SNMP PDUs which were\ndelivered to the SNMP protocol entity and for\nwhich the value of the error-status field is\n`readOnly'. It should be noted that it is a\nprotocol error to generate an SNMP PDU which\ncontains the value `readOnly' in the error-status\nfield, as such this object is provided as a means\nof detecting incorrect implementations of the\nSNMP.") snmpInGenErrs = MibScalar((1, 3, 6, 1, 2, 1, 11, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInGenErrs.setDescription("The total number of SNMP PDUs which were\ndelivered to the SNMP protocol entity and for\nwhich the value of the error-status field is\n`genErr'.") snmpInTotalReqVars = MibScalar((1, 3, 6, 1, 2, 1, 11, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInTotalReqVars.setDescription("The total number of MIB objects which have been\nretrieved successfully by the SNMP protocol entity\nas the result of receiving valid SNMP Get-Request\nand Get-Next PDUs.") snmpInTotalSetVars = MibScalar((1, 3, 6, 1, 2, 1, 11, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInTotalSetVars.setDescription("The total number of MIB objects which have been\naltered successfully by the SNMP protocol entity\nas the result of receiving valid SNMP Set-Request\nPDUs.") snmpInGetRequests = MibScalar((1, 3, 6, 1, 2, 1, 11, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInGetRequests.setDescription("The total number of SNMP Get-Request PDUs which\nhave been accepted and processed by the SNMP\nprotocol entity.") snmpInGetNexts = MibScalar((1, 3, 6, 1, 2, 1, 11, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInGetNexts.setDescription("The total number of SNMP Get-Next PDUs which have\nbeen accepted and processed by the SNMP protocol\nentity.") snmpInSetRequests = MibScalar((1, 3, 6, 1, 2, 1, 11, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInSetRequests.setDescription("The total number of SNMP Set-Request PDUs which\nhave been accepted and processed by the SNMP\nprotocol entity.") snmpInGetResponses = MibScalar((1, 3, 6, 1, 2, 1, 11, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInGetResponses.setDescription("The total number of SNMP Get-Response PDUs which\nhave been accepted and processed by the SNMP\nprotocol entity.") snmpInTraps = MibScalar((1, 3, 6, 1, 2, 1, 11, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInTraps.setDescription("The total number of SNMP Trap PDUs which have\nbeen accepted and processed by the SNMP protocol\nentity.") snmpOutTooBigs = MibScalar((1, 3, 6, 1, 2, 1, 11, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutTooBigs.setDescription("The total number of SNMP PDUs which were\ngenerated by the SNMP protocol entity and for\nwhich the value of the error-status field is\n`tooBig.'") snmpOutNoSuchNames = MibScalar((1, 3, 6, 1, 2, 1, 11, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutNoSuchNames.setDescription("The total number of SNMP PDUs which were\ngenerated by the SNMP protocol entity and for\nwhich the value of the error-status is\n`noSuchName'.") snmpOutBadValues = MibScalar((1, 3, 6, 1, 2, 1, 11, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutBadValues.setDescription("The total number of SNMP PDUs which were\ngenerated by the SNMP protocol entity and for\nwhich the value of the error-status field is\n`badValue'.") snmpOutGenErrs = MibScalar((1, 3, 6, 1, 2, 1, 11, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutGenErrs.setDescription("The total number of SNMP PDUs which were\ngenerated by the SNMP protocol entity and for\nwhich the value of the error-status field is\n`genErr'.") snmpOutGetRequests = MibScalar((1, 3, 6, 1, 2, 1, 11, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutGetRequests.setDescription("The total number of SNMP Get-Request PDUs which\nhave been generated by the SNMP protocol entity.") snmpOutGetNexts = MibScalar((1, 3, 6, 1, 2, 1, 11, 26), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutGetNexts.setDescription("The total number of SNMP Get-Next PDUs which have\nbeen generated by the SNMP protocol entity.") snmpOutSetRequests = MibScalar((1, 3, 6, 1, 2, 1, 11, 27), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutSetRequests.setDescription("The total number of SNMP Set-Request PDUs which\nhave been generated by the SNMP protocol entity.") snmpOutGetResponses = MibScalar((1, 3, 6, 1, 2, 1, 11, 28), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutGetResponses.setDescription("The total number of SNMP Get-Response PDUs which\nhave been generated by the SNMP protocol entity.") snmpOutTraps = MibScalar((1, 3, 6, 1, 2, 1, 11, 29), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutTraps.setDescription("The total number of SNMP Trap PDUs which have\nbeen generated by the SNMP protocol entity.") snmpEnableAuthenTraps = MibScalar((1, 3, 6, 1, 2, 1, 11, 30), Integer().subtype(subtypeSpec=constraint.SingleValueConstraint(2,1,)).subtype(namedValues=namedval.NamedValues(("enabled", 1), ("disabled", 2), ))).setMaxAccess("readwrite") if mibBuilder.loadTexts: snmpEnableAuthenTraps.setDescription("Indicates whether the SNMP agent process is\npermitted to generate authentication-failure\ntraps. The value of this object overrides any\nconfiguration information; as such, it provides a\nmeans whereby all authentication-failure traps may\nbe disabled.\n\nNote that it is strongly recommended that this\nobject be stored in non-volatile memory so that it\nremains constant between re-initializations of the\nnetwork management system.") # Augmentions # Exports # Types mibBuilder.exportSymbols("RFC1213-MIB", DisplayString=DisplayString, PhysAddress=PhysAddress) # Objects mibBuilder.exportSymbols("RFC1213-MIB", mib_2=mib_2, system=system, sysDescr=sysDescr, sysObjectID=sysObjectID, sysUpTime=sysUpTime, sysContact=sysContact, sysName=sysName, sysLocation=sysLocation, sysServices=sysServices, interfaces=interfaces, ifNumber=ifNumber, ifTable=ifTable, ifEntry=ifEntry, ifIndex=ifIndex, ifDescr=ifDescr, ifType=ifType, ifMtu=ifMtu, ifSpeed=ifSpeed, ifPhysAddress=ifPhysAddress, ifAdminStatus=ifAdminStatus, ifOperStatus=ifOperStatus, ifLastChange=ifLastChange, ifInOctets=ifInOctets, ifInUcastPkts=ifInUcastPkts, ifInNUcastPkts=ifInNUcastPkts, ifInDiscards=ifInDiscards, ifInErrors=ifInErrors, ifInUnknownProtos=ifInUnknownProtos, ifOutOctets=ifOutOctets, ifOutUcastPkts=ifOutUcastPkts, ifOutNUcastPkts=ifOutNUcastPkts, ifOutDiscards=ifOutDiscards, ifOutErrors=ifOutErrors, ifOutQLen=ifOutQLen, ifSpecific=ifSpecific, at=at, atTable=atTable, atEntry=atEntry, atIfIndex=atIfIndex, atPhysAddress=atPhysAddress, atNetAddress=atNetAddress, atNetAddressPlaceholder=atNetAddressPlaceholder, ip=ip, ipForwarding=ipForwarding, ipDefaultTTL=ipDefaultTTL, ipInReceives=ipInReceives, ipInHdrErrors=ipInHdrErrors, ipInAddrErrors=ipInAddrErrors, ipForwDatagrams=ipForwDatagrams, ipInUnknownProtos=ipInUnknownProtos, ipInDiscards=ipInDiscards, ipInDelivers=ipInDelivers, ipOutRequests=ipOutRequests, ipOutDiscards=ipOutDiscards, ipOutNoRoutes=ipOutNoRoutes, ipReasmTimeout=ipReasmTimeout, ipReasmReqds=ipReasmReqds, ipReasmOKs=ipReasmOKs, ipReasmFails=ipReasmFails, ipFragOKs=ipFragOKs, ipFragFails=ipFragFails, ipFragCreates=ipFragCreates, ipAddrTable=ipAddrTable, ipAddrEntry=ipAddrEntry, ipAdEntAddr=ipAdEntAddr, ipAdEntIfIndex=ipAdEntIfIndex, ipAdEntNetMask=ipAdEntNetMask, ipAdEntBcastAddr=ipAdEntBcastAddr, ipAdEntReasmMaxSize=ipAdEntReasmMaxSize, ipRouteTable=ipRouteTable, ipRouteEntry=ipRouteEntry, ipRouteDest=ipRouteDest, ipRouteIfIndex=ipRouteIfIndex, ipRouteMetric1=ipRouteMetric1, ipRouteMetric2=ipRouteMetric2, ipRouteMetric3=ipRouteMetric3, ipRouteMetric4=ipRouteMetric4, ipRouteNextHop=ipRouteNextHop, ipRouteType=ipRouteType, ipRouteProto=ipRouteProto, ipRouteAge=ipRouteAge, ipRouteMask=ipRouteMask, ipRouteMetric5=ipRouteMetric5, ipRouteInfo=ipRouteInfo, ipNetToMediaTable=ipNetToMediaTable, ipNetToMediaEntry=ipNetToMediaEntry, ipNetToMediaIfIndex=ipNetToMediaIfIndex, ipNetToMediaPhysAddress=ipNetToMediaPhysAddress, ipNetToMediaNetAddress=ipNetToMediaNetAddress, ipNetToMediaType=ipNetToMediaType, ipRoutingDiscards=ipRoutingDiscards, icmp=icmp, icmpInMsgs=icmpInMsgs, icmpInErrors=icmpInErrors, icmpInDestUnreachs=icmpInDestUnreachs, icmpInTimeExcds=icmpInTimeExcds, icmpInParmProbs=icmpInParmProbs, icmpInSrcQuenchs=icmpInSrcQuenchs, icmpInRedirects=icmpInRedirects, icmpInEchos=icmpInEchos, icmpInEchoReps=icmpInEchoReps, icmpInTimestamps=icmpInTimestamps, icmpInTimestampReps=icmpInTimestampReps, icmpInAddrMasks=icmpInAddrMasks, icmpInAddrMaskReps=icmpInAddrMaskReps, icmpOutMsgs=icmpOutMsgs, icmpOutErrors=icmpOutErrors, icmpOutDestUnreachs=icmpOutDestUnreachs, icmpOutTimeExcds=icmpOutTimeExcds, icmpOutParmProbs=icmpOutParmProbs, icmpOutSrcQuenchs=icmpOutSrcQuenchs, icmpOutRedirects=icmpOutRedirects, icmpOutEchos=icmpOutEchos, icmpOutEchoReps=icmpOutEchoReps, icmpOutTimestamps=icmpOutTimestamps, icmpOutTimestampReps=icmpOutTimestampReps, icmpOutAddrMasks=icmpOutAddrMasks, icmpOutAddrMaskReps=icmpOutAddrMaskReps, tcp=tcp, tcpRtoAlgorithm=tcpRtoAlgorithm, tcpRtoMin=tcpRtoMin, tcpRtoMax=tcpRtoMax, tcpMaxConn=tcpMaxConn, tcpActiveOpens=tcpActiveOpens, tcpPassiveOpens=tcpPassiveOpens, tcpAttemptFails=tcpAttemptFails, tcpEstabResets=tcpEstabResets) mibBuilder.exportSymbols("RFC1213-MIB", tcpCurrEstab=tcpCurrEstab, tcpInSegs=tcpInSegs, tcpOutSegs=tcpOutSegs, tcpRetransSegs=tcpRetransSegs, tcpConnTable=tcpConnTable, tcpConnEntry=tcpConnEntry, tcpConnState=tcpConnState, tcpConnLocalAddress=tcpConnLocalAddress, tcpConnLocalPort=tcpConnLocalPort, tcpConnRemAddress=tcpConnRemAddress, tcpConnRemPort=tcpConnRemPort, tcpInErrs=tcpInErrs, tcpOutRsts=tcpOutRsts, udp=udp, udpInDatagrams=udpInDatagrams, udpNoPorts=udpNoPorts, udpInErrors=udpInErrors, udpOutDatagrams=udpOutDatagrams, udpTable=udpTable, udpEntry=udpEntry, udpLocalAddress=udpLocalAddress, udpLocalPort=udpLocalPort, egp=egp, egpInMsgs=egpInMsgs, egpInErrors=egpInErrors, egpOutMsgs=egpOutMsgs, egpOutErrors=egpOutErrors, egpNeighTable=egpNeighTable, egpNeighEntry=egpNeighEntry, egpNeighState=egpNeighState, egpNeighAddr=egpNeighAddr, egpNeighAs=egpNeighAs, egpNeighInMsgs=egpNeighInMsgs, egpNeighInErrs=egpNeighInErrs, egpNeighOutMsgs=egpNeighOutMsgs, egpNeighOutErrs=egpNeighOutErrs, egpNeighInErrMsgs=egpNeighInErrMsgs, egpNeighOutErrMsgs=egpNeighOutErrMsgs, egpNeighStateUps=egpNeighStateUps, egpNeighStateDowns=egpNeighStateDowns, egpNeighIntervalHello=egpNeighIntervalHello, egpNeighIntervalPoll=egpNeighIntervalPoll, egpNeighMode=egpNeighMode, egpNeighEventTrigger=egpNeighEventTrigger, egpAs=egpAs, transmission=transmission, snmp=snmp, snmpInPkts=snmpInPkts, snmpOutPkts=snmpOutPkts, snmpInBadVersions=snmpInBadVersions, snmpInBadCommunityNames=snmpInBadCommunityNames, snmpInBadCommunityUses=snmpInBadCommunityUses, snmpInASNParseErrs=snmpInASNParseErrs, snmpInTooBigs=snmpInTooBigs, snmpInNoSuchNames=snmpInNoSuchNames, snmpInBadValues=snmpInBadValues, snmpInReadOnlys=snmpInReadOnlys, snmpInGenErrs=snmpInGenErrs, snmpInTotalReqVars=snmpInTotalReqVars, snmpInTotalSetVars=snmpInTotalSetVars, snmpInGetRequests=snmpInGetRequests, snmpInGetNexts=snmpInGetNexts, snmpInSetRequests=snmpInSetRequests, snmpInGetResponses=snmpInGetResponses, snmpInTraps=snmpInTraps, snmpOutTooBigs=snmpOutTooBigs, snmpOutNoSuchNames=snmpOutNoSuchNames, snmpOutBadValues=snmpOutBadValues, snmpOutGenErrs=snmpOutGenErrs, snmpOutGetRequests=snmpOutGetRequests, snmpOutGetNexts=snmpOutGetNexts, snmpOutSetRequests=snmpOutSetRequests, snmpOutGetResponses=snmpOutGetResponses, snmpOutTraps=snmpOutTraps, snmpEnableAuthenTraps=snmpEnableAuthenTraps) PKà©z:˜tƉ3‰3%pysnmp/smi/mibs/SNMP-COMMUNITY-MIB.py# PySNMP SMI module. Autogenerated from smidump -f python SNMP-COMMUNITY-MIB # by libsmi2pysnmp-0.0.9-alpha at Thu Mar 26 20:58:11 2009, # Python version (2, 4, 4, 'final', 0) # Imported just in case new ASN.1 types would be created from pyasn1.type import constraint, namedval # Imports ( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") ( SnmpAdminString, SnmpEngineID, ) = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString", "SnmpEngineID") ( SnmpTagValue, snmpTargetAddrEntry, ) = mibBuilder.importSymbols("SNMP-TARGET-MIB", "SnmpTagValue", "snmpTargetAddrEntry") ( ModuleCompliance, ObjectGroup, ) = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup") ( Bits, Integer32, Integer32, IpAddress, ModuleIdentity, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, snmpModules, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "Integer32", "Integer32", "IpAddress", "ModuleIdentity", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "snmpModules") ( RowStatus, StorageType, ) = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "StorageType") # Objects snmpCommunityMIB = ModuleIdentity((1, 3, 6, 1, 6, 3, 18)).setRevisions(("2000-03-06 00:00","1999-05-13 00:00",)) if mibBuilder.loadTexts: snmpCommunityMIB.setOrganization("SNMPv3 Working Group") if mibBuilder.loadTexts: snmpCommunityMIB.setContactInfo("WG-email: snmpv3@lists.tislabs.com\nSubscribe: majordomo@lists.tislabs.com\n In msg body: subscribe snmpv3\n\nChair: Russ Mundy\n TIS Labs at Network Associates\nPostal: 3060 Washington Rd\n Glenwood MD 21738\n USA\nEmail: mundy@tislabs.com\nPhone: +1-301-854-6889\n\n\n\nCo-editor: Rob Frye\n CoSine Communications\nPostal: 1200 Bridge Parkway\n Redwood City, CA 94065\n USA\nE-mail: rfrye@cosinecom.com\nPhone: +1 703 725 1130\n\nCo-editor: David B. Levi\n Nortel Networks\nPostal: 3505 Kesterwood Drive\n Knoxville, TN 37918\nE-mail: dlevi@nortelnetworks.com\nPhone: +1 423 686 0432\n\nCo-editor: Shawn A. Routhier\n Integrated Systems Inc.\nPostal: 333 North Ave 4th Floor\n Wakefield, MA 01880\nE-mail: sar@epilogue.com\nPhone: +1 781 245 0804\n\nCo-editor: Bert Wijnen\n Lucent Technologies\nPostal: Schagen 33\n 3461 GL Linschoten\n Netherlands\nEmail: bwijnen@lucent.com\nPhone: +31-348-407-775") if mibBuilder.loadTexts: snmpCommunityMIB.setDescription("This MIB module defines objects to help support coexistence\nbetween SNMPv1, SNMPv2c, and SNMPv3.") snmpCommunityMIBObjects = MibIdentifier((1, 3, 6, 1, 6, 3, 18, 1)) snmpCommunityTable = MibTable((1, 3, 6, 1, 6, 3, 18, 1, 1)) if mibBuilder.loadTexts: snmpCommunityTable.setDescription("The table of community strings configured in the SNMP\nengine's Local Configuration Datastore (LCD).") snmpCommunityEntry = MibTableRow((1, 3, 6, 1, 6, 3, 18, 1, 1, 1)).setIndexNames((1, "SNMP-COMMUNITY-MIB", "snmpCommunityIndex")) if mibBuilder.loadTexts: snmpCommunityEntry.setDescription("Information about a particular community string.") snmpCommunityIndex = MibTableColumn((1, 3, 6, 1, 6, 3, 18, 1, 1, 1, 1), SnmpAdminString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, 32))).setMaxAccess("noaccess") if mibBuilder.loadTexts: snmpCommunityIndex.setDescription("The unique index value of a row in this table.") snmpCommunityName = MibTableColumn((1, 3, 6, 1, 6, 3, 18, 1, 1, 1, 2), OctetString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpCommunityName.setDescription("The community string for which a row in this table\nrepresents a configuration.") snmpCommunitySecurityName = MibTableColumn((1, 3, 6, 1, 6, 3, 18, 1, 1, 1, 3), SnmpAdminString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, 32))).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpCommunitySecurityName.setDescription("A human readable string representing the corresponding\nvalue of snmpCommunityName in a Security Model\nindependent format.") snmpCommunityContextEngineID = MibTableColumn((1, 3, 6, 1, 6, 3, 18, 1, 1, 1, 4), SnmpEngineID()).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpCommunityContextEngineID.setDescription("The contextEngineID indicating the location of the\ncontext in which management information is accessed\nwhen using the community string specified by the\ncorresponding instance of snmpCommunityName.\n\nThe default value is the snmpEngineID of the entity in\nwhich this object is instantiated.") snmpCommunityContextName = MibTableColumn((1, 3, 6, 1, 6, 3, 18, 1, 1, 1, 5), SnmpAdminString().subtype(subtypeSpec=constraint.ValueSizeConstraint(0, 32)).clone('')).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpCommunityContextName.setDescription("The context in which management information is accessed\nwhen using the community string specified by the corresponding\ninstance of snmpCommunityName.") snmpCommunityTransportTag = MibTableColumn((1, 3, 6, 1, 6, 3, 18, 1, 1, 1, 6), SnmpTagValue().clone('')).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpCommunityTransportTag.setDescription("This object specifies a set of transport endpoints\nfrom which a command responder application will accept\nmanagement requests. If a management request containing\nthis community is received on a transport endpoint other\nthan the transport endpoints identified by this object,\nthe request is deemed unauthentic.\n\nThe transports identified by this object are specified\n\n\nin the snmpTargetAddrTable. Entries in that table\nwhose snmpTargetAddrTagList contains this tag value\nare identified.\n\nIf the value of this object has zero-length, transport\nendpoints are not checked when authenticating messages\ncontaining this community string.") snmpCommunityStorageType = MibTableColumn((1, 3, 6, 1, 6, 3, 18, 1, 1, 1, 7), StorageType()).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpCommunityStorageType.setDescription("The storage type for this conceptual row in the\nsnmpCommunityTable. Conceptual rows having the value\n'permanent' need not allow write-access to any\ncolumnar object in the row.") snmpCommunityStatus = MibTableColumn((1, 3, 6, 1, 6, 3, 18, 1, 1, 1, 8), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpCommunityStatus.setDescription("The status of this conceptual row in the snmpCommunityTable.\n\nAn entry in this table is not qualified for activation\nuntil instances of all corresponding columns have been\ninitialized, either through default values, or through\nSet operations. The snmpCommunityName and\nsnmpCommunitySecurityName objects must be explicitly set.\n\nThere is no restriction on setting columns in this table\nwhen the value of snmpCommunityStatus is active(1).") snmpTargetAddrExtTable = MibTable((1, 3, 6, 1, 6, 3, 18, 1, 2)) if mibBuilder.loadTexts: snmpTargetAddrExtTable.setDescription("The table of mask and mms values associated with the\n\n\nsnmpTargetAddrTable.\n\nThe snmpTargetAddrExtTable augments the\nsnmpTargetAddrTable with a transport address mask value\nand a maximum message size value. The transport address\nmask allows entries in the snmpTargetAddrTable to define\na set of addresses instead of just a single address.\nThe maximum message size value allows the maximum\nmessage size of another SNMP entity to be configured for\nuse in SNMPv1 (and SNMPv2c) transactions, where the\nmessage format does not specify a maximum message size.") snmpTargetAddrExtEntry = MibTableRow((1, 3, 6, 1, 6, 3, 18, 1, 2, 1)) if mibBuilder.loadTexts: snmpTargetAddrExtEntry.setDescription("Information about a particular mask and mms value.") snmpTargetAddrTMask = MibTableColumn((1, 3, 6, 1, 6, 3, 18, 1, 2, 1, 1), OctetString().subtype(subtypeSpec=constraint.ValueSizeConstraint(0, 255)).clone('')).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpTargetAddrTMask.setDescription("The mask value associated with an entry in the\nsnmpTargetAddrTable. The value of this object must\nhave the same length as the corresponding instance of\nsnmpTargetAddrTAddress, or must have length 0. An\nattempt to set it to any other value will result in\nan inconsistentValue error.\n\nThe value of this object allows an entry in the\nsnmpTargetAddrTable to specify multiple addresses.\nThe mask value is used to select which bits of\na transport address must match bits of the corresponding\ninstance of snmpTargetAddrTAddress, in order for the\ntransport address to match a particular entry in the\nsnmpTargetAddrTable. Bits which are 1 in the mask\nvalue indicate bits in the transport address which\nmust match bits in the snmpTargetAddrTAddress value.\n\n\nBits which are 0 in the mask indicate bits in the\ntransport address which need not match. If the\nlength of the mask is 0, the mask should be treated\nas if all its bits were 1 and its length were equal\nto the length of the corresponding value of\nsnmpTargetAddrTable.\n\nThis object may not be modified while the value of the\ncorresponding instance of snmpTargetAddrRowStatus is\nactive(1). An attempt to set this object in this case\nwill result in an inconsistentValue error.") snmpTargetAddrMMS = MibTableColumn((1, 3, 6, 1, 6, 3, 18, 1, 2, 1, 2), Integer32().subtype(subtypeSpec=constraint.ConstraintsUnion(constraint.ValueRangeConstraint(0,0),constraint.ValueRangeConstraint(484,2147483647L),)).clone(484)).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpTargetAddrMMS.setDescription("The maximum message size value associated with an entry\nin the snmpTargetAddrTable.") snmpTrapAddress = MibScalar((1, 3, 6, 1, 6, 3, 18, 1, 3), IpAddress()).setMaxAccess("notifyonly") if mibBuilder.loadTexts: snmpTrapAddress.setDescription("The value of the agent-addr field of a Trap PDU which\nis forwarded by a proxy forwarder application using\nan SNMP version other than SNMPv1. The value of this\nobject SHOULD contain the value of the agent-addr field\nfrom the original Trap PDU as generated by an SNMPv1\nagent.") snmpTrapCommunity = MibScalar((1, 3, 6, 1, 6, 3, 18, 1, 4), OctetString()).setMaxAccess("notifyonly") if mibBuilder.loadTexts: snmpTrapCommunity.setDescription("The value of the community string field of an SNMPv1\nmessage containing a Trap PDU which is forwarded by a\na proxy forwarder application using an SNMP version\nother than SNMPv1. The value of this object SHOULD\ncontain the value of the community string field from\nthe original SNMPv1 message containing a Trap PDU as\ngenerated by an SNMPv1 agent.") snmpCommunityMIBConformance = MibIdentifier((1, 3, 6, 1, 6, 3, 18, 2)) snmpCommunityMIBCompliances = MibIdentifier((1, 3, 6, 1, 6, 3, 18, 2, 1)) snmpCommunityMIBGroups = MibIdentifier((1, 3, 6, 1, 6, 3, 18, 2, 2)) # Augmentions snmpTargetAddrEntry, = mibBuilder.importSymbols("SNMP-TARGET-MIB", "snmpTargetAddrEntry") snmpTargetAddrEntry.registerAugmentions(("SNMP-COMMUNITY-MIB", "snmpTargetAddrExtEntry")) apply(snmpTargetAddrExtEntry.setIndexNames, snmpTargetAddrEntry.getIndexNames()) # Groups snmpProxyTrapForwardGroup = ObjectGroup((1, 3, 6, 1, 6, 3, 18, 2, 2, 3)).setObjects(("SNMP-COMMUNITY-MIB", "snmpTrapAddress"), ("SNMP-COMMUNITY-MIB", "snmpTrapCommunity"), ) snmpCommunityGroup = ObjectGroup((1, 3, 6, 1, 6, 3, 18, 2, 2, 1)).setObjects(("SNMP-COMMUNITY-MIB", "snmpCommunityStorageType"), ("SNMP-COMMUNITY-MIB", "snmpTargetAddrTMask"), ("SNMP-COMMUNITY-MIB", "snmpCommunityContextEngineID"), ("SNMP-COMMUNITY-MIB", "snmpCommunityStatus"), ("SNMP-COMMUNITY-MIB", "snmpCommunityContextName"), ("SNMP-COMMUNITY-MIB", "snmpCommunitySecurityName"), ("SNMP-COMMUNITY-MIB", "snmpCommunityName"), ("SNMP-COMMUNITY-MIB", "snmpTargetAddrMMS"), ("SNMP-COMMUNITY-MIB", "snmpCommunityTransportTag"), ) # Exports # Module identity mibBuilder.exportSymbols("SNMP-COMMUNITY-MIB", PYSNMP_MODULE_ID=snmpCommunityMIB) # Objects mibBuilder.exportSymbols("SNMP-COMMUNITY-MIB", snmpCommunityMIB=snmpCommunityMIB, snmpCommunityMIBObjects=snmpCommunityMIBObjects, snmpCommunityTable=snmpCommunityTable, snmpCommunityEntry=snmpCommunityEntry, snmpCommunityIndex=snmpCommunityIndex, snmpCommunityName=snmpCommunityName, snmpCommunitySecurityName=snmpCommunitySecurityName, snmpCommunityContextEngineID=snmpCommunityContextEngineID, snmpCommunityContextName=snmpCommunityContextName, snmpCommunityTransportTag=snmpCommunityTransportTag, snmpCommunityStorageType=snmpCommunityStorageType, snmpCommunityStatus=snmpCommunityStatus, snmpTargetAddrExtTable=snmpTargetAddrExtTable, snmpTargetAddrExtEntry=snmpTargetAddrExtEntry, snmpTargetAddrTMask=snmpTargetAddrTMask, snmpTargetAddrMMS=snmpTargetAddrMMS, snmpTrapAddress=snmpTrapAddress, snmpTrapCommunity=snmpTrapCommunity, snmpCommunityMIBConformance=snmpCommunityMIBConformance, snmpCommunityMIBCompliances=snmpCommunityMIBCompliances, snmpCommunityMIBGroups=snmpCommunityMIBGroups) # Groups mibBuilder.exportSymbols("SNMP-COMMUNITY-MIB", snmpProxyTrapForwardGroup=snmpProxyTrapForwardGroup, snmpCommunityGroup=snmpCommunityGroup) PK†£=ÐÁ‡Ò) ) $pysnmp/smi/mibs/SNMP-USM-AES-MIB.pyc;ò %ÆËIc @sudklZlZeiddddƒ\ZZZeiddƒ\Zeiddd d d d d dƒ\Z Z Z Z Z ZZe ddddddddddf ƒZeioeidƒne dddddddfƒidfƒZeioeidƒneioeidƒneioeidƒneiddeƒeiddedeƒdS( (s constraintsnamedvalsASN1sIntegersObjectIdentifiers OctetStringsSNMP-FRAMEWORK-MIBssnmpPrivProtocolss SNMPv2-SMIsBitss Integer32sModuleIdentitys MibIdentifiersObjectIdentitys TimeTickss snmpModulesiiii iis$The CFB128-AES-128 Privacy Protocol.is2004-06-14 00:00sIETFsfUri Blumenthal Lucent Technologies / Bell Labs 67 Whippany Rd. 14D-318 Whippany, NJ 07981, USA 973-386-2163 uri@bell-labs.com Fabio Maino Andiamo Systems, Inc. 375 East Tasman Drive San Jose, CA 95134, USA 408-853-7530 fmaino@andiamo.com Keith McCloghrie Cisco Systems, Inc. 170 West Tasman Drive San Jose, CA 95134-1706, USA 408-526-5260 kzm@cisco.comsGDefinitions of Object Identities needed for the use of AES by SNMP's User-based Security Model. Copyright (C) The Internet Society (2004). This version of this MIB module is part of RFC 3826; see the RFC itself for full legal notices. Supplementary information may be available on http://www.ietf.org/copyrights/ianamib.html.sSNMP-USM-AES-MIBsPYSNMP_MODULE_IDsusmAesCfb128Protocols snmpUsmAesMIBN(s pyasn1.types constraintsnamedvals mibBuilders importSymbolssIntegersObjectIdentifiers OctetStringssnmpPrivProtocolssBitss Integer32sModuleIdentitys MibIdentifiersObjectIdentitys TimeTickss snmpModulessusmAesCfb128Protocols loadTextsssetDescriptions setRevisionss snmpUsmAesMIBssetOrganizationssetContactInfos exportSymbols(s Integer32s OctetStringsusmAesCfb128Protocols MibIdentifiers constraintsBitss TimeTickssModuleIdentityssnmpPrivProtocolssObjectIdentifiers snmpModulessIntegersnamedvalsObjectIdentitys snmpUsmAesMIB((s>build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-USM-AES-MIB.pys?s!9* -   PKà©z:‘" gÃÃ!pysnmp/smi/mibs/PYSNMP-USM-MIB.py# PySNMP SMI module. Autogenerated from smidump -f python PYSNMP-USM-MIB # by libsmi2pysnmp-0.0.9-alpha at Thu Mar 26 20:58:59 2009, # Python version (2, 4, 4, 'final', 0) # Imported just in case new ASN.1 types would be created from pyasn1.type import constraint, namedval # Imports ( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") ( pysnmpModuleIDs, ) = mibBuilder.importSymbols("PYSNMP-MIB", "pysnmpModuleIDs") ( SnmpAdminString, ) = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") ( usmUserEntry, ) = mibBuilder.importSymbols("SNMP-USER-BASED-SM-MIB", "usmUserEntry") ( Bits, Integer32, ModuleIdentity, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "Integer32", "ModuleIdentity", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks") ( RowStatus, ) = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus") # Objects pysnmpUsmMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 20408, 3, 1, 1)).setRevisions(("2005-05-14 00:00",)) if mibBuilder.loadTexts: pysnmpUsmMIB.setOrganization("The PySNMP project") if mibBuilder.loadTexts: pysnmpUsmMIB.setContactInfo("E-mail: ilya@glas.net\nSubscribe: pysnmp-users-request@lists.sourceforge.net") if mibBuilder.loadTexts: pysnmpUsmMIB.setDescription("This MIB module defines objects specific to User\nSecurity Model (USM) implementation at PySNMP.") pysnmpUsmMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 20408, 3, 1, 1, 1)) pysnmpUsmCfg = MibIdentifier((1, 3, 6, 1, 4, 1, 20408, 3, 1, 1, 1, 1)) pysnmpUsmDiscoverable = MibScalar((1, 3, 6, 1, 4, 1, 20408, 3, 1, 1, 1, 1, 1), Integer().subtype(subtypeSpec=constraint.SingleValueConstraint(1,0,)).subtype(namedValues=namedval.NamedValues(("notDiscoverable", 0), ("discoverable", 1), )).clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: pysnmpUsmDiscoverable.setDescription("Whether SNMP engine would support its discovery by\nresponding to unknown clients.") pysnmpUsmDiscovery = MibScalar((1, 3, 6, 1, 4, 1, 20408, 3, 1, 1, 1, 1, 2), Integer().subtype(subtypeSpec=constraint.SingleValueConstraint(1,0,)).subtype(namedValues=namedval.NamedValues(("doNotDiscover", 0), ("doDiscover", 1), )).clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: pysnmpUsmDiscovery.setDescription("Whether SNMP engine would try to figure out the EngineIDs\nof its peers by sending discover requests.") pysnmpUsmSecretTable = MibTable((1, 3, 6, 1, 4, 1, 20408, 3, 1, 1, 1, 2)) if mibBuilder.loadTexts: pysnmpUsmSecretTable.setDescription("The table of USM users passphrases configured in the SNMP \nengine's Local Configuration Datastore (LCD).") pysnmpUsmSecretEntry = MibTableRow((1, 3, 6, 1, 4, 1, 20408, 3, 1, 1, 1, 2, 1)).setIndexNames((1, "PYSNMP-USM-MIB", "pysnmpUsmSecretUserName")) if mibBuilder.loadTexts: pysnmpUsmSecretEntry.setDescription("Information about a particular USM user credentials.") pysnmpUsmSecretUserName = MibTableColumn((1, 3, 6, 1, 4, 1, 20408, 3, 1, 1, 1, 2, 1, 1), SnmpAdminString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, 32))).setMaxAccess("noaccess") if mibBuilder.loadTexts: pysnmpUsmSecretUserName.setDescription("The username string for which a row in this table\nrepresents a configuration.") pysnmpUsmSecretAuthKey = MibTableColumn((1, 3, 6, 1, 4, 1, 20408, 3, 1, 1, 1, 2, 1, 2), OctetString().subtype(subtypeSpec=constraint.ValueSizeConstraint(8, 65535))).setMaxAccess("noaccess") if mibBuilder.loadTexts: pysnmpUsmSecretAuthKey.setDescription("User's authentication passphrase used for localized key generation.") pysnmpUsmSecretPrivKey = MibTableColumn((1, 3, 6, 1, 4, 1, 20408, 3, 1, 1, 1, 2, 1, 3), OctetString().subtype(subtypeSpec=constraint.ValueSizeConstraint(8, 65535))).setMaxAccess("noaccess") if mibBuilder.loadTexts: pysnmpUsmSecretPrivKey.setDescription("User's encryption passphrase used for localized key generation.") pysnmpUsmSecretStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 20408, 3, 1, 1, 1, 2, 1, 4), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: pysnmpUsmSecretStatus.setDescription("Table status") pysnmpUsmUser = MibIdentifier((1, 3, 6, 1, 4, 1, 20408, 3, 1, 1, 1, 3)) pysnmpUsmKeyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 20408, 3, 1, 1, 1, 3, 1)) if mibBuilder.loadTexts: pysnmpUsmKeyEntry.setDescription("Information about a particular USM user credentials.") pysnmpUsmKeyAuthLocalized = MibTableColumn((1, 3, 6, 1, 4, 1, 20408, 3, 1, 1, 1, 3, 1, 1), OctetString().subtype(subtypeSpec=constraint.ValueSizeConstraint(8, 32))).setMaxAccess("noaccess") if mibBuilder.loadTexts: pysnmpUsmKeyAuthLocalized.setDescription("User's localized key used for authentication.") pysnmpUsmKeyPrivLocalized = MibTableColumn((1, 3, 6, 1, 4, 1, 20408, 3, 1, 1, 1, 3, 1, 2), OctetString().subtype(subtypeSpec=constraint.ValueSizeConstraint(8, 32))).setMaxAccess("noaccess") if mibBuilder.loadTexts: pysnmpUsmKeyPrivLocalized.setDescription("User's localized key used for encryption.") pysnmpUsmKeyAuth = MibTableColumn((1, 3, 6, 1, 4, 1, 20408, 3, 1, 1, 1, 3, 1, 3), OctetString().subtype(subtypeSpec=constraint.ValueSizeConstraint(8, 32))).setMaxAccess("noaccess") if mibBuilder.loadTexts: pysnmpUsmKeyAuth.setDescription("User's non-localized key used for authentication.") pysnmpUsmKeyPriv = MibTableColumn((1, 3, 6, 1, 4, 1, 20408, 3, 1, 1, 1, 3, 1, 4), OctetString().subtype(subtypeSpec=constraint.ValueSizeConstraint(8, 32))).setMaxAccess("noaccess") if mibBuilder.loadTexts: pysnmpUsmKeyPriv.setDescription("User's non-localized key used for encryption.") pysnmpUsmMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 20408, 3, 1, 1, 2)) pysnmpUsmMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 20408, 3, 1, 1, 2, 1)) pysnmpUsmMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 20408, 3, 1, 1, 2, 2)) # Augmentions usmUserEntry, = mibBuilder.importSymbols("SNMP-USER-BASED-SM-MIB", "usmUserEntry") usmUserEntry.registerAugmentions(("PYSNMP-USM-MIB", "pysnmpUsmKeyEntry")) apply(pysnmpUsmKeyEntry.setIndexNames, usmUserEntry.getIndexNames()) # Exports # Module identity mibBuilder.exportSymbols("PYSNMP-USM-MIB", PYSNMP_MODULE_ID=pysnmpUsmMIB) # Objects mibBuilder.exportSymbols("PYSNMP-USM-MIB", pysnmpUsmMIB=pysnmpUsmMIB, pysnmpUsmMIBObjects=pysnmpUsmMIBObjects, pysnmpUsmCfg=pysnmpUsmCfg, pysnmpUsmDiscoverable=pysnmpUsmDiscoverable, pysnmpUsmDiscovery=pysnmpUsmDiscovery, pysnmpUsmSecretTable=pysnmpUsmSecretTable, pysnmpUsmSecretEntry=pysnmpUsmSecretEntry, pysnmpUsmSecretUserName=pysnmpUsmSecretUserName, pysnmpUsmSecretAuthKey=pysnmpUsmSecretAuthKey, pysnmpUsmSecretPrivKey=pysnmpUsmSecretPrivKey, pysnmpUsmSecretStatus=pysnmpUsmSecretStatus, pysnmpUsmUser=pysnmpUsmUser, pysnmpUsmKeyEntry=pysnmpUsmKeyEntry, pysnmpUsmKeyAuthLocalized=pysnmpUsmKeyAuthLocalized, pysnmpUsmKeyPrivLocalized=pysnmpUsmKeyPrivLocalized, pysnmpUsmKeyAuth=pysnmpUsmKeyAuth, pysnmpUsmKeyPriv=pysnmpUsmKeyPriv, pysnmpUsmMIBConformance=pysnmpUsmMIBConformance, pysnmpUsmMIBCompliances=pysnmpUsmMIBCompliances, pysnmpUsmMIBGroups=pysnmpUsmMIBGroups) PK†£=o«õÀžžpysnmp/smi/mibs/SNMPv2-TM.pyc;ò ±LKc@sdkZdkZdklZeiddƒ\Zeidddddd d ƒ\ZZZ Z Z Z eid d ƒ\Z ee id fƒidfƒZe e idfƒZde efd„ƒYZe e idfƒZe e idfƒZde efd„ƒYZe e idfƒZdee fd„ƒYZe e idfƒZde efd„ƒYZee idfƒZeeidfƒZeiddeƒeiddededed ed!eded"eded#eded$ed%eƒ dS(&N(s constraintsASN1s OctetStrings SNMPv2-SMIsModuleIdentitys MibIdentifiersObjectIdentitys snmpModuless snmpDomainss snmpProxyss SNMPv2-TCsTextualConventionis2002-10-16 00:00isSnmpUDPAddresscBs9tZeieiddƒZdZd„Zd„ZRS(Nis1d.1d.1d.1d/2dcCs‚t|ƒtijoXtd„td„ti|ddƒƒƒt|dd?d@ƒt|dd@ƒSnt i ||ƒSdS(NcCs||S(N(sxsy(sxsy((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TM.pysscCstti|ƒƒS(N(schrsstringsatoisx(sx((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TM.pyssis.iiiÿ( stypesvaluestypess TupleTypesreducesmapsstringssplitschrs OctetStringsprettyInsself(sselfsvalue((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TM.pysprettyInsXcCszt|dƒ oZtitd„|id ƒdƒt|idd!ƒd>t|idd!ƒBf|_n|i|SdS(Ns __tuple_valuecCstt|ƒƒS(N(sstrsordsx(sx((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TM.pyssis.iii( shasattrsselfsstringsjoinsmaps_valuesords_SnmpUDPAddress__tuple_valuesi(sselfsi((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TM.pys __getitem__sZ( s__name__s __module__s OctetStrings subtypeSpecs constraintsValueSizeConstraints displayHintsprettyIns __getitem__(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TM.pysSnmpUDPAddresss iisSnmpOSIAddresscBs'tZeieiddƒZdZRS(NiiUs*1x:/1x:(s__name__s __module__s OctetStrings subtypeSpecs constraintsValueSizeConstraints displayHint(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TM.pysSnmpOSIAddress'sisSnmpNBPAddresscBs!tZeieiddƒZRS(Niic(s__name__s __module__s OctetStrings subtypeSpecs constraintsValueSizeConstraint(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TM.pysSnmpNBPAddress-sisSnmpIPXAddresscBs'tZeieiddƒZdZRS(Ni s4x.1x:1x:1x:1x:1x:1x.2d(s__name__s __module__s OctetStrings subtypeSpecs constraintsValueSizeConstraints displayHint(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TM.pysSnmpIPXAddress2ss SNMPv2-TMsPYSNMP_MODULE_IDssnmpv2tms snmpUDPDomainssnmpCLNSDomainssnmpCONSDomains snmpDDPDomains snmpIPXDomains rfc1157Proxys rfc1157Domain(stypessstrings pyasn1.types constraints mibBuilders importSymbolss OctetStringsModuleIdentitys MibIdentifiersObjectIdentitys snmpModuless snmpDomainss snmpProxyssTextualConventionsnames setRevisionsssnmpv2tms snmpUDPDomainsSnmpUDPAddressssnmpCLNSDomainssnmpCONSDomainsSnmpOSIAddresss snmpDDPDomainsSnmpNBPAddresss snmpIPXDomainsSnmpIPXAddresss rfc1157Proxys rfc1157Domains exportSymbols(s rfc1157DomainsSnmpNBPAddresssModuleIdentitys snmpProxyss snmpModuless snmpIPXDomainsSnmpIPXAddresssSnmpUDPAddresss rfc1157Proxys snmpUDPDomains snmpDomainsssnmpCONSDomains OctetStringsstringssnmpv2tmstypess constraints snmpDDPDomainsTextualConventionssnmpCLNSDomains MibIdentifiersSnmpOSIAddresssObjectIdentity((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TM.pys?s2 !"    PKÝ©z:£…ä¦ ¦ pysnmp/smi/mibs/PYSNMP-MIB.py# PySNMP SMI module. Autogenerated from smidump -f python PYSNMP-MIB # by libsmi2pysnmp-0.0.9-alpha at Thu Mar 26 20:58:59 2009, # Python version (2, 4, 4, 'final', 0) # Imported just in case new ASN.1 types would be created from pyasn1.type import constraint, namedval # Imports ( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") ( Bits, Integer32, ModuleIdentity, MibIdentifier, TimeTicks, enterprises, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "Integer32", "ModuleIdentity", "MibIdentifier", "TimeTicks", "enterprises") # Objects pysnmp = ModuleIdentity((1, 3, 6, 1, 4, 1, 20408)).setRevisions(("2005-05-14 00:00",)) if mibBuilder.loadTexts: pysnmp.setOrganization("pysnmp.sf.net") if mibBuilder.loadTexts: pysnmp.setContactInfo("email: ilya@glas.net") if mibBuilder.loadTexts: pysnmp.setDescription("Top-level infrastructure of the PySNMP project enterprise MIB tree") pysnmpObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 20408, 1)) pysnmpExamples = MibIdentifier((1, 3, 6, 1, 4, 1, 20408, 2)) pysnmpEnumerations = MibIdentifier((1, 3, 6, 1, 4, 1, 20408, 3)) pysnmpModuleIDs = MibIdentifier((1, 3, 6, 1, 4, 1, 20408, 3, 1)) pysnmpAgentOIDs = MibIdentifier((1, 3, 6, 1, 4, 1, 20408, 3, 2)) pysnmpDomains = MibIdentifier((1, 3, 6, 1, 4, 1, 20408, 3, 3)) pysnmpNotificationPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 20408, 4)) pysnmpNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 20408, 4, 0)) pysnmpNotificationObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 20408, 4, 1)) pysnmpConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 20408, 5)) pysnmpCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 20408, 5, 1)) pysnmpGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 20408, 5, 2)) pysnmpExperimental = MibIdentifier((1, 3, 6, 1, 4, 1, 20408, 9999)) # Augmentions # Exports # Module identity mibBuilder.exportSymbols("PYSNMP-MIB", PYSNMP_MODULE_ID=pysnmp) # Objects mibBuilder.exportSymbols("PYSNMP-MIB", pysnmp=pysnmp, pysnmpObjects=pysnmpObjects, pysnmpExamples=pysnmpExamples, pysnmpEnumerations=pysnmpEnumerations, pysnmpModuleIDs=pysnmpModuleIDs, pysnmpAgentOIDs=pysnmpAgentOIDs, pysnmpDomains=pysnmpDomains, pysnmpNotificationPrefix=pysnmpNotificationPrefix, pysnmpNotifications=pysnmpNotifications, pysnmpNotificationObjects=pysnmpNotificationObjects, pysnmpConformance=pysnmpConformance, pysnmpCompliances=pysnmpCompliances, pysnmpGroups=pysnmpGroups, pysnmpExperimental=pysnmpExperimental) PK ›5=w§N %pysnmp/smi/mibs/SNMP-FRAMEWORK-MIB.py# PySNMP SMI module. Mostly autogenerated from # smidump -f python SNMP-FRAMEWORK-MIB # by libsmi2pysnmp-0.0.8-alpha at Tue Feb 5 16:09:21 2008, # Python version (2, 4, 4, 'final', 0) try: import socket import os except ImportError: pass import string import time # Imported just in case new ASN.1 types would be created from pyasn1.type import constraint, namedval # Imports ( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") ( ModuleCompliance, ObjectGroup, ) = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup") ( Bits, Integer32, ModuleIdentity, MibIdentifier, ObjectIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, snmpModules, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "Integer32", "ModuleIdentity", "MibIdentifier", "ObjectIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "snmpModules") ( TextualConvention, ) = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention") # Types class SnmpAdminString(TextualConvention, OctetString): displayHint = "255t" subtypeSpec = OctetString.subtypeSpec+constraint.ValueSizeConstraint(0,255) class SnmpEngineID(OctetString, TextualConvention): subtypeSpec = OctetString.subtypeSpec+constraint.ValueSizeConstraint(5,32) defaultValue = '\x80\x00\x4f\xb8' + '\x05' try: # Attempt to base engine ID on local IP address defaultValue = defaultValue + string.join( map(lambda x: chr(int(x)), string.split(socket.gethostbyname(socket.gethostname()),'.')), '' ) except: pass try: # Attempt to base engine ID on PID defaultValue = defaultValue + chr(os.getpid() >> 8) + chr(os.getpid() & 0xff) except: pass # ...in any case, use pseudo-random text ID t = int(time.time()) defaultValue = defaultValue + chr(t >> 16 & 0xff) + chr(t >> 8 & 0xff) + chr(t & 0xff) class SnmpEngineTime(Integer32): def clone(self, value=None, tagSet=None, subtypeSpec=None): if value is None and self._value is not None: value = int(time.time())-self._value return Integer32.clone(self, value, tagSet, subtypeSpec) class SnmpMessageProcessingModel(Integer32): subtypeSpec = Integer32.subtypeSpec+constraint.ValueRangeConstraint(0,2147483647L) class SnmpSecurityLevel(Integer): subtypeSpec = Integer.subtypeSpec+constraint.SingleValueConstraint(1,3,2,) namedValues = namedval.NamedValues(("noAuthNoPriv", 1), ("authNoPriv", 2), ("authPriv", 3), ) class SnmpSecurityModel(Integer32): subtypeSpec = Integer32.subtypeSpec+constraint.ValueRangeConstraint(0,2147483647L) # Objects snmpFrameworkMIB = ModuleIdentity((1, 3, 6, 1, 6, 3, 10)).setRevisions(("2002-10-14 00:00","1999-01-19 00:00","1997-11-20 00:00",)) if mibBuilder.loadTexts: snmpFrameworkMIB.setOrganization("SNMPv3 Working Group") if mibBuilder.loadTexts: snmpFrameworkMIB.setContactInfo("WG-EMail: snmpv3@lists.tislabs.com\nSubscribe: snmpv3-request@lists.tislabs.com\n\nCo-Chair: Russ Mundy\n Network Associates Laboratories\npostal: 15204 Omega Drive, Suite 300\n Rockville, MD 20850-4601\n USA\nEMail: mundy@tislabs.com\nphone: +1 301-947-7107\n\nCo-Chair &\nCo-editor: David Harrington\n Enterasys Networks\npostal: 35 Industrial Way\n P. O. Box 5005\n Rochester, New Hampshire 03866-5005\n USA\nEMail: dbh@enterasys.com\nphone: +1 603-337-2614\n\nCo-editor: Randy Presuhn\n BMC Software, Inc.\npostal: 2141 North First Street\n San Jose, California 95131\n USA\nEMail: randy_presuhn@bmc.com\nphone: +1 408-546-1006\n\nCo-editor: Bert Wijnen\n Lucent Technologies\npostal: Schagen 33\n 3461 GL Linschoten\n Netherlands\n\n\n\nEMail: bwijnen@lucent.com\nphone: +31 348-680-485\n ") if mibBuilder.loadTexts: snmpFrameworkMIB.setDescription("The SNMP Management Architecture MIB\n\nCopyright (C) The Internet Society (2002). This\nversion of this MIB module is part of RFC 3411;\nsee the RFC itself for full legal notices.") snmpFrameworkAdmin = MibIdentifier((1, 3, 6, 1, 6, 3, 10, 1)) snmpAuthProtocols = ObjectIdentity((1, 3, 6, 1, 6, 3, 10, 1, 1)) if mibBuilder.loadTexts: snmpAuthProtocols.setDescription("Registration point for standards-track\nauthentication protocols used in SNMP Management\nFrameworks.") snmpPrivProtocols = ObjectIdentity((1, 3, 6, 1, 6, 3, 10, 1, 2)) if mibBuilder.loadTexts: snmpPrivProtocols.setDescription("Registration point for standards-track privacy\nprotocols used in SNMP Management Frameworks.") snmpFrameworkMIBObjects = MibIdentifier((1, 3, 6, 1, 6, 3, 10, 2)) snmpEngine = MibIdentifier((1, 3, 6, 1, 6, 3, 10, 2, 1)) snmpEngineID = MibScalar((1, 3, 6, 1, 6, 3, 10, 2, 1, 1), SnmpEngineID()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpEngineID.setDescription("An SNMP engine's administratively-unique identifier.\n\nThis information SHOULD be stored in non-volatile\nstorage so that it remains constant across\nre-initializations of the SNMP engine.") snmpEngineBoots = MibScalar((1, 3, 6, 1, 6, 3, 10, 2, 1, 2), Integer32().subtype(subtypeSpec=constraint.ValueRangeConstraint(1, 2147483647L))).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpEngineBoots.setDescription("The number of times that the SNMP engine has\n(re-)initialized itself since snmpEngineID\nwas last configured.") snmpEngineTime = MibScalar((1, 3, 6, 1, 6, 3, 10, 2, 1, 3), SnmpEngineTime().subtype(subtypeSpec=constraint.ValueRangeConstraint(0, 2147483647L))).setMaxAccess("readonly").setUnits("seconds") if mibBuilder.loadTexts: snmpEngineTime.setDescription("The number of seconds since the value of\nthe snmpEngineBoots object last changed.\nWhen incrementing this object's value would\ncause it to exceed its maximum,\nsnmpEngineBoots is incremented as if a\nre-initialization had occurred, and this\nobject's value consequently reverts to zero.") snmpEngineMaxMessageSize = MibScalar((1, 3, 6, 1, 6, 3, 10, 2, 1, 4), Integer32().subtype(subtypeSpec=constraint.ValueRangeConstraint(484, 2147483647L))).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpEngineMaxMessageSize.setDescription("The maximum length in octets of an SNMP message\nwhich this SNMP engine can send or receive and\nprocess, determined as the minimum of the maximum\nmessage size values supported among all of the\ntransports available to and supported by the engine.") snmpFrameworkMIBConformance = MibIdentifier((1, 3, 6, 1, 6, 3, 10, 3)) snmpFrameworkMIBCompliances = MibIdentifier((1, 3, 6, 1, 6, 3, 10, 3, 1)) snmpFrameworkMIBGroups = MibIdentifier((1, 3, 6, 1, 6, 3, 10, 3, 2)) # Augmentions # Groups snmpEngineGroup = ObjectGroup((1, 3, 6, 1, 6, 3, 10, 3, 2, 1)).setObjects(("SNMP-FRAMEWORK-MIB", "snmpEngineID"), ("SNMP-FRAMEWORK-MIB", "snmpEngineBoots"), ("SNMP-FRAMEWORK-MIB", "snmpEngineMaxMessageSize"), ("SNMP-FRAMEWORK-MIB", "snmpEngineTime"), ) # Exports # Module identity mibBuilder.exportSymbols("SNMP-FRAMEWORK-MIB", PYSNMP_MODULE_ID=snmpFrameworkMIB) # Types mibBuilder.exportSymbols("SNMP-FRAMEWORK-MIB", SnmpAdminString=SnmpAdminString, SnmpEngineID=SnmpEngineID, SnmpEngineTime=SnmpEngineTime, SnmpMessageProcessingModel=SnmpMessageProcessingModel, SnmpSecurityLevel=SnmpSecurityLevel, SnmpSecurityModel=SnmpSecurityModel) # Objects mibBuilder.exportSymbols("SNMP-FRAMEWORK-MIB", snmpFrameworkMIB=snmpFrameworkMIB, snmpFrameworkAdmin=snmpFrameworkAdmin, snmpAuthProtocols=snmpAuthProtocols, snmpPrivProtocols=snmpPrivProtocols, snmpFrameworkMIBObjects=snmpFrameworkMIBObjects, snmpEngine=snmpEngine, snmpEngineID=snmpEngineID, snmpEngineBoots=snmpEngineBoots, snmpEngineTime=snmpEngineTime, snmpEngineMaxMessageSize=snmpEngineMaxMessageSize, snmpFrameworkMIBConformance=snmpFrameworkMIBConformance, snmpFrameworkMIBCompliances=snmpFrameworkMIBCompliances, snmpFrameworkMIBGroups=snmpFrameworkMIBGroups) # Groups mibBuilder.exportSymbols("SNMP-FRAMEWORK-MIB", snmpEngineGroup=snmpEngineGroup) PKà©z:ª·îÝrr#pysnmp/smi/mibs/SNMP-USM-AES-MIB.py# PySNMP SMI module. Autogenerated from smidump -f python SNMP-USM-AES-MIB # by libsmi2pysnmp-0.0.9-alpha at Thu Mar 26 20:58:12 2009, # Python version (2, 4, 4, 'final', 0) # Imported just in case new ASN.1 types would be created from pyasn1.type import constraint, namedval # Imports ( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") ( snmpPrivProtocols, ) = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "snmpPrivProtocols") ( Bits, Integer32, ModuleIdentity, MibIdentifier, ObjectIdentity, TimeTicks, snmpModules, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "Integer32", "ModuleIdentity", "MibIdentifier", "ObjectIdentity", "TimeTicks", "snmpModules") # Objects usmAesCfb128Protocol = ObjectIdentity((1, 3, 6, 1, 6, 3, 10, 1, 2, 4)) if mibBuilder.loadTexts: usmAesCfb128Protocol.setDescription("The CFB128-AES-128 Privacy Protocol.") snmpUsmAesMIB = ModuleIdentity((1, 3, 6, 1, 6, 3, 20)).setRevisions(("2004-06-14 00:00",)) if mibBuilder.loadTexts: snmpUsmAesMIB.setOrganization("IETF") if mibBuilder.loadTexts: snmpUsmAesMIB.setContactInfo("Uri Blumenthal\nLucent Technologies / Bell Labs\n67 Whippany Rd.\n14D-318\nWhippany, NJ 07981, USA\n973-386-2163\nuri@bell-labs.com\n\nFabio Maino\nAndiamo Systems, Inc.\n375 East Tasman Drive\nSan Jose, CA 95134, USA\n408-853-7530\nfmaino@andiamo.com\n\nKeith McCloghrie\nCisco Systems, Inc.\n170 West Tasman Drive\nSan Jose, CA 95134-1706, USA\n\n408-526-5260\nkzm@cisco.com") if mibBuilder.loadTexts: snmpUsmAesMIB.setDescription("Definitions of Object Identities needed for\nthe use of AES by SNMP's User-based Security\nModel.\n\nCopyright (C) The Internet Society (2004).\n\nThis version of this MIB module is part of RFC 3826;\nsee the RFC itself for full legal notices.\nSupplementary information may be available on\nhttp://www.ietf.org/copyrights/ianamib.html.") # Augmentions # Exports # Module identity mibBuilder.exportSymbols("SNMP-USM-AES-MIB", PYSNMP_MODULE_ID=snmpUsmAesMIB) # Objects mibBuilder.exportSymbols("SNMP-USM-AES-MIB", usmAesCfb128Protocol=usmAesCfb128Protocol, snmpUsmAesMIB=snmpUsmAesMIB) PK†£= þðMý_ý_+pysnmp/smi/mibs/SNMP-VIEW-BASED-ACM-MIB.pyc;ò %ÆËIcJ@sËdklZlZeiddddƒ\ZZZeiddddƒ\ZZ Z eid d d ƒ\Z Z eid d dddddddddƒ \ Z ZZZZZZZZZeiddddƒ\ZZZedddddddfƒidd d!fƒZeioeid"ƒneioeid#ƒneioeid$ƒneddddddddfƒZ edddddddddf ƒZ!eioe!id%ƒneddddddddddf ƒi"d&d'd(fƒZ#eioe#id)ƒnedddddddddddf eƒi$d*ei%d&d+ƒƒƒi&d,ƒZ'eioe'id-ƒneddddddddd.f ƒZ(eioe(id/ƒneddddddddd.df ƒi"d&d'd0fd&d'd1fƒZ)eioe)id2ƒneddddddddd.ddf e ƒi$d*ei*dd3ƒƒƒi&d4ƒZ+eioe+id5ƒneddddddddd.dd.f eƒi$d*ei%dd+ƒƒƒi&d4ƒZ,eioe,id6ƒneddddddddd.ddf eƒi$d*ei%dd+ƒƒƒi&d7ƒZ-eioe-id8ƒneddddddddd.dd9f eƒi.d:ƒƒi&d7ƒZ/eioe/id;ƒneddddddddd.dd<f eƒƒi&d7ƒZ0eioe0id=ƒneddddddddd9f ƒZ1eioe1id>ƒneddddddddd9df ƒi"d&d'd?fd&d'd@fd&d'dAfd&d'dBfƒZ2eioe2idCƒneddddddddd9ddf eƒi$d*ei%d&d+ƒƒƒi&d4ƒZ3eioe3idDƒneddddddddd9dd.f e ƒƒi&d4ƒZ4eioe4idEƒneddddddddd9ddf e ƒƒi&d4ƒZ5eioe5idFƒneddddddddd9dd9f eƒi$d*ei6d.dƒƒi$dGei7dHdfdId.fƒƒi.dƒƒi&d7ƒZ8eioe8idJƒneddddddddd9dd<f eƒi$d*ei%d&d+ƒƒi.dKƒƒi&d7ƒZ9eioe9idLƒneddddddddd9ddf eƒi$d*ei%d&d+ƒƒi.dKƒƒi&d7ƒZ:eioe:idMƒneddddddddd9ddNf eƒi$d*ei%d&d+ƒƒi.dKƒƒi&d7ƒZ;eioe;idOƒneddddddddd9ddPf eƒi.d:ƒƒi&d7ƒZ<eioe<idQƒneddddddddd9ddRf eƒƒi&d7ƒZ=eioe=idSƒneddddddddd<f ƒZ>eddddddddd<df eƒƒi&dTƒZ?eioe?idUƒneddddddddd<d.f ƒZ@eioe@idVƒneddddddddd<d.df ƒi"d&d'dWfd&d'dXfƒZAeioeAidYƒneddddddddd<d.ddf eƒi$d*ei%dd+ƒƒƒi&d4ƒZBeioeBidZƒneddddddddd<d.dd.f eƒƒi&d4ƒZCeioeCid[ƒneddddddddd<d.ddf eƒi$d*ei%d&dƒƒi.dKƒƒi&d7ƒZDeioeDid\ƒneddddddddd<d.dd9f eƒi$d*ei6dd.ƒƒi$dGei7d]dfd^d.fƒƒi.dƒƒi&d7ƒZEeioeEid_ƒneddddddddd<d.dd<f eƒi.d:ƒƒi&d7ƒZFeioeFidQƒneddddddddd<d.ddf eƒƒi&d7ƒZGeioeGid`ƒnedddddddd.fƒZHedddddddd.df ƒZIedddddddd.d.f ƒZJe dddddddd.d.df ƒiKd'dafd'dbfd'dcfd'ddfd'd?fd'defd'dffd'dgfd'dhfd'difd'djfd'dkfd'dlfd'd(fd'dmfƒZLeiMd'dneƒeiMd'doedpe dqe!dre#d(e'dse(dte)d0e+d1e,d?e-dge/dke0due1dve2d@e3dAe4dBe5dfe8dje9dme:dde;dle<dbe=dwe>dee?dxe@dyeAdWeBdXeCdheDdieEdaeFdceGdzeHd{eId|eJƒ$eiMd'd}eLƒd~S((s constraintsnamedvalsASN1sIntegersObjectIdentifiers OctetStringsSNMP-FRAMEWORK-MIBsSnmpAdminStringsSnmpSecurityLevelsSnmpSecurityModels SNMPv2-CONFsModuleCompliances ObjectGroups SNMPv2-SMIsBitss Integer32sModuleIdentitys MibIdentifiers MibScalarsMibTables MibTableRowsMibTableColumns TimeTickss snmpModuless SNMPv2-TCs RowStatuss StorageTypes TestAndIncriiiis2002-10-16 00:00s1999-01-20 00:00s1997-11-20 00:00sSNMPv3 Working Groups¢WG-email: snmpv3@lists.tislabs.com Subscribe: majordomo@lists.tislabs.com In message body: subscribe snmpv3 Co-Chair: Russ Mundy Network Associates Laboratories postal: 15204 Omega Drive, Suite 300 Rockville, MD 20850-4601 USA email: mundy@tislabs.com phone: +1 301-947-7107 Co-Chair: David Harrington Enterasys Networks Postal: 35 Industrial Way P. O. Box 5004 Rochester, New Hampshire 03866-5005 USA EMail: dbh@enterasys.com Phone: +1 603-337-2614 Co-editor: Bert Wijnen Lucent Technologies postal: Schagen 33 3461 GL Linschoten Netherlands email: bwijnen@lucent.com phone: +31-348-480-685 Co-editor: Randy Presuhn BMC Software, Inc. postal: 2141 North First Street San Jose, CA 95131 USA email: randy_presuhn@bmc.com phone: +1 408-546-1006 Co-editor: Keith McCloghrie Cisco Systems, Inc. postal: 170 West Tasman Drive San Jose, CA 95134-1706 USA email: kzm@cisco.com phone: +1-408-526-5260säThe management information definitions for the View-based Access Control Model for SNMP. Copyright (C) The Internet Society (2002). This version of this MIB module is part of RFC 3415; see the RFC itself for full legal notices.sDThe table of locally available contexts. This table provides information to SNMP Command Generator applications so that they can properly configure the vacmAccessTable to control access to all contexts at the SNMP entity. This table may change dynamically if the SNMP entity allows that contexts are added/deleted dynamically (for instance when its configuration changes). Such changes would happen only if the management instrumentation at that SNMP entity recognizes more (or fewer) contexts. The presence of entries in this table and of entries in the vacmAccessTable are independent. That is, a context identified by an entry in this table is not necessarily referenced by any entries in the vacmAccessTable; and the context(s) referenced by an entry in the vacmAccessTable does not necessarily currently exist and thus need not be identified by an entry in this table. This table must be made accessible via the default context so that Command Responder applications have a standard way of retrieving the information. This table is read-only. It cannot be configured via SNMP.isSNMP-VIEW-BASED-ACM-MIBsvacmContextNames'Information about a particular context.s subtypeSpeci sreadonlys˜A human readable name identifying a particular context at a particular SNMP entity. The empty contextName (zero length) represents the default context.isœThis table maps a combination of securityModel and securityName into a groupName which is used to define an access control policy for a group of principals.svacmSecurityModelsvacmSecurityNamesaAn entry in this table maps the combination of a securityModel and securityName into a groupName.lÿÿsnoaccesssŽThe Security Model, by which the vacmSecurityName referenced by this entry is provided. Note, this object may not take the 'any' (0) value.s…The securityName for the principal, represented in a Security Model independent format, which is mapped by this entry to a groupName.s readcreates8The name of the group to which this entry (e.g., the combination of securityModel and securityName) belongs. This groupName is used as index into the vacmAccessTable to select an access control policy. However, a value in this table does not imply that an instance with the value exists in table vacmAccesTable.is nonVolatiles–The storage type for this conceptual row. Conceptual rows having the value 'permanent' need not allow write-access to any columnar objects in the row.is0The status of this conceptual row. Until instances of all corresponding columns are appropriately configured, the value of the corresponding instance of the vacmSecurityToGroupStatus column is 'notReady'. In particular, a newly created row cannot be made active until a value has been set for vacmGroupName. The RowStatus TC [RFC2579] requires that this DESCRIPTION clause states under which circumstances other objects in this row can be modified: The value of this object has no effect on whether other objects in this conceptual row can be modified.sDThe table of access rights for groups. Each entry is indexed by a groupName, a contextPrefix, a securityModel and a securityLevel. To determine whether access is allowed, one entry from this table needs to be selected and the proper viewName from that entry must be used for access control checking. To select the proper entry, follow these steps: 1) the set of possible matches is formed by the intersection of the following sets of entries: the set of entries with identical vacmGroupName the union of these two sets: - the set with identical vacmAccessContextPrefix - the set of entries with vacmAccessContextMatch value of 'prefix' and matching vacmAccessContextPrefix intersected with the union of these two sets: - the set of entries with identical vacmSecurityModel - the set of entries with vacmSecurityModel value of 'any' intersected with the set of entries with vacmAccessSecurityLevel value less than or equal to the requested securityLevel 2) if this set has only one member, we're done otherwise, it comes down to deciding how to weight the preferences between ContextPrefixes, SecurityModels, and SecurityLevels as follows: a) if the subset of entries with securityModel matching the securityModel in the message is not empty, then discard the rest. b) if the subset of entries with vacmAccessContextPrefix matching the contextName in the message is not empty, then discard the rest c) discard all entries with ContextPrefixes shorter than the longest one remaining in the set d) select the entry with the highest securityLevel Please note that for securityLevel noAuthNoPriv, all groups are really equivalent since the assumption that the securityName has been authenticated does not hold.s vacmGroupNamesvacmAccessContextPrefixsvacmAccessSecurityModelsvacmAccessSecurityLevels#An access right configured in the Local Configuration Datastore (LCD) authorizing access to an SNMP context. Entries in this table can use an instance value for object vacmGroupName even if no entry in table vacmAccessSecurityToGroupTable has a corresponding value for object vacmGroupName.sIn order to gain the access rights allowed by this conceptual row, a contextName must match exactly (if the value of vacmAccessContextMatch is 'exact') or partially (if the value of vacmAccessContextMatch is 'prefix') to the value of the instance of this object.seIn order to gain the access rights allowed by this conceptual row, this securityModel must be in use.ssThe minimum level of security required in order to gain the access rights allowed by this conceptual row. A securityLevel of noAuthNoPriv is less than authNoPriv which in turn is less than authPriv. If multiple entries are equally indexed except for this vacmAccessSecurityLevel index, then the entry which has the highest value for vacmAccessSecurityLevel is selected.s namedValuessexactsprefixsIIf the value of this object is exact(1), then all rows where the contextName exactly matches vacmAccessContextPrefix are selected. If the value of this object is prefix(2), then all rows where the contextName whose starting octets exactly match vacmAccessContextPrefix are selected. This allows for a simple form of wildcarding.ss˜The value of an instance of this object identifies the MIB view of the SNMP context to which this conceptual row authorizes read access. The identified MIB view is that one for which the vacmViewTreeFamilyViewName has the same value as the instance of this object; if the value is the empty string or if there is no active MIB view having this value of vacmViewTreeFamilyViewName, then no access is granted.s™The value of an instance of this object identifies the MIB view of the SNMP context to which this conceptual row authorizes write access. The identified MIB view is that one for which the vacmViewTreeFamilyViewName has the same value as the instance of this object; if the value is the empty string or if there is no active MIB view having this value of vacmViewTreeFamilyViewName, then no access is granted.is¥The value of an instance of this object identifies the MIB view of the SNMP context to which this conceptual row authorizes access for notifications. The identified MIB view is that one for which the vacmViewTreeFamilyViewName has the same value as the instance of this object; if the value is the empty string or if there is no active MIB view having this value of vacmViewTreeFamilyViewName, then no access is granted.is—The storage type for this conceptual row. Conceptual rows having the value 'permanent' need not allow write-access to any columnar objects in the row.i sThe status of this conceptual row. The RowStatus TC [RFC2579] requires that this DESCRIPTION clause states under which circumstances other objects in this row can be modified: The value of this object has no effect on whether other objects in this conceptual row can be modified.s readwrites_An advisory lock used to allow cooperating SNMP Command Generator applications to coordinate their use of the Set operation in creating or modifying views. When creating a new view or altering an existing view, it is important to understand the potential interactions with other uses of the view. The vacmViewSpinLock should be retrieved. The name of the view to be created should be determined to be unique by the SNMP Command Generator application by consulting the vacmViewTreeFamilyTable. Finally, the named view may be created (Set), including the advisory lock. If another SNMP Command Generator application has altered the views in the meantime, then the spin lock's value will have changed, and so this creation will fail because it will specify the wrong value for the spin lock. Since this is an advisory lock, the use of this lock is not enforced.sŒ Locally held information about families of subtrees within MIB views. Each MIB view is defined by two sets of view subtrees: - the included view subtrees, and - the excluded view subtrees. Every such view subtree, both the included and the excluded ones, is defined in this table. To determine if a particular object instance is in a particular MIB view, compare the object instance's OBJECT IDENTIFIER with each of the MIB view's active entries in this table. If none match, then the object instance is not in the MIB view. If one or more match, then the object instance is included in, or excluded from, the MIB view according to the value of vacmViewTreeFamilyType in the entry whose value of vacmViewTreeFamilySubtree has the most sub-identifiers. If multiple entries match and have the same number of sub-identifiers (when wildcarding is specified with the value of vacmViewTreeFamilyMask), then the lexicographically greatest instance of vacmViewTreeFamilyType determines the inclusion or exclusion. An object instance's OBJECT IDENTIFIER X matches an active entry in this table when the number of sub-identifiers in X is at least as many as in the value of vacmViewTreeFamilySubtree for the entry, and each sub-identifier in the value of vacmViewTreeFamilySubtree matches its corresponding sub-identifier in X. Two sub-identifiers match either if the corresponding bit of the value of vacmViewTreeFamilyMask for the entry is zero (the 'wild card' value), or if they are equal. A 'family' of subtrees is the set of subtrees defined by a particular combination of values of vacmViewTreeFamilySubtree and vacmViewTreeFamilyMask. In the case where no 'wild card' is defined in the vacmViewTreeFamilyMask, the family of subtrees reduces to a single subtree. When creating or changing MIB views, an SNMP Command Generator application should utilize the vacmViewSpinLock to try to avoid collisions. See DESCRIPTION clause of vacmViewSpinLock. When creating MIB views, it is strongly advised that first the 'excluded' vacmViewTreeFamilyEntries are created and then the 'included' entries. When deleting MIB views, it is strongly advised that first the 'included' vacmViewTreeFamilyEntries are deleted and then the 'excluded' entries. If a create for an entry for instance-level access control is received and the implementation does not support instance-level granularity, then an inconsistentName error must be returned.svacmViewTreeFamilyViewNamesvacmViewTreeFamilySubtreesÜInformation on a particular family of view subtrees included in or excluded from a particular SNMP context's MIB view. Implementations must not restrict the number of families of view subtrees for a given MIB view, except as dictated by resource constraints on the overall number of entries in the vacmViewTreeFamilyTable. If no conceptual rows exist in this table for a given MIB view (viewName), that view may be thought of as consisting of the empty set of view subtrees.s6The human readable name for a family of view subtrees.s€The MIB subtree which when combined with the corresponding instance of vacmViewTreeFamilyMask defines a family of view subtrees.sThe bit mask which, in combination with the corresponding instance of vacmViewTreeFamilySubtree, defines a family of view subtrees. Each bit of this bit mask corresponds to a sub-identifier of vacmViewTreeFamilySubtree, with the most significant bit of the i-th octet of this octet string value (extended if necessary, see below) corresponding to the (8*i - 7)-th sub-identifier, and the least significant bit of the i-th octet of this octet string corresponding to the (8*i)-th sub-identifier, where i is in the range 1 through 16. Each bit of this bit mask specifies whether or not the corresponding sub-identifiers must match when determining if an OBJECT IDENTIFIER is in this family of view subtrees; a '1' indicates that an exact match must occur; a '0' indicates 'wild card', i.e., any sub-identifier value matches. Thus, the OBJECT IDENTIFIER X of an object instance is contained in a family of view subtrees if, for each sub-identifier of the value of vacmViewTreeFamilySubtree, either: the i-th bit of vacmViewTreeFamilyMask is 0, or the i-th sub-identifier of X is equal to the i-th sub-identifier of the value of vacmViewTreeFamilySubtree. If the value of this bit mask is M bits long and there are more than M sub-identifiers in the corresponding instance of vacmViewTreeFamilySubtree, then the bit mask is extended with 1's to be the required length. Note that when the value of this object is the zero-length string, this extension rule results in a mask of all-1's being used (i.e., no 'wild card'), and the family of view subtrees is the one view subtree uniquely identified by the corresponding instance of vacmViewTreeFamilySubtree. Note that masks of length greater than zero length do not need to be supported. In this case this object is made read-only.sincludedsexcludedsºIndicates whether the corresponding instances of vacmViewTreeFamilySubtree and vacmViewTreeFamilyMask define a family of view subtrees which is included in or excluded from the MIB view.sThe status of this conceptual row. The RowStatus TC [RFC2579] requires that this DESCRIPTION clause states under which circumstances other objects in this row can be modified: The value of this object has no effect on whether other objects in this conceptual row can be modified.svacmViewTreeFamilyStorageTypesvacmAccessStatussvacmViewTreeFamilyStatussvacmAccessNotifyViewNamesvacmViewSpinLocksvacmAccessContextMatchsvacmSecurityToGroupStorageTypesvacmViewTreeFamilyMasksvacmViewTreeFamilyTypesvacmAccessReadViewNamesvacmSecurityToGroupStatussvacmAccessStorageTypesvacmAccessWriteViewNamesPYSNMP_MODULE_IDs snmpVacmMIBsvacmMIBObjectssvacmContextTablesvacmContextEntrysvacmSecurityToGroupTablesvacmSecurityToGroupEntrysvacmAccessTablesvacmAccessEntrys vacmMIBViewssvacmViewTreeFamilyTablesvacmViewTreeFamilyEntrysvacmMIBConformancesvacmMIBCompliancess vacmMIBGroupssvacmBasicGroupN(Ns pyasn1.types constraintsnamedvals mibBuilders importSymbolssIntegersObjectIdentifiers OctetStringsSnmpAdminStringsSnmpSecurityLevelsSnmpSecurityModelsModuleCompliances ObjectGroupsBitss Integer32sModuleIdentitys MibIdentifiers MibScalarsMibTables MibTableRowsMibTableColumns TimeTickss snmpModuless RowStatuss StorageTypes TestAndIncrs setRevisionss snmpVacmMIBs loadTextsssetOrganizationssetContactInfossetDescriptionsvacmMIBObjectssvacmContextTables setIndexNamessvacmContextEntryssubtypesValueSizeConstraints setMaxAccesssvacmContextNamesvacmSecurityToGroupTablesvacmSecurityToGroupEntrysValueRangeConstraintsvacmSecurityModelsvacmSecurityNames vacmGroupNamesclonesvacmSecurityToGroupStorageTypesvacmSecurityToGroupStatussvacmAccessTablesvacmAccessEntrysvacmAccessContextPrefixsvacmAccessSecurityModelsvacmAccessSecurityLevelsSingleValueConstraints NamedValuessvacmAccessContextMatchsvacmAccessReadViewNamesvacmAccessWriteViewNamesvacmAccessNotifyViewNamesvacmAccessStorageTypesvacmAccessStatuss vacmMIBViewssvacmViewSpinLocksvacmViewTreeFamilyTablesvacmViewTreeFamilyEntrysvacmViewTreeFamilyViewNamesvacmViewTreeFamilySubtreesvacmViewTreeFamilyMasksvacmViewTreeFamilyTypesvacmViewTreeFamilyStorageTypesvacmViewTreeFamilyStatussvacmMIBConformancesvacmMIBCompliancess vacmMIBGroupss setObjectssvacmBasicGroups exportSymbols(<sSnmpAdminStringsvacmAccessStatussvacmAccessSecurityLevels MibScalarsvacmAccessContextPrefixsvacmSecurityToGroupEntrys TimeTickss vacmGroupNames vacmMIBViewssModuleIdentitysvacmViewTreeFamilyTables snmpModulessBitssvacmSecurityToGroupTablesvacmAccessWriteViewNames ObjectGroupsvacmSecurityToGroupStorageTypesMibTableColumnsvacmAccessSecurityModelsSnmpSecurityModelsModuleCompliancesvacmAccessContextMatchsMibTablesvacmMIBObjectss snmpVacmMIBsvacmViewTreeFamilyMasks RowStatussvacmViewSpinLocksObjectIdentifiersvacmViewTreeFamilySubtreesnamedvalsvacmBasicGroups OctetStringsvacmViewTreeFamilyStorageTypes MibTableRowsvacmAccessEntrysvacmViewTreeFamilyEntrysvacmAccessReadViewNamesvacmViewTreeFamilyTypesvacmAccessTablesvacmMIBCompliancess TestAndIncrsvacmMIBConformancesIntegersvacmViewTreeFamilyViewNamesvacmContextTablesvacmContextNames Integer32s vacmMIBGroupss constraints StorageTypesvacmSecurityNamesvacmViewTreeFamilyStatussvacmSecurityToGroupStatussvacmAccessNotifyViewNames MibIdentifiersSnmpSecurityLevelsvacmAccessStorageTypesvacmContextEntrysvacmSecurityModel((sEbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-VIEW-BASED-ACM-MIB.pys?sÞ!!K!3   $' < T ' H T T T E < ' ` T < <  ] ] ] E < '9 * K W ? ` „ H ? $''·åPKà©z:ØË !!pysnmp/smi/mibs/SNMP-MPD-MIB.py# PySNMP SMI module. Autogenerated from smidump -f python SNMP-MPD-MIB # by libsmi2pysnmp-0.0.9-alpha at Thu Mar 26 20:58:11 2009, # Python version (2, 4, 4, 'final', 0) # Imported just in case new ASN.1 types would be created from pyasn1.type import constraint, namedval # Imports ( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") ( ModuleCompliance, ObjectGroup, ) = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup") ( Bits, Counter32, Integer32, ModuleIdentity, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, snmpModules, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "Counter32", "Integer32", "ModuleIdentity", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "snmpModules") # Objects snmpMPDMIB = ModuleIdentity((1, 3, 6, 1, 6, 3, 11)).setRevisions(("2002-10-14 00:00","1999-05-04 16:36","1997-09-30 00:00",)) if mibBuilder.loadTexts: snmpMPDMIB.setOrganization("SNMPv3 Working Group") if mibBuilder.loadTexts: snmpMPDMIB.setContactInfo("WG-EMail: snmpv3@lists.tislabs.com\nSubscribe: snmpv3-request@lists.tislabs.com\n\nCo-Chair: Russ Mundy\n Network Associates Laboratories\npostal: 15204 Omega Drive, Suite 300\n Rockville, MD 20850-4601\n USA\n\n\n\nEMail: mundy@tislabs.com\nphone: +1 301-947-7107\n\nCo-Chair &\nCo-editor: David Harrington\n Enterasys Networks\npostal: 35 Industrial Way\n P. O. Box 5005\n Rochester NH 03866-5005\n USA\nEMail: dbh@enterasys.com\nphone: +1 603-337-2614\n\nCo-editor: Jeffrey Case\n SNMP Research, Inc.\npostal: 3001 Kimberlin Heights Road\n Knoxville, TN 37920-9716\n USA\nEMail: case@snmp.com\nphone: +1 423-573-1434\n\nCo-editor: Randy Presuhn\n BMC Software, Inc.\npostal: 2141 North First Street\n San Jose, CA 95131\n USA\nEMail: randy_presuhn@bmc.com\nphone: +1 408-546-1006\n\nCo-editor: Bert Wijnen\n Lucent Technologies\npostal: Schagen 33\n 3461 GL Linschoten\n Netherlands\nEMail: bwijnen@lucent.com\nphone: +31 348-680-485") if mibBuilder.loadTexts: snmpMPDMIB.setDescription("The MIB for Message Processing and Dispatching\n\nCopyright (C) The Internet Society (2002). This\nversion of this MIB module is part of RFC 3412;\nsee the RFC itself for full legal notices.") snmpMPDAdmin = MibIdentifier((1, 3, 6, 1, 6, 3, 11, 1)) snmpMPDMIBObjects = MibIdentifier((1, 3, 6, 1, 6, 3, 11, 2)) snmpMPDStats = MibIdentifier((1, 3, 6, 1, 6, 3, 11, 2, 1)) snmpUnknownSecurityModels = MibScalar((1, 3, 6, 1, 6, 3, 11, 2, 1, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpUnknownSecurityModels.setDescription("The total number of packets received by the SNMP\nengine which were dropped because they referenced a\nsecurityModel that was not known to or supported by\nthe SNMP engine.") snmpInvalidMsgs = MibScalar((1, 3, 6, 1, 6, 3, 11, 2, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInvalidMsgs.setDescription("The total number of packets received by the SNMP\nengine which were dropped because there were invalid\nor inconsistent components in the SNMP message.") snmpUnknownPDUHandlers = MibScalar((1, 3, 6, 1, 6, 3, 11, 2, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpUnknownPDUHandlers.setDescription("The total number of packets received by the SNMP\nengine which were dropped because the PDU contained\nin the packet could not be passed to an application\nresponsible for handling the pduType, e.g. no SNMP\napplication had registered for the proper\ncombination of the contextEngineID and the pduType.") snmpMPDMIBConformance = MibIdentifier((1, 3, 6, 1, 6, 3, 11, 3)) snmpMPDMIBCompliances = MibIdentifier((1, 3, 6, 1, 6, 3, 11, 3, 1)) snmpMPDMIBGroups = MibIdentifier((1, 3, 6, 1, 6, 3, 11, 3, 2)) # Augmentions # Groups snmpMPDGroup = ObjectGroup((1, 3, 6, 1, 6, 3, 11, 3, 2, 1)).setObjects(("SNMP-MPD-MIB", "snmpInvalidMsgs"), ("SNMP-MPD-MIB", "snmpUnknownPDUHandlers"), ("SNMP-MPD-MIB", "snmpUnknownSecurityModels"), ) # Exports # Module identity mibBuilder.exportSymbols("SNMP-MPD-MIB", PYSNMP_MODULE_ID=snmpMPDMIB) # Objects mibBuilder.exportSymbols("SNMP-MPD-MIB", snmpMPDMIB=snmpMPDMIB, snmpMPDAdmin=snmpMPDAdmin, snmpMPDMIBObjects=snmpMPDMIBObjects, snmpMPDStats=snmpMPDStats, snmpUnknownSecurityModels=snmpUnknownSecurityModels, snmpInvalidMsgs=snmpInvalidMsgs, snmpUnknownPDUHandlers=snmpUnknownPDUHandlers, snmpMPDMIBConformance=snmpMPDMIBConformance, snmpMPDMIBCompliances=snmpMPDMIBCompliances, snmpMPDMIBGroups=snmpMPDMIBGroups) # Groups mibBuilder.exportSymbols("SNMP-MPD-MIB", snmpMPDGroup=snmpMPDGroup) PK0€G6§Ü¡¦s1s1pysnmp/smi/mibs/SNMPv2-TC.pyfrom string import split, digits from pysnmp.smi import error from pyasn1.type import constraint, namedval from pysnmp import debug OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols( 'ASN1', 'OctetString', 'Integer', 'ObjectIdentifier' ) Counter32, Unsigned32, TimeTicks, Counter64 = mibBuilder.importSymbols( 'SNMPv2-SMI', 'Counter32', 'Unsigned32', 'TimeTicks', 'Counter64' ) class TextualConvention: displayHint = '' status = 'current' description = '' reference = '' bits = () __integer = Integer() __counter32 = Counter32() __unsigned32 = Unsigned32() __timeticks = TimeTicks() __counter64 = Counter64() __octetString = OctetString() __objectIdentifier = ObjectIdentifier() def getDisplayHint(self): return self.displayHint def getStatus(self): return self.status def getDescription(self): return self.description def getReference(self): return self.reference def prettyOut(self, value): # override asn1 type method """Implements DISPLAY-HINT evaluation""" if self.displayHint and ( self.__integer.isSuperTypeOf(self) or self.__unsigned32.isSuperTypeOf(self) or self.__timeticks.isSuperTypeOf(self) or self.__counter32.isSuperTypeOf(self) or self.__counter64.isSuperTypeOf(self) ): t, f = apply(lambda t, f=0: (t, f), split(self.displayHint, '-')) if t == 'x': return '0x%x' % value elif t == 'd': try: return '%.*f' % (int(f), float(value)/pow(10, int(f))) except StandardError, why: raise error.SmiError( 'float num evaluation error: %s' % why ) elif t == 'o': return '0%o' % value elif t == 'b': v = value; r = ['B'] while v: r.insert(0, '%d' % (v&0x01)) v = v>>1 return join(r, '') else: raise error.SmiError( 'Unsupported numeric type spec: %s' % t ) elif self.displayHint and self.__octetString.isSuperTypeOf(self): r = '' v = str(value) d = self.displayHint while v and d: # 1 if d[0] == '*': repeatIndicator = repeatCount = int(v[0]) d = d[1:]; v = v[1:] else: repeatCount = 1; repeatIndicator = None # 2 octetLength = '' while d and d[0] in digits: octetLength = octetLength + d[0] d = d[1:] try: octetLength = int(octetLength) except StandardError, why: raise error.SmiError( 'Bad octet length: %s' % octetLength ) if not d: raise error.SmiError( 'Short octet length: %s' % self.displayHint ) # 3 displayFormat = d[0] d = d[1:] # 4 if d and d[0] not in digits and d[0] != '*': displaySep = d[0] d = d[1:] else: displaySep = '' # 5 if d and displaySep and repeatIndicator is not None: repeatTerminator = d[0] displaySep = '' d = d[1:] else: repeatTerminator = None while repeatCount: repeatCount = repeatCount - 1 # 't' stands for UTF-8, does it need any special support? if displayFormat == 'a' or displayFormat == 't': r = r + v[:octetLength] elif displayFormat in ('x', 'd', 'o'): n = 0L; vv = v[:octetLength] while vv: n = n << 8 try: n = n | ord(vv[0]) vv = vv[1:] except StandardError, why: raise error.SmiError( 'Display format eval failure: %s: %s' % (vv, why) ) if displayFormat == 'x': r = r + '%02x' % n elif displayFormat == 'o': r = r + '%03o' % n else: r = r + '%d' % n else: raise error.SmiError( 'Unsupported display format char: %s' % \ displayFormat ) if v and repeatTerminator: r = r + repeatTerminator v = v[octetLength:] if v and displaySep: r = r + displaySep if not d: d = self.displayHint # if d: # raise error.SmiError( # 'Unparsed display hint left: %s' % d # ) return r elif self.displayHint and self.__objectIdentifier.isSuperTypeOf(self): return str(value) else: return str(value) # elif self.bits: # try: # return self.bits[value] # except StandardError, why: # raise error.SmiError( # 'Enumeratin resolution failure for %s: %s' % (self, why) # ) # XXX # def prettyIn(self, value): # # XXX parse TC syntax # return str(value) class DisplayString(TextualConvention, OctetString): subtypeSpec = OctetString.subtypeSpec+constraint.ValueSizeConstraint(0,255) displayHint = "255a" class PhysAddress(TextualConvention, OctetString): displayHint = "1x:" class MacAddress(TextualConvention, OctetString): subtypeSpec = OctetString.subtypeSpec+constraint.ValueSizeConstraint(6,6) displayHint = "1x:" fixedLength = 6 class TruthValue(Integer, TextualConvention): subtypeSpec = Integer.subtypeSpec+constraint.SingleValueConstraint(1, 2) namedValues = namedval.NamedValues(('true', 1), ('false', 2)) class TestAndIncr(Integer, TextualConvention): subtypeSpec = Integer.subtypeSpec+constraint.ValueRangeConstraint(0, 2147483647L) defaultValue = 0 def smiWrite(self, name, value, idx): if value != self: raise error.InconsistentValueError(idx=idx, name=name) value = value + 1 if value > 2147483646: value = 0 return self.clone(value) class AutonomousType(ObjectIdentifier, TextualConvention): pass class InstancePointer(ObjectIdentifier, TextualConvention): status = 'obsolete' class VariablePointer(ObjectIdentifier, TextualConvention): pass class RowPointer(ObjectIdentifier, TextualConvention): pass class RowStatus(Integer, TextualConvention): """A special kind of scalar MIB variable responsible for MIB table row creation/destruction. """ subtypeSpec = Integer.subtypeSpec+constraint.SingleValueConstraint(0, 1, 2, 3, 4, 5, 6) namedValues = namedval.NamedValues( ('notExists', 0), ('active', 1), ('notInService', 2), ('notReady', 3), ('createAndGo', 4), ('createAndWait', 5), ('destroy', 6) ) # Known row states stNotExists, stActive, stNotInService, stNotReady, \ stCreateAndGo, stCreateAndWait, stDestroy = range(7) # States transition matrix (see RFC-1903) stateMatrix = { # (new-state, current-state) -> (error, new-state) ( stCreateAndGo, stNotExists ): ( error.RowCreationWanted, stActive ), ( stCreateAndGo, stNotReady ): ( error.InconsistentValueError, stNotReady ), ( stCreateAndGo, stNotInService ): ( error.InconsistentValueError, stNotInService ), ( stCreateAndGo, stActive ): ( error.InconsistentValueError, stActive ), # ( stCreateAndWait, stNotExists ): ( error.RowCreationWanted, stActive ), ( stCreateAndWait, stNotReady ): ( error.InconsistentValueError, stNotReady ), ( stCreateAndWait, stNotInService ): ( error.InconsistentValueError, stNotInService ), ( stCreateAndWait, stActive ): ( error.InconsistentValueError, stActive ), # ( stActive, stNotExists ): ( error.InconsistentValueError, stNotExists ), ( stActive, stNotReady ): ( error.InconsistentValueError, stNotReady ), ( stActive, stNotInService ): ( None, stActive ), ( stActive, stActive ): ( None, stActive ), # ( stNotInService, stNotExists ): ( error.InconsistentValueError, stNotExists ), ( stNotInService, stNotReady ): ( error.InconsistentValueError, stNotReady ), ( stNotInService, stNotInService ): ( None, stNotInService ), ( stNotInService, stActive ): ( None, stActive ), # ( stDestroy, stNotExists ): ( error.RowDestructionWanted, stNotExists ), ( stDestroy, stNotReady ): ( error.RowDestructionWanted, stNotExists ), ( stDestroy, stNotInService ): ( error.RowDestructionWanted, stNotExists ), ( stDestroy, stActive ): ( error.RowDestructionWanted, stNotExists ), # This is used on instantiation ( stNotExists, stNotExists ): ( None, stNotExists ) } defaultValue = stNotExists pendingError = None def smiWrite(self, name, value, idx): # Run through states transition matrix, resolve new instance value err, val = self.stateMatrix.get( (self.clone(value), int(self)), (error.MibOperationError, None) ) debug.logger & debug.flagIns and debug.logger('RowStatus state resolution: %s, %s -> %s, %s' % (value, int(self), err, val)) if val is None: val = self else: val = self.clone(val) if err is not None: err = err( msg='Exception at row state transition %s->%s' % (self, value), idx=idx ) val.smiSetPendingError(err) return val def smiCreate(self, name, value, idx): return self.smiWrite(name, value, idx) def smiRaisePendingError(self): if self.pendingError: err, self.pendingError = self.pendingError, None raise err def smiSetPendingError(self, err): self.pendingError = err class TimeStamp(TimeTicks, TextualConvention): pass class TimeInterval(Integer, TextualConvention): subtypeSpec = Integer.subtypeSpec+constraint.ValueRangeConstraint(0, 2147483647L) class DateAndTime(TextualConvention, OctetString): subtypeSpec = OctetString.subtypeSpec+constraint.ValueSizeConstraint(8, 11) displayHint = "2d-1d-1d,1d:1d:1d.1d,1a1d:1d" class StorageType(Integer, TextualConvention): subtypeSpec = Integer.subtypeSpec+constraint.SingleValueConstraint(1, 2, 3, 4, 5) namedValues = namedval.NamedValues( ('other', 1), ('volatile', 2), ('nonVolatile', 3), ('permanent', 4), ('readOnly', 5) ) class TDomain(ObjectIdentifier, TextualConvention): pass class TAddress(OctetString, TextualConvention): subtypeSpec = OctetString.subtypeSpec+constraint.ValueSizeConstraint(1, 255) mibBuilder.exportSymbols( 'SNMPv2-TC', TextualConvention=TextualConvention, DisplayString=DisplayString, PhysAddress=PhysAddress, MacAddress=MacAddress, TruthValue=TruthValue, TestAndIncr=TestAndIncr, AutonomousType=AutonomousType, InstancePointer=InstancePointer, VariablePointer=VariablePointer, RowPointer=RowPointer, RowStatus=RowStatus, TimeStamp=TimeStamp, TimeInterval=TimeInterval, DateAndTime=DateAndTime, StorageType=StorageType, TDomain=TDomain, TAddress=TAddress ) PKÓ~=v5ȯ¯pysnmp/smi/mibs/SNMPv2-CONF.pyMibNode, = mibBuilder.importSymbols('SNMPv2-SMI', 'MibNode') class ObjectGroup(MibNode): def getObjects(self): return getattr(self, 'objects', ()) def setObjects(self, *args): self.objects = args return self def getDescription(self): return getattr(self, 'description', '') def setDescription(self, v): self.description = v return self def asn1Print(self): return '\ OBJECT-GROUP\n\ OBJECTS { %s }\n\ DESCRIPTION \"%s\"\ ' % (reduce(lambda x,y: '%s, %s' % (x[1],y[1]), self.getObjects(), ("","")), self.getDescription()) class NotificationGroup(MibNode): def getObjects(self): return getattr(self, 'objects', ()) def setObjects(self, *args): self.objects = args return self def getDescription(self): return getattr(self, 'description', '') def setDescription(self, v): self.description = v return self def asn1Print(self): return '\ NOTIFICATION-GROUP\n\ NOTIFICATIONS { %s }\n\ DESCRIPTION \"%s\"\ ' % (reduce(lambda x,y: '%s, %s' % (x[1],y[1]), self.getObjects(), ("","")), self.getDescription()) class ModuleCompliance(MibNode): def getObjects(self): return getattr(self, 'objects', ()) def setObjects(self, *args): self.objects = args return self def getDescription(self): return getattr(self, 'description', '') def setDescription(self, v): self.description = v return self def asn1Print(self): return '\ MODULE-COMPLIANCE\n\ OBJECT { %s } \n\ DESCRIPTION \"%s\"\n\ ' % (reduce(lambda x,y: '%s, %s' % (x[1],y[1]), self.getObjects(), ("","")), self.getDescription()) class AgentCapabilities(MibNode): def getDescription(self): return getattr(self, 'description', '') def setDescription(self, v): self.description = v return self def asn1Print(self): return '\ AGENT-CAPABILITIES\n\ DESCRIPTION \"%s\"\n\ ' % self.getDescription() mibBuilder.exportSymbols('SNMPv2-CONF', ObjectGroup=ObjectGroup, NotificationGroup=NotificationGroup, ModuleCompliance=ModuleCompliance, AgentCapabilities=AgentCapabilities) PK†£=‰¯G¸¬7¬7)pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.pyc;ò ±LKc&@sdkZdkZdklZlZeiddddƒ\ZZZ eidddd d d d d ƒ\Z Z Z Z ZZZeiddƒ\Zde fd„ƒYZdee fd„ƒYZdee fd„ƒYZdee fd„ƒYZdee fd„ƒYZdee fd„ƒYZdee fd„ƒYZdefd„ƒYZd efd!„ƒYZe d"d#d$d"d%d"d&fƒid'fƒZeioeid(ƒneioeid)ƒneioei d*ƒne d"d#d$d"d%d"d&d"fƒZ!ed"d#d$d"d%d"d&d"d"f ƒZ"eioe"i d+ƒned"d#d$d"d%d"d&d"d%f ƒZ#eioe#i d,ƒned"d#d$d"d%d"d&d"d#f ƒZ$eioe$i d-ƒned"d#d$d"d%d"d&d"d.f ƒZ%eioe%i d/ƒned"d#d$d"d%d"d&d"d0f ƒZ&eioe&i d1ƒned"d#d$d"d%d"d&d"d$f ƒZ'eioe'i d2ƒned"d#d$d"d%d"d&d"d3f ƒZ(eioe(i d4ƒned"d#d$d"d%d"d&d"d5f ƒZ)eioe)i d6ƒned"d#d$d"d%d"d&d"d7f ƒZ*eioe*i d8ƒned"d#d$d"d%d"d&d"d9f ƒZ+eioe+i d:ƒned"d#d$d"d%d"d&d"d;f ƒZ,eioe,i d<ƒned"d#d$d"d%d"d&d"d=f ƒZ-eioe-i d>ƒned"d#d$d"d%d"d&d"d?f ƒZ.eioe.i d@ƒned"d#d$d"d%d"d&d"dAf ƒZ/eioe/i dBƒned"d#d$d"d%d"d&d"dCf ƒZ0eioe0i dDƒned"d#d$d"d%d"d&d"dEf ƒZ1eioe1i dFƒnei2dGdHeƒei2dGdedededededededed eƒ ei2dGdIedJe!dKe"dLe#dMe$dNe%dOe&dPe'dQe(dRe)dSe*dTe+dUe,dVe-dWe.dXe/dYe0dZe1ƒdS([N(s constraintsnamedvalsASN1sIntegersObjectIdentifiers OctetStrings SNMPv2-SMIsBitss Integer32sModuleIdentitys MibIdentifiersObjectIdentitys TimeTickssmib-2s SNMPv2-TCsTextualConventionsTransportAddresscBs!tZeieiddƒZRS(Niiÿ(s__name__s __module__s OctetStrings subtypeSpecs constraintsValueSizeConstraint(((sCbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.pysTransportAddressssTransportAddressDnscBs'tZdZeieiddƒZRS(Ns1aiiÿ(s__name__s __module__s displayHints OctetStrings subtypeSpecs constraintsValueSizeConstraint(((sCbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.pysTransportAddressDnsssTransportAddressIPv4cBs?tZdZeieiddƒZdZd„Zd„Z RS(Ns1d.1d.1d.1d:2dicCs‚t|ƒtijoXtd„td„ti|ddƒƒƒt|dd?d@ƒt|dd@ƒSnt i ||ƒSdS(NcCs||S(N(sxsy(sxsy((sCbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.pys#scCstti|ƒƒS(N(schrsstringsatoisx(sx((sCbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.pys#sis.iiiÿ( stypesvaluestypess TupleTypesreducesmapsstringssplitschrs OctetStringsprettyInsself(sselfsvalue((sCbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.pysprettyIn!sXcCszt|dƒ oZtitd„|id ƒdƒt|idd!ƒd>t|idd!ƒBf|_n|i|SdS(Ns __tuple_valuecCstt|ƒƒS(N(sstrsordsx(sx((sCbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.pys+sis.iii( shasattrsselfsstringsjoinsmaps_valuesords"_TransportAddressIPv4__tuple_valuesi(sselfsi((sCbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.pys __getitem__(sZ( s__name__s __module__s displayHints OctetStrings subtypeSpecs constraintsValueSizeConstraints fixedLengthsprettyIns __getitem__(((sCbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.pysTransportAddressIPv4s  sTransportAddressIPv4zcBs-tZdZeieiddƒZdZRS(Ns1d.1d.1d.1d%4d:2di (s__name__s __module__s displayHints OctetStrings subtypeSpecs constraintsValueSizeConstraints fixedLength(((sCbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.pysTransportAddressIPv4z0ssTransportAddressIPv6cBs?tZdZeieiddƒZdZd„Zd„Z RS(Ns 0a[2x:2x:2x:2x:2x:2x:2x:2x]0a:2dicCsmt|ƒtijoCtiti|dƒt|dd?d@ƒt|dd@ƒSnti ||ƒSdS(Niiiiÿ( stypesvaluestypess TupleTypessockets inet_ptonsAF_INET6schrs OctetStringsprettyInsself(sselfsvalue((sCbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.pysprettyIn;sCcCswt|dƒ oWtiti|id ƒt|idd!ƒd>t|idd!ƒBddf|_n|i|SdS(Ns __tuple_valueiiiii( shasattrsselfssockets inet_ntopsAF_INET6s_valuesords"_TransportAddressIPv6__tuple_valuesi(sselfsi((sCbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.pys __getitem__BsW( s__name__s __module__s displayHints OctetStrings subtypeSpecs constraintsValueSizeConstraints fixedLengthsprettyIns __getitem__(((sCbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.pysTransportAddressIPv66s  sTransportAddressIPv6zcBs-tZdZeieiddƒZdZRS(Ns#0a[2x:2x:2x:2x:2x:2x:2x:2x%4d]0a:2di(s__name__s __module__s displayHints OctetStrings subtypeSpecs constraintsValueSizeConstraints fixedLength(((sCbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.pysTransportAddressIPv6zKssTransportAddressLocalcBs'tZdZeieiddƒZRS(Ns1aiiÿ(s__name__s __module__s displayHints OctetStrings subtypeSpecs constraintsValueSizeConstraint(((sCbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.pysTransportAddressLocalQssTransportAddressTypecBsótZeieiddddddddd d d d d ddddƒZeiddfddfddfdd fddfddfddfdd fdd fddfdd fdd fddfddfd dfd!dfd"dfƒZRS(#Ni i iiiiiii iiiii iii sunknownsudpIpv4ssctpIpv6s sctpIpv4zs sctpIpv6zslocalsudpDnsstcpDnsssctpDnssudpIpv6sudpIpv4zsudpIpv6zstcpIpv4stcpIpv6stcpIpv4zstcpIpv6zssctpIpv4( s__name__s __module__sIntegers subtypeSpecs constraintsSingleValueConstraintsnamedvals NamedValuess namedValues(((sCbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.pysTransportAddressTypeVsF¥sTransportDomaincBstZRS(N(s__name__s __module__(((sCbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.pysTransportDomain[siiiiids2002-11-01 00:00s#IETF Operations and Management Areas¼Juergen Schoenwaelder (Editor) TU Braunschweig Bueltenweg 74/75 38106 Braunschweig, Germany Phone: +49 531 391-3289 EMail: schoenw@ibr.cs.tu-bs.de Send comments to .sÑThis MIB module provides commonly used transport address definitions. Copyright (C) The Internet Society (2002). This version of this MIB module is part of RFC 3419; see the RFC itself for full legal notices.sƒThe UDP over IPv4 transport domain. The corresponding transport address is of type TransportAddressIPv4 for global IPv4 addresses.sƒThe UDP over IPv6 transport domain. The corresponding transport address is of type TransportAddressIPv6 for global IPv6 addresses.s–The UDP over IPv4 transport domain. The corresponding transport address is of type TransportAddressIPv4z for scoped IPv4 addresses with a zone index.is–The UDP over IPv6 transport domain. The corresponding transport address is of type TransportAddressIPv6z for scoped IPv6 addresses with a zone index.isƒThe TCP over IPv4 transport domain. The corresponding transport address is of type TransportAddressIPv4 for global IPv4 addresses.sƒThe TCP over IPv6 transport domain. The corresponding transport address is of type TransportAddressIPv6 for global IPv6 addresses.is–The TCP over IPv4 transport domain. The corresponding transport address is of type TransportAddressIPv4z for scoped IPv4 addresses with a zone index.is–The TCP over IPv6 transport domain. The corresponding transport address is of type TransportAddressIPv6z for scoped IPv6 addresses with a zone index.i sßThe SCTP over IPv4 transport domain. The corresponding transport address is of type TransportAddressIPv4 for global IPv4 addresses. This transport domain usually represents the primary address on multihomed SCTP endpoints.i sßThe SCTP over IPv6 transport domain. The corresponding transport address is of type TransportAddressIPv6 for global IPv6 addresses. This transport domain usually represents the primary address on multihomed SCTP endpoints.i sòThe SCTP over IPv4 transport domain. The corresponding transport address is of type TransportAddressIPv4z for scoped IPv4 addresses with a zone index. This transport domain usually represents the primary address on multihomed SCTP endpoints.i sòThe SCTP over IPv6 transport domain. The corresponding transport address is of type TransportAddressIPv6z for scoped IPv6 addresses with a zone index. This transport domain usually represents the primary address on multihomed SCTP endpoints.i sÂThe Posix Local IPC transport domain. The corresponding transport address is of type TransportAddressLocal. The Posix Local IPC transport domain incorporates the well-known UNIX domain sockets.is€The UDP transport domain using fully qualified domain names. The corresponding transport address is of type TransportAddressDns.is€The TCP transport domain using fully qualified domain names. The corresponding transport address is of type TransportAddressDns.isThe SCTP transport domain using fully qualified domain names. The corresponding transport address is of type TransportAddressDns.sTRANSPORT-ADDRESS-MIBsPYSNMP_MODULE_IDstransportAddressMIBstransportDomainsstransportDomainUdpIpv4stransportDomainUdpIpv6stransportDomainUdpIpv4zstransportDomainUdpIpv6zstransportDomainTcpIpv4stransportDomainTcpIpv6stransportDomainTcpIpv4zstransportDomainTcpIpv6zstransportDomainSctpIpv4stransportDomainSctpIpv6stransportDomainSctpIpv4zstransportDomainSctpIpv6zstransportDomainLocalstransportDomainUdpDnsstransportDomainTcpDnsstransportDomainSctpDns(3ssocketstypess pyasn1.types constraintsnamedvals mibBuilders importSymbolssIntegersObjectIdentifiers OctetStringsBitss Integer32sModuleIdentitys MibIdentifiersObjectIdentitys TimeTickssmib_2sTextualConventionsTransportAddresssTransportAddressDnssTransportAddressIPv4sTransportAddressIPv4zsTransportAddressIPv6sTransportAddressIPv6zsTransportAddressLocalsTransportAddressTypesTransportDomains setRevisionsstransportAddressMIBs loadTextsssetOrganizationssetContactInfossetDescriptionstransportDomainsstransportDomainUdpIpv4stransportDomainUdpIpv6stransportDomainUdpIpv4zstransportDomainUdpIpv6zstransportDomainTcpIpv4stransportDomainTcpIpv6stransportDomainTcpIpv4zstransportDomainTcpIpv6zstransportDomainSctpIpv4stransportDomainSctpIpv6stransportDomainSctpIpv4zstransportDomainSctpIpv6zstransportDomainLocalstransportDomainUdpDnsstransportDomainTcpDnsstransportDomainSctpDnss exportSymbols(*stransportDomainSctpDnssmib_2stransportDomainUdpDnss TimeTicksstransportDomainUdpIpv6zstransportDomainTcpIpv4zsModuleIdentitystransportDomainTcpIpv6zsBitsstransportDomainUdpIpv6stransportDomainUdpIpv4sTransportAddresssTransportAddressIPv4sTransportAddressIPv6sTransportAddressTypesTransportDomainstransportDomainUdpIpv4zstransportDomainLocalsObjectIdentifiersnamedvals OctetStringstransportDomainSctpIpv4zsTransportAddressLocalstransportDomainSctpIpv6zstransportAddressMIBstransportDomainTcpDnssIntegerstypess Integer32sTransportAddressDnsssockets constraintsTextualConventionstransportDomainTcpIpv6stransportDomainsstransportDomainTcpIpv4s MibIdentifierstransportDomainSctpIpv6stransportDomainSctpIpv4sTransportAddressIPv6zsObjectIdentitysTransportAddressIPv4z((sCbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.pys?s’  !9-   $' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' CPKnrÎ2¸ÄŽ©CCpysnmp/smi/mibs/ASN1.py# ASN.1 objects used in SNMP from pyasn1.type import univ from pysnmp.proto import rfc1902 Integer = rfc1902.Integer32 OctetString = rfc1902.OctetString # Instead of using base ASN,1 types we use SNMPv2 SMI ones to make # SMI objects type-compatible with SNMP protocol values # Integer = univ.Integer # OctetString = univ.OctetString BitString = univ.BitString Null = univ.Null ObjectIdentifier = univ.ObjectIdentifier mibBuilder.exportSymbols( 'ASN1', Integer=Integer, OctetString=OctetString, BitString=BitString, Null=Null, ObjectIdentifier=ObjectIdentifier ) PK†£=<+ÊÂÑÑ pysnmp/smi/mibs/SNMP-MPD-MIB.pyc;ò %ÆËIc@s¿dklZlZeiddddƒ\ZZZeidddƒ\ZZ eidd d d d d ddddddƒ \ Z Z Z Z ZZZZZZZe dddddddfƒidddfƒZeioeidƒneioeidƒneioeidƒneddddddddfƒZeddddddddfƒZedddddddddf ƒZeddddddddddf e ƒƒidƒZeioeid ƒneddddddddddf e ƒƒidƒZ eioe id!ƒneddddddddddf e ƒƒidƒZ!eioe!id"ƒneddddddddfƒZ"edddddddddf ƒZ#edddddddddf ƒZ$e ddddddddddf ƒi%d#d$fd#d%fd#d&fƒZ&ei'd#d'eƒei'd#d(ed)ed*ed+ed&ed$e d%e!d,e"d-e#d.e$ƒ ei'd#d/e&ƒd0S(1(s constraintsnamedvalsASN1sIntegersObjectIdentifiers OctetStrings SNMPv2-CONFsModuleCompliances ObjectGroups SNMPv2-SMIsBitss Counter32s Integer32sModuleIdentitys MibIdentifiers MibScalarsMibTables MibTableRowsMibTableColumns TimeTickss snmpModulesiiii s2002-10-14 00:00s1999-05-04 16:36s1997-09-30 00:00sSNMPv3 Working GroupsyWG-EMail: snmpv3@lists.tislabs.com Subscribe: snmpv3-request@lists.tislabs.com Co-Chair: Russ Mundy Network Associates Laboratories postal: 15204 Omega Drive, Suite 300 Rockville, MD 20850-4601 USA EMail: mundy@tislabs.com phone: +1 301-947-7107 Co-Chair & Co-editor: David Harrington Enterasys Networks postal: 35 Industrial Way P. O. Box 5005 Rochester NH 03866-5005 USA EMail: dbh@enterasys.com phone: +1 603-337-2614 Co-editor: Jeffrey Case SNMP Research, Inc. postal: 3001 Kimberlin Heights Road Knoxville, TN 37920-9716 USA EMail: case@snmp.com phone: +1 423-573-1434 Co-editor: Randy Presuhn BMC Software, Inc. postal: 2141 North First Street San Jose, CA 95131 USA EMail: randy_presuhn@bmc.com phone: +1 408-546-1006 Co-editor: Bert Wijnen Lucent Technologies postal: Schagen 33 3461 GL Linschoten Netherlands EMail: bwijnen@lucent.com phone: +31 348-680-485sºThe MIB for Message Processing and Dispatching Copyright (C) The Internet Society (2002). This version of this MIB module is part of RFC 3412; see the RFC itself for full legal notices.isreadonlys©The total number of packets received by the SNMP engine which were dropped because they referenced a securityModel that was not known to or supported by the SNMP engine.s•The total number of packets received by the SNMP engine which were dropped because there were invalid or inconsistent components in the SNMP message.s)The total number of packets received by the SNMP engine which were dropped because the PDU contained in the packet could not be passed to an application responsible for handling the pduType, e.g. no SNMP application had registered for the proper combination of the contextEngineID and the pduType.s SNMP-MPD-MIBssnmpInvalidMsgsssnmpUnknownPDUHandlersssnmpUnknownSecurityModelssPYSNMP_MODULE_IDs snmpMPDMIBs snmpMPDAdminssnmpMPDMIBObjectss snmpMPDStatsssnmpMPDMIBConformancessnmpMPDMIBCompliancesssnmpMPDMIBGroupss snmpMPDGroupN((s pyasn1.types constraintsnamedvals mibBuilders importSymbolssIntegersObjectIdentifiers OctetStringsModuleCompliances ObjectGroupsBitss Counter32s Integer32sModuleIdentitys MibIdentifiers MibScalarsMibTables MibTableRowsMibTableColumns TimeTickss snmpModuless setRevisionss snmpMPDMIBs loadTextsssetOrganizationssetContactInfossetDescriptions snmpMPDAdminssnmpMPDMIBObjectss snmpMPDStatss setMaxAccessssnmpUnknownSecurityModelsssnmpInvalidMsgsssnmpUnknownPDUHandlersssnmpMPDMIBConformancessnmpMPDMIBCompliancesssnmpMPDMIBGroupss setObjectss snmpMPDGroups exportSymbols(s MibScalars snmpMPDMIBs TimeTickss snmpMPDStatssModuleIdentitys snmpModulessBitsssnmpMPDMIBCompliancess ObjectGroupsMibTableColumnsModuleCompliancesMibTables snmpMPDAdminssnmpMPDMIBGroupsssnmpInvalidMsgsssnmpMPDMIBObjectsssnmpUnknownPDUHandlerssnamedvalsObjectIdentifiers OctetStrings MibTableRowsIntegers snmpMPDGroups Integer32ssnmpUnknownSecurityModelss constraints MibIdentifierssnmpMPDMIBConformances Counter32((s:build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-MPD-MIB.pys?s:!Q3   $$'9 9 9 $''KIPK†£=³hM´9´9)pysnmp/smi/mibs/SNMP-NOTIFICATION-MIB.pyc;ò %ÆËIc2@s dklZlZeiddddƒ\ZZZeiddƒ\Zeiddd d d d d d d ddddƒ \ Z Z Z Z Z Z Z ZZZZZeidddƒ\ZZeidddddddddddƒ \ ZZZZZZZZZZeid d!d"ƒ\ZZ ed#d$d%d#d%d$d&fƒi!d'd(d)fƒZ"ei#oe"i$d*ƒnei#oe"i%d+ƒnei#oe"i&d,ƒned#d$d%d#d%d$d&d#fƒZ'ed#d$d%d#d%d$d&d#d#f ƒZ(ei#oe(i&d-ƒned#d$d%d#d%d$d&d#d#d#f ƒi)d#d.d/fƒZ*ei#oe*i&d0ƒned#d$d%d#d%d$d&d#d#d#d#f eƒi+d1ei,d#d2ƒƒƒi-d3ƒZ.ei#oe.i&d4ƒned#d$d%d#d%d$d&d#d#d#d5f e ƒi/d6ƒƒi-d7ƒZ0ei#oe0i&d8ƒned#d$d%d#d%d$d&d#d#d#d$f eƒi+d1ei1d5d#ƒƒi+d9ei2d:d#fd;d5fƒƒi/d#ƒƒi-d7ƒZ3ei#oe3i&d<ƒned#d$d%d#d%d$d&d#d#d#d=f e ƒi/d>ƒƒi-d7ƒZ4ei#oe4i&d?ƒned#d$d%d#d%d$d&d#d#d#d@f eƒƒi-d7ƒZ5ei#oe5i&dAƒned#d$d%d#d%d$d&d#d5f ƒZ6ei#oe6i&dBƒned#d$d%d#d%d$d&d#d5d#f ƒi)d#dd fƒZ7ei#oe7i&dCƒned#d$d%d#d%d$d&d#d5d#d#f eƒi+d1ei,d#d2ƒƒƒi-d7ƒZ8ei#oe8i&dDƒned#d$d%d#d%d$d&d#d5d#d5f e ƒi/d>ƒƒi-d7ƒZ9ei#oe9i&d?ƒned#d$d%d#d%d$d&d#d5d#d$f eƒƒi-d7ƒZ:ei#oe:i&dEƒned#d$d%d#d%d$d&d#d$f ƒZ;ei#oe;i&dFƒned#d$d%d#d%d$d&d#d$d#f ƒi)dGd.dHfd#d.dIfƒZ<ei#oe<i&dJƒned#d$d%d#d%d$d&d#d$d#d#f eƒƒi-d3ƒZ=ei#oe=i&dKƒned#d$d%d#d%d$d&d#d$d#d5f eƒi+d1ei,dGdLƒƒi/d6ƒƒi-d7ƒZ>ei#oe>i&dMƒned#d$d%d#d%d$d&d#d$d#d$f eƒi+d1ei1d#d5ƒƒi+d9ei2dNd#fdOd5fƒƒi/d#ƒƒi-d7ƒZ?ei#oe?i&dPƒned#d$d%d#d%d$d&d#d$d#d=f e ƒi/d>ƒƒi-d7ƒZ@ei#oe@i&dQƒned#d$d%d#d%d$d&d#d$d#d@f eƒƒi-d7ƒZAei#oeAi&dAƒned#d$d%d#d%d$d&d$fƒZBed#d$d%d#d%d$d&d$d#f ƒZCed#d$d%d#d%d$d&d$d5f ƒZDed#d$d%d#d%d$d&d$d5d5f ƒiEd.dRfd.dSfd.dHfd.dTfd.dUfd.dVfd.dWfƒZFed#d$d%d#d%d$d&d$d5d#f ƒiEd.dXfd.dYfd.dZfd.d[fƒZGeiHd.d\e"ƒeiHd.d]e"d^e'd_e(d`e*d/e.dXe0d[e3dZe4dYe5dae6dbe7dHe8dSe9dWe:dce;dde<dIe=dVe>dTe?dUe@dReAdeeBdfeCdgeDƒeiHd.dheFdieGƒdjS(k(s constraintsnamedvalsASN1sIntegersObjectIdentifiers OctetStringsSNMP-FRAMEWORK-MIBsSnmpAdminStringsSNMP-TARGET-MIBs SnmpTagValuessnmpTargetBasicGroupssnmpTargetParamsMPModelssnmpTargetParamsNamessnmpTargetParamsRowStatusssnmpTargetParamsSecurityLevelssnmpTargetParamsSecurityModelssnmpTargetParamsSecurityNamessnmpTargetParamsStorageTypessnmpTargetResponseGroups SNMPv2-CONFsModuleCompliances ObjectGroups SNMPv2-SMIsBitss Integer32sModuleIdentitys MibIdentifiers MibScalarsMibTables MibTableRowsMibTableColumns TimeTickss snmpModuless SNMPv2-TCs RowStatuss StorageTypeiiii s2002-10-14 00:00s1998-08-04 00:00s1997-07-14 00:00sIETF SNMPv3 Working GroupsWG-email: snmpv3@lists.tislabs.com Subscribe: majordomo@lists.tislabs.com In message body: subscribe snmpv3 Co-Chair: Russ Mundy Network Associates Laboratories Postal: 15204 Omega Drive, Suite 300 Rockville, MD 20850-4601 USA EMail: mundy@tislabs.com Phone: +1 301-947-7107 Co-Chair: David Harrington Enterasys Networks Postal: 35 Industrial Way P. O. Box 5004 Rochester, New Hampshire 03866-5005 USA EMail: dbh@enterasys.com Phone: +1 603-337-2614 Co-editor: David B. Levi Nortel Networks Postal: 3505 Kesterwood Drive Knoxville, Tennessee 37918 EMail: dlevi@nortelnetworks.com Phone: +1 865 686 0432 Co-editor: Paul Meyer Secure Computing Corporation Postal: 2675 Long Lake Road Roseville, Minnesota 55113 EMail: paul_meyer@securecomputing.com Phone: +1 651 628 1592 Co-editor: Bob Stewart Retireds)This MIB module defines MIB objects which provide mechanisms to remotely configure the parameters used by an SNMP entity for the generation of notifications. Copyright (C) The Internet Society (2002). This version of this MIB module is part of RFC 3413; see the RFC itself for full legal notices.s°This table is used to select management targets which should receive notifications, as well as the type of notification which should be sent to each selected management target.sSNMP-NOTIFICATION-MIBssnmpNotifyNamesAn entry in this table selects a set of management targets which should receive notifications, as well as the type of notification which should be sent to each selected management target. Entries in the snmpNotifyTable are created and deleted using the snmpNotifyRowStatus object.s subtypeSpeci snoaccesssRThe locally arbitrary, but unique identifier associated with this snmpNotifyEntry.iss readcreates5This object contains a single tag value which is used to select entries in the snmpTargetAddrTable. Any entry in the snmpTargetAddrTable which contains a tag value which is equal to the value of an instance of this object is selected. If this object contains a value of zero length, no entries are selected.s namedValuesstrapsinforms«This object determines the type of notification to be generated for entries in the snmpTargetAddrTable selected by the corresponding instance of snmpNotifyTag. This value is only used when generating notifications, and is ignored when using the snmpTargetAddrTable for other purposes. If the value of this object is trap(1), then any messages generated for selected rows will contain Unconfirmed-Class PDUs. If the value of this object is inform(2), then any messages generated for selected rows will contain Confirmed-Class PDUs. Note that if an SNMP entity only supports generation of Unconfirmed-Class PDUs (and not Confirmed-Class PDUs), then this object may be read-only.is nonVolatiles–The storage type for this conceptual row. Conceptual rows having the value 'permanent' need not allow write-access to any columnar objects in the row.isThe status of this conceptual row. To create a row in this table, a manager must set this object to either createAndGo(4) or createAndWait(5).siThis table is used to associate a notification filter profile with a particular set of target parameters.sAn entry in this table indicates the name of the filter profile to be used when generating notifications using the corresponding entry in the snmpTargetParamsTable. Entries in the snmpNotifyFilterProfileTable are created and deleted using the snmpNotifyFilterProfileRowStatus object.sThe name of the filter profile to be used when generating notifications using the corresponding entry in the snmpTargetAddrTable.sÉThe status of this conceptual row. To create a row in this table, a manager must set this object to either createAndGo(4) or createAndWait(5). Until instances of all corresponding columns are appropriately configured, the value of the corresponding instance of the snmpNotifyFilterProfileRowStatus column is 'notReady'. In particular, a newly created row cannot be made active until the corresponding instance of snmpNotifyFilterProfileName has been set.sÞThe table of filter profiles. Filter profiles are used to determine whether particular management targets should receive particular notifications. When a notification is generated, it must be compared with the filters associated with each management target which is configured to receive notifications, in order to determine whether it may be sent to each such management target. A more complete discussion of notification filtering can be found in section 6. of [SNMP-APPL].issnmpNotifyFilterProfileNamessnmpNotifyFilterSubtrees‰An element of a filter profile. Entries in the snmpNotifyFilterTable are created and deleted using the snmpNotifyFilterRowStatus object.sµThe MIB subtree which, when combined with the corresponding instance of snmpNotifyFilterMask, defines a family of subtrees which are included in or excluded from the filter profile.is®The bit mask which, in combination with the corresponding instance of snmpNotifyFilterSubtree, defines a family of subtrees which are included in or excluded from the filter profile. Each bit of this bit mask corresponds to a sub-identifier of snmpNotifyFilterSubtree, with the most significant bit of the i-th octet of this octet string value (extended if necessary, see below) corresponding to the (8*i - 7)-th sub-identifier, and the least significant bit of the i-th octet of this octet string corresponding to the (8*i)-th sub-identifier, where i is in the range 1 through 16. Each bit of this bit mask specifies whether or not the corresponding sub-identifiers must match when determining if an OBJECT IDENTIFIER matches this family of filter subtrees; a '1' indicates that an exact match must occur; a '0' indicates 'wild card', i.e., any sub-identifier value matches. Thus, the OBJECT IDENTIFIER X of an object instance is contained in a family of filter subtrees if, for each sub-identifier of the value of snmpNotifyFilterSubtree, either: the i-th bit of snmpNotifyFilterMask is 0, or the i-th sub-identifier of X is equal to the i-th sub-identifier of the value of snmpNotifyFilterSubtree. If the value of this bit mask is M bits long and there are more than M sub-identifiers in the corresponding instance of snmpNotifyFilterSubtree, then the bit mask is extended with 1's to be the required length. Note that when the value of this object is the zero-length string, this extension rule results in a mask of all-1's being used (i.e., no 'wild card'), and the family of filter subtrees is the one subtree uniquely identified by the corresponding instance of snmpNotifyFilterSubtree.sincludedsexcludedsÝThis object indicates whether the family of filter subtrees defined by this entry are included in or excluded from a filter. A more detailed discussion of the use of this object can be found in section 6. of [SNMP-APPL].s™The storage type for this conceptual row. Conceptual rows having the value 'permanent' need not allow write-access to any columnar objects in the row.ssnmpNotifyFilterRowStatusssnmpNotifyFilterProfileStorTypessnmpNotifyFilterTypessnmpNotifyFilterStorageTypessnmpNotifyFilterMasks snmpNotifyFilterProfileRowStatuss snmpNotifyTagssnmpNotifyRowStatusssnmpNotifyStorageTypessnmpNotifyTypesPYSNMP_MODULE_IDssnmpNotificationMIBssnmpNotifyObjectsssnmpNotifyTablessnmpNotifyEntryssnmpNotifyFilterProfileTablessnmpNotifyFilterProfileEntryssnmpNotifyFilterTablessnmpNotifyFilterEntryssnmpNotifyConformancessnmpNotifyCompliancesssnmpNotifyGroupsssnmpNotifyFilterGroupssnmpNotifyGroupN(Is pyasn1.types constraintsnamedvals mibBuilders importSymbolssIntegersObjectIdentifiers OctetStringsSnmpAdminStrings SnmpTagValuessnmpTargetBasicGroupssnmpTargetParamsMPModelssnmpTargetParamsNamessnmpTargetParamsRowStatusssnmpTargetParamsSecurityLevelssnmpTargetParamsSecurityModelssnmpTargetParamsSecurityNamessnmpTargetParamsStorageTypessnmpTargetResponseGroupsModuleCompliances ObjectGroupsBitss Integer32sModuleIdentitys MibIdentifiers MibScalarsMibTables MibTableRowsMibTableColumns TimeTickss snmpModuless RowStatuss StorageTypes setRevisionsssnmpNotificationMIBs loadTextsssetOrganizationssetContactInfossetDescriptionssnmpNotifyObjectsssnmpNotifyTables setIndexNamesssnmpNotifyEntryssubtypesValueSizeConstraints setMaxAccessssnmpNotifyNamesclones snmpNotifyTagsSingleValueConstraints NamedValuesssnmpNotifyTypessnmpNotifyStorageTypessnmpNotifyRowStatusssnmpNotifyFilterProfileTablessnmpNotifyFilterProfileEntryssnmpNotifyFilterProfileNamessnmpNotifyFilterProfileStorTypes snmpNotifyFilterProfileRowStatusssnmpNotifyFilterTablessnmpNotifyFilterEntryssnmpNotifyFilterSubtreessnmpNotifyFilterMaskssnmpNotifyFilterTypessnmpNotifyFilterStorageTypessnmpNotifyFilterRowStatusssnmpNotifyConformancessnmpNotifyCompliancesssnmpNotifyGroupss setObjectsssnmpNotifyFilterGroupssnmpNotifyGroups exportSymbols(8ssnmpNotifyNamesSnmpAdminStrings MibScalars MibIdentifiers TimeTickssModuleIdentitys snmpModulesssnmpNotifyFilterStorageTypessnmpNotifyCompliancesssnmpTargetParamsNamessnmpNotifyFilterMaskssnmpTargetBasicGroupssnmpTargetParamsSecurityLevelssnmpTargetParamsSecurityModelssnmpNotifyFilterRowStatuss ObjectGroupsMibTableColumnsBitsssnmpNotifyFilterEntrysMibTablessnmpNotifyFilterSubtreessnmpNotifyConformancessnmpNotifyRowStatuss RowStatusssnmpNotifyTablessnmpTargetParamsStorageTypesIntegerssnmpNotifyFilterProfileTablessnmpNotifyGroupsssnmpTargetParamsRowStatusssnmpNotifyEntrys SnmpTagValues OctetStrings MibTableRowssnmpNotifyFilterProfileNamessnmpNotifyGroupssnmpTargetParamsMPModelssnmpNotifyFilterProfileEntryssnmpNotifyFilterTypessnmpNotifyObjectsssnmpTargetParamsSecurityNames snmpNotifyTagssnmpNotificationMIBssnmpNotifyStorageTypes Integer32ssnmpNotifyFilterProfileStorTypessnmpNotifyTypes constraintssnmpTargetResponseGroupsnamedvalssnmpNotifyFilterGroupssnmpNotifyFilterTables StorageTypesObjectIdentifiersModuleCompliances snmpNotifyFilterProfileRowStatus((sCbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-NOTIFICATION-MIB.pys?sž!WK3   $' < T E  E < ' < T E < ' H < ]  E < $''oTPK†£=ÇyòË7Ë7pysnmp/smi/mibs/SNMPv2-TC.pyc;ò ¬ÍÉEc$@s¢dklZlZdklZdklZlZdkl Z e i ddddƒ\Z Z Ze i dd d d d ƒ\ZZZZd fd„ƒYZdee fd„ƒYZdee fd„ƒYZdee fd„ƒYZde efd„ƒYZde efd„ƒYZdeefd„ƒYZdeefd„ƒYZdeefd„ƒYZdeefd „ƒYZd!e efd"„ƒYZd#eefd$„ƒYZd%e efd&„ƒYZd'ee fd(„ƒYZ d)e efd*„ƒYZ!d+eefd,„ƒYZ"d-e efd.„ƒYZ#e i$d/d edededededededededed!ed#ed%ed'e d)e!d+e"d-e#ƒd0S(1(ssplitsdigits(serror(s constraintsnamedval(sdebugsASN1s OctetStringsIntegersObjectIdentifiers SNMPv2-SMIs Counter32s Unsigned32s TimeTickss Counter64sTextualConventioncBs’tZdZdZdZdZfZeƒZe ƒZ e ƒZ e ƒZeƒZeƒZeƒZd„Zd„Zd„Zd„Zd„ZRS(NsscurrentcCs |iSdS(N(sselfs displayHint(sself((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pysgetDisplayHintscCs |iSdS(N(sselfsstatus(sself((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pys getStatusscCs |iSdS(N(sselfs description(sself((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pysgetDescriptionscCs |iSdS(N(sselfs reference(sself((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pys getReferencescCsB|io\|ii|ƒpI|ii|ƒp6|ii|ƒp#|ii|ƒp|ii|ƒo;tdd„t |idƒƒ\} } | djo d|Sq>| djo`y1dt | ƒt|ƒtdt | ƒƒfSWq tj o}tid |ƒ‚q Xq>| d jo d |Sq>| d joQ|}d g} x.|o&| idd|d@ƒ|d?}qNWt| dƒSq>tid| ƒ‚n›|io|ii|ƒoHd} t|ƒ}|i} x"|o| o| ddjo,t |dƒ}}| d} |d}n d}t}d}x5| o| dtjo|| d}| d} q?Wyt |ƒ}Wn(tj o}tid|ƒ‚nX| otid|iƒ‚n| d}| d} | o| dtjo| ddjo| d}| d} nd}| o|o |tj o| d}d}| d} nt}x]|oU|d}|djp |djo| || } nö|ddd fjoÌd} || }xi|oa| d>} y"| t%|dƒB} |d}WqÔtj o"}tid||fƒ‚qÔXqÔW|djo| d| } q |d jo| d| } q | d| } ntid|ƒ‚|o|o| |} n||}qnW|o|o| |} n| o |i} qßqßW| Sn6|io|i&i|ƒot|ƒSn t|ƒSdS(s"Implements DISPLAY-HINT evaluationicCs ||fS(N(stsf(stsf((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pys(ss-sxs0x%xsds%.*fi sfloat num evaluation error: %ssos0%osbsBs%diss!Unsupported numeric type spec: %ss*sBad octet length: %ssShort octet length: %ssastlis#Display format eval failure: %s: %ss%02xs%03os#Unsupported display format char: %sN('sselfs displayHints_TextualConvention__integers isSuperTypeOfs_TextualConvention__unsigned32s_TextualConvention__timetickss_TextualConvention__counter32s_TextualConvention__counter64sapplyssplitstsfsvaluesintsfloatspows StandardErrorswhyserrorsSmiErrorsvsrsinsertsjoins_TextualConvention__octetStringsstrsdsrepeatIndicators repeatCountsNones octetLengthsdigitss displayFormats displaySepsrepeatTerminatorsnsvvsords$_TextualConvention__objectIdentifier(sselfsvalues repeatCounts displayFormatsvvsrepeatIndicators displaySepsrepeatTerminatorswhysdsfsnsrstsvs octetLength((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pys prettyOuts¨i'   1        )    #  (s__name__s __module__s displayHintsstatuss descriptions referencesbitssIntegers_TextualConvention__integers Counter32s_TextualConvention__counter32s Unsigned32s_TextualConvention__unsigned32s TimeTickss_TextualConvention__timetickss Counter64s_TextualConvention__counter64s OctetStrings_TextualConvention__octetStringsObjectIdentifiers$_TextualConvention__objectIdentifiersgetDisplayHints getStatussgetDescriptions getReferences prettyOut(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pysTextualConvention s"           s DisplayStringcBs'tZeieiddƒZdZRS(Niiÿs255a(s__name__s __module__s OctetStrings subtypeSpecs constraintsValueSizeConstraints displayHint(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pys DisplayString¦ss PhysAddresscBstZdZRS(Ns1x:(s__name__s __module__s displayHint(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pys PhysAddressªss MacAddresscBs-tZeieiddƒZdZdZRS(Nis1x:(s__name__s __module__s OctetStrings subtypeSpecs constraintsValueSizeConstraints displayHints fixedLength(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pys MacAddress­ss TruthValuecBs?tZeieiddƒZeiddfddfƒZRS(Niistruesfalse( s__name__s __module__sIntegers subtypeSpecs constraintsSingleValueConstraintsnamedvals NamedValuess namedValues(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pys TruthValue²ss TestAndIncrcBs0tZeieiddƒZdZd„ZRS(NilÿÿcCs[||jotid|d|ƒ‚n|d}|djo d}n|i|ƒSdS(Nsidxsnameiiþÿÿi(svaluesselfserrorsInconsistentValueErrorsidxsnamesclone(sselfsnamesvaluesidx((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pyssmiWrite¹s     (s__name__s __module__sIntegers subtypeSpecs constraintsValueRangeConstraints defaultValuessmiWrite(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pys TestAndIncr¶ssAutonomousTypecBstZRS(N(s__name__s __module__(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pysAutonomousTypeÁssInstancePointercBstZdZRS(Nsobsolete(s__name__s __module__sstatus(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pysInstancePointerÂssVariablePointercBstZRS(N(s__name__s __module__(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pysVariablePointerÄss RowPointercBstZRS(N(s__name__s __module__(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pys RowPointerÅss RowStatusc BsÁtZdZeieidddddddƒZeiddfd dfd dfd dfd dfd dfddfƒZ e dƒ\Z Z Z ZZZZhee feie f<eefeief<ee feie f<ee feie f<ee feie f<eefeief<ee feie f<ee feie f<e e feie f<e efeief<e e fee f<e e fee f<e e feie f<e efeief<e e fee f<e e fee f<ee feie f<eefeie f<ee feie f<ee feie f<e e fee f %s, %ssmsgs(Exception at row state transition %s->%ssidx(sselfs stateMatrixsgetsclonesvaluesintserrorsMibOperationErrorsNoneserrsvalsdebugsloggersflagInssidxssmiSetPendingError(sselfsnamesvaluesidxserrsval((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pyssmiWrites94    cCs|i|||ƒSdS(N(sselfssmiWritesnamesvaluesidx(sselfsnamesvaluesidx((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pys smiCreate0scCs0|io"|itf\}|_|‚ndS(N(sselfs pendingErrorsNoneserr(sselfserr((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pyssmiRaisePendingError3s cCs ||_dS(N(serrsselfs pendingError(sselfserr((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pyssmiSetPendingError7s(s__name__s __module__s__doc__sIntegers subtypeSpecs constraintsSingleValueConstraintsnamedvals NamedValuess namedValuessranges stNotExistssstActivesstNotInServices stNotReadys stCreateAndGosstCreateAndWaits stDestroyserrorsRowCreationWantedsInconsistentValueErrorsNonesRowDestructionWanteds stateMatrixs defaultValues pendingErrorssmiWrites smiCreatessmiRaisePendingErrorssmiSetPendingError(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pys RowStatusÇs (*!!ÿðG   s TimeStampcBstZRS(N(s__name__s __module__(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pys TimeStamp:ss TimeIntervalcBs!tZeieiddƒZRS(Nilÿÿ(s__name__s __module__sIntegers subtypeSpecs constraintsValueRangeConstraint(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pys TimeInterval<ss DateAndTimecBs'tZeieiddƒZdZRS(Nii s2d-1d-1d,1d:1d:1d.1d,1a1d:1d(s__name__s __module__s OctetStrings subtypeSpecs constraintsValueSizeConstraints displayHint(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pys DateAndTime?ss StorageTypecBsctZeieidddddƒZeiddfddfddfd dfd dfƒZRS( Niiiiisothersvolatiles nonVolatiles permanentsreadOnly( s__name__s __module__sIntegers subtypeSpecs constraintsSingleValueConstraintsnamedvals NamedValuess namedValues(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pys StorageTypeCs"!sTDomaincBstZRS(N(s__name__s __module__(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pysTDomainJssTAddresscBs!tZeieiddƒZRS(Niiÿ(s__name__s __module__s OctetStrings subtypeSpecs constraintsValueSizeConstraint(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pysTAddressLss SNMPv2-TCN(%sstringssplitsdigitss pysnmp.smiserrors pyasn1.types constraintsnamedvalspysnmpsdebugs mibBuilders importSymbolss OctetStringsIntegersObjectIdentifiers Counter32s Unsigned32s TimeTickss Counter64sTextualConventions DisplayStrings PhysAddresss MacAddresss TruthValues TestAndIncrsAutonomousTypesInstancePointersVariablePointers RowPointers RowStatuss TimeStamps TimeIntervals DateAndTimes StorageTypesTDomainsTAddresss exportSymbols(sAutonomousTypes TruthValues TimeTickss PhysAddresss MacAddresssVariablePointers DateAndTimes RowStatusssplits DisplayStringsIntegersnamedvals TimeIntervals OctetStrings RowPointers TimeStamps Counter64s Unsigned32s TestAndIncrsInstancePointersdigitss constraints StorageTypesTextualConventionsObjectIdentifierserrorsdebugsTAddresss Counter32sTDomain((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pys?s:  !'™ s  PK†£=ŸÊÜø ø pysnmp/smi/mibs/PYSNMP-MIB.pyc;ò "ÆËIc@sFdklZlZeiddddƒ\ZZZeiddddd d d ƒ\ZZ Z Z Z Z e d d dd dd dfƒidfƒZeioeidƒneioeidƒneioeidƒne d d dd dd dd fƒZe d d dd dd ddfƒZe d d dd dd dd fƒZe d d dd dd dd d f ƒZe d d dd dd dd df ƒZe d d dd dd dd d f ƒZe d d dd dd ddfƒZe d d dd dd dddf ƒZe d d dd dd ddd f ƒZe d d dd dd ddfƒZe d d dd dd ddd f ƒZe d d dd dd dddf ƒZe d d dd dd ddfƒZ ei!ddeƒei!ddededededed ed!ed"ed#ed$ed%ed&ed'ed(e ƒd)S(*(s constraintsnamedvalsASN1sIntegersObjectIdentifiers OctetStrings SNMPv2-SMIsBitss Integer32sModuleIdentitys MibIdentifiers TimeTickss enterprisesiiiii¸Os2005-05-14 00:00s pysnmp.sf.netsemail: ilya@glas.netsBTop-level infrastructure of the PySNMP project enterprise MIB treeiiii's PYSNMP-MIBsPYSNMP_MODULE_IDspysnmps pysnmpObjectsspysnmpExamplesspysnmpEnumerationsspysnmpModuleIDsspysnmpAgentOIDss pysnmpDomainsspysnmpNotificationPrefixspysnmpNotificationsspysnmpNotificationObjectsspysnmpConformancespysnmpCompliancess pysnmpGroupsspysnmpExperimentalN("s pyasn1.types constraintsnamedvals mibBuilders importSymbolssIntegersObjectIdentifiers OctetStringsBitss Integer32sModuleIdentitys MibIdentifiers TimeTickss enterprisess setRevisionsspysnmps loadTextsssetOrganizationssetContactInfossetDescriptions pysnmpObjectsspysnmpExamplesspysnmpEnumerationsspysnmpModuleIDsspysnmpAgentOIDss pysnmpDomainsspysnmpNotificationPrefixspysnmpNotificationsspysnmpNotificationObjectsspysnmpConformancespysnmpCompliancess pysnmpGroupsspysnmpExperimentals exportSymbols(spysnmpNotificationPrefixs pysnmpDomainsspysnmpExperimentals TimeTicksspysnmpAgentOIDsspysnmpEnumerationssBitss pysnmpGroupssObjectIdentifiersnamedvals OctetStringspysnmpExampless enterprisesspysnmpNotificationObjectssIntegers pysnmpObjectsspysnmps Integer32sModuleIdentitys constraintspysnmpCompliancesspysnmpConformancespysnmpModuleIDss MibIdentifierspysnmpNotifications((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/PYSNMP-MIB.pys?s0!3-   $$$'''$''$''$PK†£=ÛtÉøç>ç>#pysnmp/smi/mibs/SNMP-TARGET-MIB.pyc;ò %ÆËIc:@s¹ dklZlZeiddddƒ\ZZZeiddddd ƒ\ZZ Z Z eid d d ƒ\Z Z eid ddddddddddddƒ \ ZZZZZZZZZZZZeidddddddd ƒ\ZZZZZZZd!eefd"„ƒYZ d#eefd$„ƒYZ!ed%d&d'd%d'd&d(fƒi"d)d*d+fƒZ#ei$oe#i%d,ƒnei$oe#i&d-ƒnei$oe#i'd.ƒned%d&d'd%d'd&d(d%fƒZ(ed%d&d'd%d'd&d(d%d%f eƒƒi)d/ƒZ*ei$oe*i'd0ƒned%d&d'd%d'd&d(d%d1f ƒZ+ei$oe+i'd2ƒned%d&d'd%d'd&d(d%d1d%f ƒi,d%d3d4fƒZ-ei$oe-i'd5ƒned%d&d'd%d'd&d(d%d1d%d%f eƒi.d6ei/d%d7ƒƒƒi)d8ƒZ0ei$oe0i'd9ƒned%d&d'd%d'd&d(d%d1d%d1f eƒƒi)d:ƒZ1ei$oe1i'd;ƒned%d&d'd%d'd&d(d%d1d%d&f eƒƒi)d:ƒZ2ei$oe2i'd<ƒned%d&d'd%d'd&d(d%d1d%d=f eƒi3d>ƒƒi)d:ƒZ4ei$oe4i'd?ƒned%d&d'd%d'd&d(d%d1d%d@f eƒi.d6ei5dAdBƒƒi3d&ƒƒi)d:ƒZ6ei$oe6i'dCƒned%d&d'd%d'd&d(d%d1d%d'f e ƒi3dDƒƒi)d:ƒZ7ei$oe7i'dEƒned%d&d'd%d'd&d(d%d1d%dFf eƒi.d6ei/d%d7ƒƒƒi)d:ƒZ8ei$oe8i'dGƒned%d&d'd%d'd&d(d%d1d%dHf eƒi3dIƒƒi)d:ƒZ9ei$oe9i'dJƒned%d&d'd%d'd&d(d%d1d%dKf eƒƒi)d:ƒZ:ei$oe:i'dLƒned%d&d'd%d'd&d(d%d&f ƒZ;ei$oe;i'dMƒned%d&d'd%d'd&d(d%d&d%f ƒi,d%d3dNfƒZ<ei$oe<i'dOƒned%d&d'd%d'd&d(d%d&d%d%f eƒi.d6ei/d%d7ƒƒƒi)d8ƒZ=ei$oe=i'dPƒned%d&d'd%d'd&d(d%d&d%d1f e ƒƒi)d:ƒZ>ei$oe>i'dQƒned%d&d'd%d'd&d(d%d&d%d&f e ƒi.d6ei5d%dRƒƒƒi)d:ƒZ?ei$oe?i'dSƒned%d&d'd%d'd&d(d%d&d%d=f eƒƒi)d:ƒZ@ei$oe@i'dTƒned%d&d'd%d'd&d(d%d&d%d@f e ƒƒi)d:ƒZAei$oeAi'dUƒned%d&d'd%d'd&d(d%d&d%d'f eƒi3dIƒƒi)d:ƒZBei$oeBi'dJƒned%d&d'd%d'd&d(d%d&d%dFf eƒƒi)d:ƒZCei$oeCi'dVƒned%d&d'd%d'd&d(d%d=f eƒƒi)dWƒZDei$oeDi'dXƒned%d&d'd%d'd&d(d%d@f eƒƒi)dWƒZEei$oeEi'dYƒned%d&d'd%d'd&d(d&fƒZFed%d&d'd%d'd&d(d&d%f ƒZGed%d&d'd%d'd&d(d&d1f ƒZHe d%d&d'd%d'd&d(d&d1d1f ƒiId3dZfd3d[fƒZJe d%d&d'd%d'd&d(d&d1d&f ƒiId3d\fd3d]fƒZKe d%d&d'd%d'd&d(d&d1d%f ƒiId3d^fd3d_fd3d`fd3dafd3dbfd3dcfd3ddfd3defd3dffd3dgfd3dhfd3difd3djfƒ ZLeiMd3dke#ƒeiMd3d!e d#e!ƒeiMd3dle#dme(dhe*dne+doe-d4e0d^e1dee2d[e4dZe6dge7d_e8dbe9dde:dpe;dqe<dNe=dae>dje?dce@dieAdfeBd`eCd\eDd]eEdreFdseGdteHƒeiMd3dueJdveKdweLƒdxS(y(s constraintsnamedvalsASN1sIntegersObjectIdentifiers OctetStringsSNMP-FRAMEWORK-MIBsSnmpAdminStringsSnmpMessageProcessingModelsSnmpSecurityLevelsSnmpSecurityModels SNMPv2-CONFsModuleCompliances ObjectGroups SNMPv2-SMIsBitss Counter32s Integer32sModuleIdentitys MibIdentifiers MibScalarsMibTables MibTableRowsMibTableColumns TimeTickss snmpModuless SNMPv2-TCs RowStatuss StorageTypesTAddresssTDomainsTextualConventions TestAndIncrs TimeIntervals SnmpTagListcBs'tZdZeieiddƒZRS(Ns255tiiÿ(s__name__s __module__s displayHints OctetStrings subtypeSpecs constraintsValueSizeConstraint(((s=build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-TARGET-MIB.pys SnmpTagListss SnmpTagValuecBs'tZdZeieiddƒZRS(Ns255tiiÿ(s__name__s __module__s displayHints OctetStrings subtypeSpecs constraintsValueSizeConstraint(((s=build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-TARGET-MIB.pys SnmpTagValuesiiii s2002-10-14 00:00s1998-08-04 00:00s1997-07-14 00:00sIETF SNMPv3 Working GroupsWG-email: snmpv3@lists.tislabs.com Subscribe: majordomo@lists.tislabs.com In message body: subscribe snmpv3 Co-Chair: Russ Mundy Network Associates Laboratories Postal: 15204 Omega Drive, Suite 300 Rockville, MD 20850-4601 USA EMail: mundy@tislabs.com Phone: +1 301-947-7107 Co-Chair: David Harrington Enterasys Networks Postal: 35 Industrial Way P. O. Box 5004 Rochester, New Hampshire 03866-5005 USA EMail: dbh@enterasys.com Phone: +1 603-337-2614 Co-editor: David B. Levi Nortel Networks Postal: 3505 Kesterwood Drive Knoxville, Tennessee 37918 EMail: dlevi@nortelnetworks.com Phone: +1 865 686 0432 Co-editor: Paul Meyer Secure Computing Corporation Postal: 2675 Long Lake Road Roseville, Minnesota 55113 EMail: paul_meyer@securecomputing.com Phone: +1 651 628 1592 Co-editor: Bob Stewart Retireds)This MIB module defines MIB objects which provide mechanisms to remotely configure the parameters used by an SNMP entity for the generation of SNMP messages. Copyright (C) The Internet Society (2002). This version of this MIB module is part of RFC 3413; see the RFC itself for full legal notices.s readwrites”This object is used to facilitate modification of table entries in the SNMP-TARGET-MIB module by multiple managers. In particular, it is useful when modifying the value of the snmpTargetAddrTagList object. The procedure for modifying the snmpTargetAddrTagList object is as follows: 1. Retrieve the value of snmpTargetSpinLock and of snmpTargetAddrTagList. 2. Generate a new value for snmpTargetAddrTagList. 3. Set the value of snmpTargetSpinLock to the retrieved value, and the value of snmpTargetAddrTagList to the new value. If the set fails for the snmpTargetSpinLock object, go back to step 1.isMA table of transport addresses to be used in the generation of SNMP messages.sSNMP-TARGET-MIBssnmpTargetAddrNamesªA transport address to be used in the generation of SNMP operations. Entries in the snmpTargetAddrTable are created and deleted using the snmpTargetAddrRowStatus object.s subtypeSpeci snoaccesssVThe locally arbitrary, but unique identifier associated with this snmpTargetAddrEntry.s readcreatesgThis object indicates the transport type of the address contained in the snmpTargetAddrTAddress object.sThis object contains a transport address. The format of this address depends on the value of the snmpTargetAddrTDomain object.iiÜsThis object should reflect the expected maximum round trip time for communicating with the transport address defined by this row. When a message is sent to this address, and a response (if one is expected) is not received within this time period, an implementation may assume that the response will not be delivered. Note that the time interval that an application waits for a response may actually be derived from the value of this object. The method for deriving the actual time interval is implementation dependent. One such method is to derive the expected round trip time based on a particular retransmission algorithm and on the number of timeouts which have occurred. The type of message may also be considered when deriving expected round trip times for retransmissions. For example, if a message is being sent with a securityLevel that indicates both authentication and privacy, the derived value may be increased to compensate for extra processing time spent during authentication and encryption processing.iiiÿsÞThis object specifies a default number of retries to be attempted when a response is not received for a generated message. An application may provide its own retry count, in which case the value of this object is ignored.ssoThis object contains a list of tag values which are used to select target addresses for a particular operation.isÃThe value of this object identifies an entry in the snmpTargetParamsTable. The identified entry contains SNMP parameters to be used when generating messages to be sent to this transport address.is nonVolatiles–The storage type for this conceptual row. Conceptual rows having the value 'permanent' need not allow write-access to any columnar objects in the row.i sThe status of this conceptual row. To create a row in this table, a manager must set this object to either createAndGo(4) or createAndWait(5). Until instances of all corresponding columns are appropriately configured, the value of the corresponding instance of the snmpTargetAddrRowStatus column is 'notReady'. In particular, a newly created row cannot be made active until the corresponding instances of snmpTargetAddrTDomain, snmpTargetAddrTAddress, and snmpTargetAddrParams have all been set. The following objects may not be modified while the value of this object is active(1): - snmpTargetAddrTDomain - snmpTargetAddrTAddress An attempt to set these objects while the value of snmpTargetAddrRowStatus is active(1) will result in an inconsistentValue error.sQA table of SNMP target information to be used in the generation of SNMP messages.ssnmpTargetParamsNamesA set of SNMP target information. Entries in the snmpTargetParamsTable are created and deleted using the snmpTargetParamsRowStatus object.sXThe locally arbitrary, but unique identifier associated with this snmpTargetParamsEntry.sWThe Message Processing Model to be used when generating SNMP messages using this entry.lÿÿsThe Security Model to be used when generating SNMP messages using this entry. An implementation may choose to return an inconsistentValue error if an attempt is made to set this variable to a value for a security model which the implementation does not support.sqThe securityName which identifies the Principal on whose behalf SNMP messages will be generated using this entry.sPThe Level of Security to be used when generating SNMP messages using this entry.s€The status of this conceptual row. To create a row in this table, a manager must set this object to either createAndGo(4) or createAndWait(5). Until instances of all corresponding columns are appropriately configured, the value of the corresponding instance of the snmpTargetParamsRowStatus column is 'notReady'. In particular, a newly created row cannot be made active until the corresponding snmpTargetParamsMPModel, snmpTargetParamsSecurityModel, snmpTargetParamsSecurityName, and snmpTargetParamsSecurityLevel have all been set. The following objects may not be modified while the value of this object is active(1): - snmpTargetParamsMPModel - snmpTargetParamsSecurityModel - snmpTargetParamsSecurityName - snmpTargetParamsSecurityLevel An attempt to set these objects while the value of snmpTargetParamsRowStatus is active(1) will result in an inconsistentValue error.sreadonlysˆThe total number of packets received by the SNMP engine which were dropped because the context contained in the message was unavailable.s„The total number of packets received by the SNMP engine which were dropped because the context contained in the message was unknown.ssnmpTargetAddrRetryCountssnmpTargetAddrTimeoutssnmpUnavailableContextsssnmpUnknownContextsssnmpTargetAddrTDomainssnmpTargetAddrParamsssnmpTargetParamsRowStatusssnmpTargetParamsMPModelssnmpTargetAddrStorageTypessnmpTargetParamsSecurityNamessnmpTargetAddrRowStatusssnmpTargetAddrTAddressssnmpTargetParamsStorageTypessnmpTargetAddrTagListssnmpTargetSpinLockssnmpTargetParamsSecurityLevelssnmpTargetParamsSecurityModelsPYSNMP_MODULE_IDs snmpTargetMIBssnmpTargetObjectsssnmpTargetAddrTablessnmpTargetAddrEntryssnmpTargetParamsTablessnmpTargetParamsEntryssnmpTargetConformancessnmpTargetCompliancesssnmpTargetGroupsssnmpTargetResponseGroupssnmpTargetCommandResponderGroupssnmpTargetBasicGroupN(Ns pyasn1.types constraintsnamedvals mibBuilders importSymbolssIntegersObjectIdentifiers OctetStringsSnmpAdminStringsSnmpMessageProcessingModelsSnmpSecurityLevelsSnmpSecurityModelsModuleCompliances ObjectGroupsBitss Counter32s Integer32sModuleIdentitys MibIdentifiers MibScalarsMibTables MibTableRowsMibTableColumns TimeTickss snmpModuless RowStatuss StorageTypesTAddresssTDomainsTextualConventions TestAndIncrs TimeIntervals SnmpTagLists SnmpTagValues setRevisionss snmpTargetMIBs loadTextsssetOrganizationssetContactInfossetDescriptionssnmpTargetObjectss setMaxAccessssnmpTargetSpinLockssnmpTargetAddrTables setIndexNamesssnmpTargetAddrEntryssubtypesValueSizeConstraintssnmpTargetAddrNamessnmpTargetAddrTDomainssnmpTargetAddrTAddresssclonessnmpTargetAddrTimeoutsValueRangeConstraintssnmpTargetAddrRetryCountssnmpTargetAddrTagListssnmpTargetAddrParamsssnmpTargetAddrStorageTypessnmpTargetAddrRowStatusssnmpTargetParamsTablessnmpTargetParamsEntryssnmpTargetParamsNamessnmpTargetParamsMPModelssnmpTargetParamsSecurityModelssnmpTargetParamsSecurityNamessnmpTargetParamsSecurityLevelssnmpTargetParamsStorageTypessnmpTargetParamsRowStatusssnmpUnavailableContextsssnmpUnknownContextsssnmpTargetConformancessnmpTargetCompliancesssnmpTargetGroupss setObjectsssnmpTargetResponseGroupssnmpTargetCommandResponderGroupssnmpTargetBasicGroups exportSymbols(>sSnmpAdminStringssnmpTargetAddrTDomains MibScalarssnmpTargetAddrRetryCountssnmpTargetObjectss TimeTicksssnmpTargetGroupsssnmpTargetAddrNamessnmpUnknownContextssModuleIdentityssnmpTargetParamsNames snmpModulesssnmpTargetResponseGroupsBitsssnmpTargetParamsSecurityLevelssnmpTargetParamsSecurityModels ObjectGroupsMibTableColumnsSnmpSecurityModelsModuleCompliancesMibTablessnmpTargetAddrStorageTypessnmpTargetAddrEntrys RowStatusssnmpTargetAddrTimeoutssnmpTargetParamsStorageTypessnmpTargetCompliancessObjectIdentifiers SnmpTagListsnamedvalssnmpTargetCommandResponderGroups SnmpTagValues TimeIntervals OctetStrings MibTableRowssnmpTargetAddrTables snmpTargetMIBsSnmpMessageProcessingModelssnmpTargetParamsMPModels TestAndIncrssnmpTargetParamsSecurityNamessnmpTargetAddrRowStatusssnmpTargetAddrTAddressssnmpTargetParamsEntrysIntegerssnmpUnavailableContextsssnmpTargetBasicGroupssnmpTargetSpinLocks Integer32ssnmpTargetAddrTagListssnmpTargetParamsTables constraints StorageTypessnmpTargetParamsRowStatussTextualConventionssnmpTargetAddrParamss MibIdentifiersSnmpSecurityLevelssnmpTargetConformancesTAddresss Counter32sTDomain((s=build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-TARGET-MIB.pys?s¼!'W93   $6 ' < T < < E ] E T E < ' < T < T < < E < 6 6 $''BB¥µPKà©z:01ÈzÖiÖi*pysnmp/smi/mibs/SNMP-VIEW-BASED-ACM-MIB.py# PySNMP SMI module. Autogenerated from smidump -f python SNMP-VIEW-BASED-ACM-MIB # by libsmi2pysnmp-0.0.9-alpha at Thu Mar 26 20:58:12 2009, # Python version (2, 4, 4, 'final', 0) # Imported just in case new ASN.1 types would be created from pyasn1.type import constraint, namedval # Imports ( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") ( SnmpAdminString, SnmpSecurityLevel, SnmpSecurityModel, ) = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString", "SnmpSecurityLevel", "SnmpSecurityModel") ( ModuleCompliance, ObjectGroup, ) = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup") ( Bits, Integer32, ModuleIdentity, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, snmpModules, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "Integer32", "ModuleIdentity", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "snmpModules") ( RowStatus, StorageType, TestAndIncr, ) = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "StorageType", "TestAndIncr") # Objects snmpVacmMIB = ModuleIdentity((1, 3, 6, 1, 6, 3, 16)).setRevisions(("2002-10-16 00:00","1999-01-20 00:00","1997-11-20 00:00",)) if mibBuilder.loadTexts: snmpVacmMIB.setOrganization("SNMPv3 Working Group") if mibBuilder.loadTexts: snmpVacmMIB.setContactInfo("WG-email: snmpv3@lists.tislabs.com\nSubscribe: majordomo@lists.tislabs.com\n In message body: subscribe snmpv3\n\nCo-Chair: Russ Mundy\n Network Associates Laboratories\npostal: 15204 Omega Drive, Suite 300\n Rockville, MD 20850-4601\n USA\nemail: mundy@tislabs.com\nphone: +1 301-947-7107\n\nCo-Chair: David Harrington\n Enterasys Networks\nPostal: 35 Industrial Way\n P. O. Box 5004\n Rochester, New Hampshire 03866-5005\n USA\nEMail: dbh@enterasys.com\nPhone: +1 603-337-2614\n\nCo-editor: Bert Wijnen\n Lucent Technologies\npostal: Schagen 33\n 3461 GL Linschoten\n Netherlands\nemail: bwijnen@lucent.com\nphone: +31-348-480-685\n\nCo-editor: Randy Presuhn\n BMC Software, Inc.\n\n\n\npostal: 2141 North First Street\n San Jose, CA 95131\n USA\nemail: randy_presuhn@bmc.com\nphone: +1 408-546-1006\n\nCo-editor: Keith McCloghrie\n Cisco Systems, Inc.\npostal: 170 West Tasman Drive\n San Jose, CA 95134-1706\n USA\nemail: kzm@cisco.com\nphone: +1-408-526-5260") if mibBuilder.loadTexts: snmpVacmMIB.setDescription("The management information definitions for the\nView-based Access Control Model for SNMP.\n\nCopyright (C) The Internet Society (2002). This\nversion of this MIB module is part of RFC 3415;\nsee the RFC itself for full legal notices.") vacmMIBObjects = MibIdentifier((1, 3, 6, 1, 6, 3, 16, 1)) vacmContextTable = MibTable((1, 3, 6, 1, 6, 3, 16, 1, 1)) if mibBuilder.loadTexts: vacmContextTable.setDescription("The table of locally available contexts.\n\nThis table provides information to SNMP Command\n\n\n\nGenerator applications so that they can properly\nconfigure the vacmAccessTable to control access to\nall contexts at the SNMP entity.\n\nThis table may change dynamically if the SNMP entity\nallows that contexts are added/deleted dynamically\n(for instance when its configuration changes). Such\nchanges would happen only if the management\ninstrumentation at that SNMP entity recognizes more\n(or fewer) contexts.\n\nThe presence of entries in this table and of entries\nin the vacmAccessTable are independent. That is, a\ncontext identified by an entry in this table is not\nnecessarily referenced by any entries in the\nvacmAccessTable; and the context(s) referenced by an\nentry in the vacmAccessTable does not necessarily\ncurrently exist and thus need not be identified by an\nentry in this table.\n\nThis table must be made accessible via the default\ncontext so that Command Responder applications have\na standard way of retrieving the information.\n\nThis table is read-only. It cannot be configured via\nSNMP.") vacmContextEntry = MibTableRow((1, 3, 6, 1, 6, 3, 16, 1, 1, 1)).setIndexNames((0, "SNMP-VIEW-BASED-ACM-MIB", "vacmContextName")) if mibBuilder.loadTexts: vacmContextEntry.setDescription("Information about a particular context.") vacmContextName = MibTableColumn((1, 3, 6, 1, 6, 3, 16, 1, 1, 1, 1), SnmpAdminString().subtype(subtypeSpec=constraint.ValueSizeConstraint(0, 32))).setMaxAccess("readonly") if mibBuilder.loadTexts: vacmContextName.setDescription("A human readable name identifying a particular\ncontext at a particular SNMP entity.\n\nThe empty contextName (zero length) represents the\ndefault context.") vacmSecurityToGroupTable = MibTable((1, 3, 6, 1, 6, 3, 16, 1, 2)) if mibBuilder.loadTexts: vacmSecurityToGroupTable.setDescription("This table maps a combination of securityModel and\nsecurityName into a groupName which is used to define\nan access control policy for a group of principals.") vacmSecurityToGroupEntry = MibTableRow((1, 3, 6, 1, 6, 3, 16, 1, 2, 1)).setIndexNames((0, "SNMP-VIEW-BASED-ACM-MIB", "vacmSecurityModel"), (0, "SNMP-VIEW-BASED-ACM-MIB", "vacmSecurityName")) if mibBuilder.loadTexts: vacmSecurityToGroupEntry.setDescription("An entry in this table maps the combination of a\nsecurityModel and securityName into a groupName.") vacmSecurityModel = MibTableColumn((1, 3, 6, 1, 6, 3, 16, 1, 2, 1, 1), SnmpSecurityModel().subtype(subtypeSpec=constraint.ValueRangeConstraint(1, 2147483647L))).setMaxAccess("noaccess") if mibBuilder.loadTexts: vacmSecurityModel.setDescription("The Security Model, by which the vacmSecurityName\nreferenced by this entry is provided.\n\n\n\nNote, this object may not take the 'any' (0) value.") vacmSecurityName = MibTableColumn((1, 3, 6, 1, 6, 3, 16, 1, 2, 1, 2), SnmpAdminString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, 32))).setMaxAccess("noaccess") if mibBuilder.loadTexts: vacmSecurityName.setDescription("The securityName for the principal, represented in a\nSecurity Model independent format, which is mapped by\nthis entry to a groupName.") vacmGroupName = MibTableColumn((1, 3, 6, 1, 6, 3, 16, 1, 2, 1, 3), SnmpAdminString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, 32))).setMaxAccess("readcreate") if mibBuilder.loadTexts: vacmGroupName.setDescription("The name of the group to which this entry (e.g., the\ncombination of securityModel and securityName)\nbelongs.\n\nThis groupName is used as index into the\nvacmAccessTable to select an access control policy.\nHowever, a value in this table does not imply that an\ninstance with the value exists in table vacmAccesTable.") vacmSecurityToGroupStorageType = MibTableColumn((1, 3, 6, 1, 6, 3, 16, 1, 2, 1, 4), StorageType().clone('nonVolatile')).setMaxAccess("readcreate") if mibBuilder.loadTexts: vacmSecurityToGroupStorageType.setDescription("The storage type for this conceptual row.\nConceptual rows having the value 'permanent' need not\nallow write-access to any columnar objects in the row.") vacmSecurityToGroupStatus = MibTableColumn((1, 3, 6, 1, 6, 3, 16, 1, 2, 1, 5), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: vacmSecurityToGroupStatus.setDescription("The status of this conceptual row.\n\nUntil instances of all corresponding columns are\nappropriately configured, the value of the\n\n\n\ncorresponding instance of the vacmSecurityToGroupStatus\ncolumn is 'notReady'.\n\nIn particular, a newly created row cannot be made\nactive until a value has been set for vacmGroupName.\n\nThe RowStatus TC [RFC2579] requires that this\nDESCRIPTION clause states under which circumstances\nother objects in this row can be modified:\n\nThe value of this object has no effect on whether\nother objects in this conceptual row can be modified.") vacmAccessTable = MibTable((1, 3, 6, 1, 6, 3, 16, 1, 4)) if mibBuilder.loadTexts: vacmAccessTable.setDescription("The table of access rights for groups.\n\nEach entry is indexed by a groupName, a contextPrefix,\na securityModel and a securityLevel. To determine\nwhether access is allowed, one entry from this table\nneeds to be selected and the proper viewName from that\nentry must be used for access control checking.\n\nTo select the proper entry, follow these steps:\n\n1) the set of possible matches is formed by the\n intersection of the following sets of entries:\n\n the set of entries with identical vacmGroupName\n the union of these two sets:\n - the set with identical vacmAccessContextPrefix\n - the set of entries with vacmAccessContextMatch\n value of 'prefix' and matching\n vacmAccessContextPrefix\n intersected with the union of these two sets:\n - the set of entries with identical\n vacmSecurityModel\n - the set of entries with vacmSecurityModel\n value of 'any'\n intersected with the set of entries with\n vacmAccessSecurityLevel value less than or equal\n to the requested securityLevel\n\n\n\n2) if this set has only one member, we're done\n otherwise, it comes down to deciding how to weight\n the preferences between ContextPrefixes,\n SecurityModels, and SecurityLevels as follows:\n a) if the subset of entries with securityModel\n matching the securityModel in the message is\n not empty, then discard the rest.\n b) if the subset of entries with\n vacmAccessContextPrefix matching the contextName\n in the message is not empty,\n then discard the rest\n c) discard all entries with ContextPrefixes shorter\n than the longest one remaining in the set\n d) select the entry with the highest securityLevel\n\nPlease note that for securityLevel noAuthNoPriv, all\ngroups are really equivalent since the assumption that\nthe securityName has been authenticated does not hold.") vacmAccessEntry = MibTableRow((1, 3, 6, 1, 6, 3, 16, 1, 4, 1)).setIndexNames((0, "SNMP-VIEW-BASED-ACM-MIB", "vacmGroupName"), (0, "SNMP-VIEW-BASED-ACM-MIB", "vacmAccessContextPrefix"), (0, "SNMP-VIEW-BASED-ACM-MIB", "vacmAccessSecurityModel"), (0, "SNMP-VIEW-BASED-ACM-MIB", "vacmAccessSecurityLevel")) if mibBuilder.loadTexts: vacmAccessEntry.setDescription("An access right configured in the Local Configuration\nDatastore (LCD) authorizing access to an SNMP context.\n\nEntries in this table can use an instance value for\nobject vacmGroupName even if no entry in table\nvacmAccessSecurityToGroupTable has a corresponding\nvalue for object vacmGroupName.") vacmAccessContextPrefix = MibTableColumn((1, 3, 6, 1, 6, 3, 16, 1, 4, 1, 1), SnmpAdminString().subtype(subtypeSpec=constraint.ValueSizeConstraint(0, 32))).setMaxAccess("noaccess") if mibBuilder.loadTexts: vacmAccessContextPrefix.setDescription("In order to gain the access rights allowed by this\nconceptual row, a contextName must match exactly\n(if the value of vacmAccessContextMatch is 'exact')\nor partially (if the value of vacmAccessContextMatch\nis 'prefix') to the value of the instance of this\nobject.") vacmAccessSecurityModel = MibTableColumn((1, 3, 6, 1, 6, 3, 16, 1, 4, 1, 2), SnmpSecurityModel()).setMaxAccess("noaccess") if mibBuilder.loadTexts: vacmAccessSecurityModel.setDescription("In order to gain the access rights allowed by this\nconceptual row, this securityModel must be in use.") vacmAccessSecurityLevel = MibTableColumn((1, 3, 6, 1, 6, 3, 16, 1, 4, 1, 3), SnmpSecurityLevel()).setMaxAccess("noaccess") if mibBuilder.loadTexts: vacmAccessSecurityLevel.setDescription("The minimum level of security required in order to\ngain the access rights allowed by this conceptual\nrow. A securityLevel of noAuthNoPriv is less than\nauthNoPriv which in turn is less than authPriv.\n\nIf multiple entries are equally indexed except for\nthis vacmAccessSecurityLevel index, then the entry\nwhich has the highest value for\nvacmAccessSecurityLevel is selected.") vacmAccessContextMatch = MibTableColumn((1, 3, 6, 1, 6, 3, 16, 1, 4, 1, 4), Integer().subtype(subtypeSpec=constraint.SingleValueConstraint(2,1,)).subtype(namedValues=namedval.NamedValues(("exact", 1), ("prefix", 2), )).clone(1)).setMaxAccess("readcreate") if mibBuilder.loadTexts: vacmAccessContextMatch.setDescription("If the value of this object is exact(1), then all\nrows where the contextName exactly matches\nvacmAccessContextPrefix are selected.\n\nIf the value of this object is prefix(2), then all\nrows where the contextName whose starting octets\nexactly match vacmAccessContextPrefix are selected.\nThis allows for a simple form of wildcarding.") vacmAccessReadViewName = MibTableColumn((1, 3, 6, 1, 6, 3, 16, 1, 4, 1, 5), SnmpAdminString().subtype(subtypeSpec=constraint.ValueSizeConstraint(0, 32)).clone('')).setMaxAccess("readcreate") if mibBuilder.loadTexts: vacmAccessReadViewName.setDescription("The value of an instance of this object identifies\nthe MIB view of the SNMP context to which this\nconceptual row authorizes read access.\n\nThe identified MIB view is that one for which the\nvacmViewTreeFamilyViewName has the same value as the\ninstance of this object; if the value is the empty\nstring or if there is no active MIB view having this\nvalue of vacmViewTreeFamilyViewName, then no access\nis granted.") vacmAccessWriteViewName = MibTableColumn((1, 3, 6, 1, 6, 3, 16, 1, 4, 1, 6), SnmpAdminString().subtype(subtypeSpec=constraint.ValueSizeConstraint(0, 32)).clone('')).setMaxAccess("readcreate") if mibBuilder.loadTexts: vacmAccessWriteViewName.setDescription("The value of an instance of this object identifies\nthe MIB view of the SNMP context to which this\nconceptual row authorizes write access.\n\nThe identified MIB view is that one for which the\nvacmViewTreeFamilyViewName has the same value as the\ninstance of this object; if the value is the empty\nstring or if there is no active MIB view having this\nvalue of vacmViewTreeFamilyViewName, then no access\nis granted.") vacmAccessNotifyViewName = MibTableColumn((1, 3, 6, 1, 6, 3, 16, 1, 4, 1, 7), SnmpAdminString().subtype(subtypeSpec=constraint.ValueSizeConstraint(0, 32)).clone('')).setMaxAccess("readcreate") if mibBuilder.loadTexts: vacmAccessNotifyViewName.setDescription("The value of an instance of this object identifies\nthe MIB view of the SNMP context to which this\nconceptual row authorizes access for notifications.\n\nThe identified MIB view is that one for which the\nvacmViewTreeFamilyViewName has the same value as the\ninstance of this object; if the value is the empty\nstring or if there is no active MIB view having this\nvalue of vacmViewTreeFamilyViewName, then no access\nis granted.") vacmAccessStorageType = MibTableColumn((1, 3, 6, 1, 6, 3, 16, 1, 4, 1, 8), StorageType().clone('nonVolatile')).setMaxAccess("readcreate") if mibBuilder.loadTexts: vacmAccessStorageType.setDescription("The storage type for this conceptual row.\n\nConceptual rows having the value 'permanent' need not\nallow write-access to any columnar objects in the row.") vacmAccessStatus = MibTableColumn((1, 3, 6, 1, 6, 3, 16, 1, 4, 1, 9), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: vacmAccessStatus.setDescription("The status of this conceptual row.\n\nThe RowStatus TC [RFC2579] requires that this\nDESCRIPTION clause states under which circumstances\nother objects in this row can be modified:\n\nThe value of this object has no effect on whether\nother objects in this conceptual row can be modified.") vacmMIBViews = MibIdentifier((1, 3, 6, 1, 6, 3, 16, 1, 5)) vacmViewSpinLock = MibScalar((1, 3, 6, 1, 6, 3, 16, 1, 5, 1), TestAndIncr()).setMaxAccess("readwrite") if mibBuilder.loadTexts: vacmViewSpinLock.setDescription("An advisory lock used to allow cooperating SNMP\nCommand Generator applications to coordinate their\nuse of the Set operation in creating or modifying\nviews.\n\nWhen creating a new view or altering an existing\nview, it is important to understand the potential\ninteractions with other uses of the view. The\nvacmViewSpinLock should be retrieved. The name of\nthe view to be created should be determined to be\nunique by the SNMP Command Generator application by\nconsulting the vacmViewTreeFamilyTable. Finally,\nthe named view may be created (Set), including the\nadvisory lock.\nIf another SNMP Command Generator application has\naltered the views in the meantime, then the spin\nlock's value will have changed, and so this creation\nwill fail because it will specify the wrong value for\nthe spin lock.\n\nSince this is an advisory lock, the use of this lock\nis not enforced.") vacmViewTreeFamilyTable = MibTable((1, 3, 6, 1, 6, 3, 16, 1, 5, 2)) if mibBuilder.loadTexts: vacmViewTreeFamilyTable.setDescription("Locally held information about families of subtrees\nwithin MIB views.\n\nEach MIB view is defined by two sets of view subtrees:\n - the included view subtrees, and\n - the excluded view subtrees.\nEvery such view subtree, both the included and the\n\n\n\nexcluded ones, is defined in this table.\n\nTo determine if a particular object instance is in\na particular MIB view, compare the object instance's\nOBJECT IDENTIFIER with each of the MIB view's active\nentries in this table. If none match, then the\nobject instance is not in the MIB view. If one or\nmore match, then the object instance is included in,\nor excluded from, the MIB view according to the\nvalue of vacmViewTreeFamilyType in the entry whose\nvalue of vacmViewTreeFamilySubtree has the most\nsub-identifiers. If multiple entries match and have\nthe same number of sub-identifiers (when wildcarding\nis specified with the value of vacmViewTreeFamilyMask),\nthen the lexicographically greatest instance of\nvacmViewTreeFamilyType determines the inclusion or\nexclusion.\n\nAn object instance's OBJECT IDENTIFIER X matches an\nactive entry in this table when the number of\nsub-identifiers in X is at least as many as in the\nvalue of vacmViewTreeFamilySubtree for the entry,\nand each sub-identifier in the value of\nvacmViewTreeFamilySubtree matches its corresponding\nsub-identifier in X. Two sub-identifiers match\neither if the corresponding bit of the value of\nvacmViewTreeFamilyMask for the entry is zero (the\n'wild card' value), or if they are equal.\n\nA 'family' of subtrees is the set of subtrees defined\nby a particular combination of values of\nvacmViewTreeFamilySubtree and vacmViewTreeFamilyMask.\n\nIn the case where no 'wild card' is defined in the\nvacmViewTreeFamilyMask, the family of subtrees reduces\nto a single subtree.\n\nWhen creating or changing MIB views, an SNMP Command\nGenerator application should utilize the\nvacmViewSpinLock to try to avoid collisions. See\nDESCRIPTION clause of vacmViewSpinLock.\n\nWhen creating MIB views, it is strongly advised that\nfirst the 'excluded' vacmViewTreeFamilyEntries are\ncreated and then the 'included' entries.\n\nWhen deleting MIB views, it is strongly advised that\nfirst the 'included' vacmViewTreeFamilyEntries are\n\n\n\ndeleted and then the 'excluded' entries.\n\nIf a create for an entry for instance-level access\ncontrol is received and the implementation does not\nsupport instance-level granularity, then an\ninconsistentName error must be returned.") vacmViewTreeFamilyEntry = MibTableRow((1, 3, 6, 1, 6, 3, 16, 1, 5, 2, 1)).setIndexNames((0, "SNMP-VIEW-BASED-ACM-MIB", "vacmViewTreeFamilyViewName"), (0, "SNMP-VIEW-BASED-ACM-MIB", "vacmViewTreeFamilySubtree")) if mibBuilder.loadTexts: vacmViewTreeFamilyEntry.setDescription("Information on a particular family of view subtrees\nincluded in or excluded from a particular SNMP\ncontext's MIB view.\n\nImplementations must not restrict the number of\nfamilies of view subtrees for a given MIB view,\nexcept as dictated by resource constraints on the\noverall number of entries in the\nvacmViewTreeFamilyTable.\n\nIf no conceptual rows exist in this table for a given\nMIB view (viewName), that view may be thought of as\nconsisting of the empty set of view subtrees.") vacmViewTreeFamilyViewName = MibTableColumn((1, 3, 6, 1, 6, 3, 16, 1, 5, 2, 1, 1), SnmpAdminString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, 32))).setMaxAccess("noaccess") if mibBuilder.loadTexts: vacmViewTreeFamilyViewName.setDescription("The human readable name for a family of view subtrees.") vacmViewTreeFamilySubtree = MibTableColumn((1, 3, 6, 1, 6, 3, 16, 1, 5, 2, 1, 2), ObjectIdentifier()).setMaxAccess("noaccess") if mibBuilder.loadTexts: vacmViewTreeFamilySubtree.setDescription("The MIB subtree which when combined with the\ncorresponding instance of vacmViewTreeFamilyMask\ndefines a family of view subtrees.") vacmViewTreeFamilyMask = MibTableColumn((1, 3, 6, 1, 6, 3, 16, 1, 5, 2, 1, 3), OctetString().subtype(subtypeSpec=constraint.ValueSizeConstraint(0, 16)).clone('')).setMaxAccess("readcreate") if mibBuilder.loadTexts: vacmViewTreeFamilyMask.setDescription("The bit mask which, in combination with the\ncorresponding instance of vacmViewTreeFamilySubtree,\ndefines a family of view subtrees.\n\nEach bit of this bit mask corresponds to a\nsub-identifier of vacmViewTreeFamilySubtree, with the\nmost significant bit of the i-th octet of this octet\nstring value (extended if necessary, see below)\ncorresponding to the (8*i - 7)-th sub-identifier, and\nthe least significant bit of the i-th octet of this\noctet string corresponding to the (8*i)-th\nsub-identifier, where i is in the range 1 through 16.\n\nEach bit of this bit mask specifies whether or not\nthe corresponding sub-identifiers must match when\ndetermining if an OBJECT IDENTIFIER is in this\nfamily of view subtrees; a '1' indicates that an\nexact match must occur; a '0' indicates 'wild card',\ni.e., any sub-identifier value matches.\n\nThus, the OBJECT IDENTIFIER X of an object instance\nis contained in a family of view subtrees if, for\neach sub-identifier of the value of\nvacmViewTreeFamilySubtree, either:\n\n the i-th bit of vacmViewTreeFamilyMask is 0, or\n\n the i-th sub-identifier of X is equal to the i-th\n sub-identifier of the value of\n vacmViewTreeFamilySubtree.\n\nIf the value of this bit mask is M bits long and\n\n\n\nthere are more than M sub-identifiers in the\ncorresponding instance of vacmViewTreeFamilySubtree,\nthen the bit mask is extended with 1's to be the\nrequired length.\n\nNote that when the value of this object is the\nzero-length string, this extension rule results in\na mask of all-1's being used (i.e., no 'wild card'),\nand the family of view subtrees is the one view\nsubtree uniquely identified by the corresponding\ninstance of vacmViewTreeFamilySubtree.\n\nNote that masks of length greater than zero length\ndo not need to be supported. In this case this\nobject is made read-only.") vacmViewTreeFamilyType = MibTableColumn((1, 3, 6, 1, 6, 3, 16, 1, 5, 2, 1, 4), Integer().subtype(subtypeSpec=constraint.SingleValueConstraint(1,2,)).subtype(namedValues=namedval.NamedValues(("included", 1), ("excluded", 2), )).clone(1)).setMaxAccess("readcreate") if mibBuilder.loadTexts: vacmViewTreeFamilyType.setDescription("Indicates whether the corresponding instances of\nvacmViewTreeFamilySubtree and vacmViewTreeFamilyMask\ndefine a family of view subtrees which is included in\nor excluded from the MIB view.") vacmViewTreeFamilyStorageType = MibTableColumn((1, 3, 6, 1, 6, 3, 16, 1, 5, 2, 1, 5), StorageType().clone('nonVolatile')).setMaxAccess("readcreate") if mibBuilder.loadTexts: vacmViewTreeFamilyStorageType.setDescription("The storage type for this conceptual row.\n\nConceptual rows having the value 'permanent' need not\nallow write-access to any columnar objects in the row.") vacmViewTreeFamilyStatus = MibTableColumn((1, 3, 6, 1, 6, 3, 16, 1, 5, 2, 1, 6), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: vacmViewTreeFamilyStatus.setDescription("The status of this conceptual row.\n\n\n\nThe RowStatus TC [RFC2579] requires that this\nDESCRIPTION clause states under which circumstances\nother objects in this row can be modified:\n\nThe value of this object has no effect on whether\nother objects in this conceptual row can be modified.") vacmMIBConformance = MibIdentifier((1, 3, 6, 1, 6, 3, 16, 2)) vacmMIBCompliances = MibIdentifier((1, 3, 6, 1, 6, 3, 16, 2, 1)) vacmMIBGroups = MibIdentifier((1, 3, 6, 1, 6, 3, 16, 2, 2)) # Augmentions # Groups vacmBasicGroup = ObjectGroup((1, 3, 6, 1, 6, 3, 16, 2, 2, 1)).setObjects(("SNMP-VIEW-BASED-ACM-MIB", "vacmViewTreeFamilyStorageType"), ("SNMP-VIEW-BASED-ACM-MIB", "vacmAccessStatus"), ("SNMP-VIEW-BASED-ACM-MIB", "vacmViewTreeFamilyStatus"), ("SNMP-VIEW-BASED-ACM-MIB", "vacmAccessNotifyViewName"), ("SNMP-VIEW-BASED-ACM-MIB", "vacmGroupName"), ("SNMP-VIEW-BASED-ACM-MIB", "vacmViewSpinLock"), ("SNMP-VIEW-BASED-ACM-MIB", "vacmAccessContextMatch"), ("SNMP-VIEW-BASED-ACM-MIB", "vacmSecurityToGroupStorageType"), ("SNMP-VIEW-BASED-ACM-MIB", "vacmViewTreeFamilyMask"), ("SNMP-VIEW-BASED-ACM-MIB", "vacmViewTreeFamilyType"), ("SNMP-VIEW-BASED-ACM-MIB", "vacmAccessReadViewName"), ("SNMP-VIEW-BASED-ACM-MIB", "vacmSecurityToGroupStatus"), ("SNMP-VIEW-BASED-ACM-MIB", "vacmAccessStorageType"), ("SNMP-VIEW-BASED-ACM-MIB", "vacmContextName"), ("SNMP-VIEW-BASED-ACM-MIB", "vacmAccessWriteViewName"), ) # Exports # Module identity mibBuilder.exportSymbols("SNMP-VIEW-BASED-ACM-MIB", PYSNMP_MODULE_ID=snmpVacmMIB) # Objects mibBuilder.exportSymbols("SNMP-VIEW-BASED-ACM-MIB", snmpVacmMIB=snmpVacmMIB, vacmMIBObjects=vacmMIBObjects, vacmContextTable=vacmContextTable, vacmContextEntry=vacmContextEntry, vacmContextName=vacmContextName, vacmSecurityToGroupTable=vacmSecurityToGroupTable, vacmSecurityToGroupEntry=vacmSecurityToGroupEntry, vacmSecurityModel=vacmSecurityModel, vacmSecurityName=vacmSecurityName, vacmGroupName=vacmGroupName, vacmSecurityToGroupStorageType=vacmSecurityToGroupStorageType, vacmSecurityToGroupStatus=vacmSecurityToGroupStatus, vacmAccessTable=vacmAccessTable, vacmAccessEntry=vacmAccessEntry, vacmAccessContextPrefix=vacmAccessContextPrefix, vacmAccessSecurityModel=vacmAccessSecurityModel, vacmAccessSecurityLevel=vacmAccessSecurityLevel, vacmAccessContextMatch=vacmAccessContextMatch, vacmAccessReadViewName=vacmAccessReadViewName, vacmAccessWriteViewName=vacmAccessWriteViewName, vacmAccessNotifyViewName=vacmAccessNotifyViewName, vacmAccessStorageType=vacmAccessStorageType, vacmAccessStatus=vacmAccessStatus, vacmMIBViews=vacmMIBViews, vacmViewSpinLock=vacmViewSpinLock, vacmViewTreeFamilyTable=vacmViewTreeFamilyTable, vacmViewTreeFamilyEntry=vacmViewTreeFamilyEntry, vacmViewTreeFamilyViewName=vacmViewTreeFamilyViewName, vacmViewTreeFamilySubtree=vacmViewTreeFamilySubtree, vacmViewTreeFamilyMask=vacmViewTreeFamilyMask, vacmViewTreeFamilyType=vacmViewTreeFamilyType, vacmViewTreeFamilyStorageType=vacmViewTreeFamilyStorageType, vacmViewTreeFamilyStatus=vacmViewTreeFamilyStatus, vacmMIBConformance=vacmMIBConformance, vacmMIBCompliances=vacmMIBCompliances, vacmMIBGroups=vacmMIBGroups) # Groups mibBuilder.exportSymbols("SNMP-VIEW-BASED-ACM-MIB", vacmBasicGroup=vacmBasicGroup) PK†£=\mñ&&&pysnmp/smi/mibs/SNMP-FRAMEWORK-MIB.pyc;ò &ΘLc@sydkZdkZWnej onXdkZdkZdklZlZei ddddƒ\Z Z Z ei dddƒ\Z Zei d d d d d dddddddƒ \ ZZZZZZZZZZZei ddƒ\Zdee fd„ƒYZde efd„ƒYZdefd„ƒYZdefd„ƒYZde fd „ƒYZd!efd"„ƒYZ ed#d$d%d#d%d$d&fƒi!d'd(d)fƒZ"ei#oe"i$d*ƒnei#oe"i%d+ƒnei#oe"i&d,ƒned#d$d%d#d%d$d&d#fƒZ'ed#d$d%d#d%d$d&d#d#f ƒZ(ei#oe(i&d-ƒned#d$d%d#d%d$d&d#d.f ƒZ)ei#oe)i&d/ƒned#d$d%d#d%d$d&d.fƒZ*ed#d$d%d#d%d$d&d.d#f ƒZ+ed#d$d%d#d%d$d&d.d#d#f eƒƒi,d0ƒZ-ei#oe-i&d1ƒned#d$d%d#d%d$d&d.d#d.f eƒi.d2ei/d#d3ƒƒƒi,d0ƒZ0ei#oe0i&d4ƒned#d$d%d#d%d$d&d.d#d$f eƒi.d2ei/d5d3ƒƒƒi,d0ƒi1d6ƒZ2ei#oe2i&d7ƒned#d$d%d#d%d$d&d.d#d8f eƒi.d2ei/d9d3ƒƒƒi,d0ƒZ3ei#oe3i&d:ƒned#d$d%d#d%d$d&d$fƒZ4ed#d$d%d#d%d$d&d$d#f ƒZ5ed#d$d%d#d%d$d&d$d.f ƒZ6ed#d$d%d#d%d$d&d$d.d#f ƒi7d;d<fd;d=fd;d>fd;d?fƒZ8ei9d;d@e"ƒei9d;dededededed!e ƒei9d;dAe"dBe'dCe(dDe)dEe*dFe+d<e-d=e0d?e2d>e3dGe4dHe5dIe6ƒ ei9d;dJe8ƒdS(KN(s constraintsnamedvalsASN1sIntegersObjectIdentifiers OctetStrings SNMPv2-CONFsModuleCompliances ObjectGroups SNMPv2-SMIsBitss Integer32sModuleIdentitys MibIdentifiersObjectIdentitys MibScalarsMibTables MibTableRowsMibTableColumns TimeTickss snmpModuless SNMPv2-TCsTextualConventionsSnmpAdminStringcBs'tZdZeieiddƒZRS(Ns255tiiÿ(s__name__s __module__s displayHints OctetStrings subtypeSpecs constraintsValueSizeConstraint(((s@build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-FRAMEWORK-MIB.pysSnmpAdminStringss SnmpEngineIDcBsütZeieiddƒZddZyAeeie d„ei e i e i ƒƒdƒƒdƒZWnnXy2eeeiƒd?ƒeeiƒd @ƒZWnnXeeiƒƒZeeed ?d @ƒeed?d @ƒeed @ƒZRS( Nii s€O¸scCstt|ƒƒS(N(schrsintsx(sx((s@build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-FRAMEWORK-MIB.pys$ss.siiÿi(s__name__s __module__s OctetStrings subtypeSpecs constraintsValueSizeConstraints defaultValuesstringsjoinsmapssplitssockets gethostbynames gethostnameschrsossgetpidsintstimest(((s@build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-FRAMEWORK-MIB.pys SnmpEngineIDs !2sSnmpEngineTimecBstZeeed„ZRS(NcCsT|tjo |itj ottiƒƒ|i}nti||||ƒSdS(N( svaluesNonesselfs_valuesintstimes Integer32sclonestagSets subtypeSpec(sselfsvaluestagSets subtypeSpec((s@build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-FRAMEWORK-MIB.pysclone4s(s__name__s __module__sNonesclone(((s@build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-FRAMEWORK-MIB.pysSnmpEngineTime3ssSnmpMessageProcessingModelcBs!tZeieiddƒZRS(Nilÿÿ(s__name__s __module__s Integer32s subtypeSpecs constraintsValueRangeConstraint(((s@build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-FRAMEWORK-MIB.pysSnmpMessageProcessingModel9ssSnmpSecurityLevelcBsKtZeieidddƒZeiddfddfddfƒZRS(Niiis noAuthNoPrivs authNoPrivsauthPriv( s__name__s __module__sIntegers subtypeSpecs constraintsSingleValueConstraintsnamedvals NamedValuess namedValues(((s@build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-FRAMEWORK-MIB.pysSnmpSecurityLevel<ssSnmpSecurityModelcBs!tZeieiddƒZRS(Nilÿÿ(s__name__s __module__s Integer32s subtypeSpecs constraintsValueRangeConstraint(((s@build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-FRAMEWORK-MIB.pysSnmpSecurityModel@siiii s2002-10-14 00:00s1999-01-19 00:00s1997-11-20 00:00sSNMPv3 Working GroupsÃWG-EMail: snmpv3@lists.tislabs.com Subscribe: snmpv3-request@lists.tislabs.com Co-Chair: Russ Mundy Network Associates Laboratories postal: 15204 Omega Drive, Suite 300 Rockville, MD 20850-4601 USA EMail: mundy@tislabs.com phone: +1 301-947-7107 Co-Chair & Co-editor: David Harrington Enterasys Networks postal: 35 Industrial Way P. O. Box 5005 Rochester, New Hampshire 03866-5005 USA EMail: dbh@enterasys.com phone: +1 603-337-2614 Co-editor: Randy Presuhn BMC Software, Inc. postal: 2141 North First Street San Jose, California 95131 USA EMail: randy_presuhn@bmc.com phone: +1 408-546-1006 Co-editor: Bert Wijnen Lucent Technologies postal: Schagen 33 3461 GL Linschoten Netherlands EMail: bwijnen@lucent.com phone: +31 348-680-485 s°The SNMP Management Architecture MIB Copyright (C) The Internet Society (2002). This version of this MIB module is part of RFC 3411; see the RFC itself for full legal notices.scRegistration point for standards-track authentication protocols used in SNMP Management Frameworks.is\Registration point for standards-track privacy protocols used in SNMP Management Frameworks.sreadonlys¹An SNMP engine's administratively-unique identifier. This information SHOULD be stored in non-volatile storage so that it remains constant across re-initializations of the SNMP engine.s subtypeSpeclÿÿslThe number of times that the SNMP engine has (re-)initialized itself since snmpEngineID was last configured.issecondssThe number of seconds since the value of the snmpEngineBoots object last changed. When incrementing this object's value would cause it to exceed its maximum, snmpEngineBoots is incremented as if a re-initialization had occurred, and this object's value consequently reverts to zero.iiäsôThe maximum length in octets of an SNMP message which this SNMP engine can send or receive and process, determined as the minimum of the maximum message size values supported among all of the transports available to and supported by the engine.sSNMP-FRAMEWORK-MIBs snmpEngineIDssnmpEngineBootsssnmpEngineMaxMessageSizessnmpEngineTimesPYSNMP_MODULE_IDssnmpFrameworkMIBssnmpFrameworkAdminssnmpAuthProtocolsssnmpPrivProtocolsssnmpFrameworkMIBObjectss snmpEnginessnmpFrameworkMIBConformancessnmpFrameworkMIBCompliancesssnmpFrameworkMIBGroupsssnmpEngineGroup(:ssocketsoss ImportErrorsstringstimes pyasn1.types constraintsnamedvals mibBuilders importSymbolssIntegersObjectIdentifiers OctetStringsModuleCompliances ObjectGroupsBitss Integer32sModuleIdentitys MibIdentifiersObjectIdentitys MibScalarsMibTables MibTableRowsMibTableColumns TimeTickss snmpModulessTextualConventionsSnmpAdminStrings SnmpEngineIDsSnmpEngineTimesSnmpMessageProcessingModelsSnmpSecurityLevelsSnmpSecurityModels setRevisionsssnmpFrameworkMIBs loadTextsssetOrganizationssetContactInfossetDescriptionssnmpFrameworkAdminssnmpAuthProtocolsssnmpPrivProtocolsssnmpFrameworkMIBObjectss snmpEngines setMaxAccesss snmpEngineIDssubtypesValueRangeConstraintssnmpEngineBootsssetUnitsssnmpEngineTimessnmpEngineMaxMessageSizessnmpFrameworkMIBConformancessnmpFrameworkMIBCompliancesssnmpFrameworkMIBGroupss setObjectsssnmpEngineGroups exportSymbols(+sSnmpAdminStringssnmpFrameworkMIBConformances MibScalarssnmpEngineTimes TimeTickssModuleIdentitys SnmpEngineIDs snmpModulesssnmpFrameworkMIBObjectssBitsssnmpFrameworkAdminssnmpEngineGroups ObjectGroupssnmpFrameworkMIBCompliancessMibTableColumnssnmpEngineMaxMessageSizesSnmpSecurityModelsModuleCompliancesMibTablesObjectIdentifiersnamedvals OctetStrings MibTableRowsstringsSnmpMessageProcessingModelssnmpAuthProtocolsssnmpEngineBootsssnmpPrivProtocolss snmpEnginesIntegerssnmpFrameworkMIBs Integer32ssockets constraintsSnmpEngineTimesTextualConventions snmpEngineIDs MibIdentifiersSnmpSecurityLevelstimesossObjectIdentityssnmpFrameworkMIBGroups((s@build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-FRAMEWORK-MIB.pys?sj    !Q3   $' ' $'9 Q Z Q $''T1[PK¤l=ü ðͱž±žpysnmp/smi/mibs/SNMPv2-SMI.pyimport string from pysnmp.smi.indices import OidOrderedDict from pysnmp.smi import exval, error from pysnmp.proto import rfc1902 from pyasn1.type import constraint from pyasn1.error import ValueConstraintError, PyAsn1Error from pysnmp import debug ( Integer, ObjectIdentifier, Null ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "Null") # syntax of objects OctetString = rfc1902.OctetString Bits = rfc1902.Bits Integer32 = rfc1902.Integer32 IpAddress = rfc1902.IpAddress Counter32 = rfc1902.Counter32 Gauge32 = rfc1902.Gauge32 Unsigned32 = rfc1902.Unsigned32 TimeTicks = rfc1902.TimeTicks Opaque = rfc1902.Opaque Counter64 = rfc1902.Counter64 class ExtUTCTime(OctetString): subtypeSpec = OctetString.subtypeSpec+constraint.ConstraintsUnion(constraint.ValueSizeConstraint(11,11), constraint.ValueSizeConstraint(13,13)) # MIB tree foundation classes class MibNode: label = '' def __init__(self, name): self.name = name def __repr__(self): return '%s(%s)' % (self.__class__.__name__, self.name) def getName(self): return self.name def getLabel(self): return self.label def setLabel(self, label): self.label = label return self def clone(self, name=None): myClone = self.__class__(self.name) if name is not None: myClone.name = name if self.label is not None: myClone.label = self.label return myClone # definitions for information modules class ModuleIdentity(MibNode): def getLastUpdated(self): return getattr(self, 'lastUpdated', '') def setLastUpdated(self, v): self.lastUpdated = v return self def getOrganization(self): return getattr(self, 'organization', '') def setOrganization(self, v): self.organization = v return self def getContactInfo(self): return getattr(self, 'contactInfo', '') def setContactInfo(self, v): self.contactInfo = v return self def getDescription(self): return getattr(self, 'description', '') def setDescription(self, v): self.description = v return self def getRevisions(self): return getattr(self, 'revisions', ()) def setRevisions(self, args): self.revisions = args return self def asn1Print(self): return '\ MODULE-IDENTITY\n\ LAST-UPDATED %s\n\ ORGANIZATION \"%s\"\n\ CONTACT-INFO \"%s\"\n\ DESCRIPTION \"%s\"\n\ %s\ ' % (self.getLastUpdated(), self.getOrganization(), self.getContactInfo(), self.getDescription(), string.join(map(lambda x: "REVISION \"%s\"\n" % x, self.getRevisions()))) class ObjectIdentity(MibNode): def getStatus(self): return getattr(self, 'status', 'current') def setStatus(self, v): self.status = v return self def getDescription(self): return getattr(self, 'description', '') def setDescription(self, v): self.description = v return self def getReference(self): return getattr(self, 'reference', '') def setReference(self, v): self.reference = v return self def asn1Print(self): return '\ OBJECT-IDENTITY\n\ STATUS %s\n\ DESCRIPTION \"%s\"\n\ REFERENCE \"%s\"\ ' % (self.getStatus(), self.getDescription(), self.getReference()) # definition for objects class NotificationType(MibNode): def getObjects(self): return getattr(self, 'objects', ()) def setObjects(self, *args): self.objects = args return self def getStatus(self): return getattr(self, 'status', 'current') def setStatus(self, v): self.status = v return self def getDescription(self): return getattr(self, 'description', '') def setDescription(self, v): self.description = v return self def getRevisions(self): return getattr(self, 'revisions', ()) def setRevisions(self, args): self.revisions = args return self def asn1Print(self): return '\ NOTIFICATION-TYPE\n\ OBJECTS { %s }\n\ STATUS %s\n\ DESCRIPTION \"%s\"\n\ %s\ ' % (reduce(lambda x,y: '%s, %s' % (x[1],y[1]), self.getObjects(), ("","")), self.getStatus(), self.getDescription(), string.join(map(lambda x: "REVISION \"%s\"\n" % x, self.getRevisions()))) class MibIdentifier(MibNode): def asn1Print(self): return 'OBJECT IDENTIFIER' class ObjectType(MibNode): maxAccess = None def __init__(self, name, syntax=None): MibNode.__init__(self, name) self.syntax = syntax # XXX def __cmp__(self, other): return cmp(self.syntax, other) def __repr__(self): return '%s(%s, %s)' % ( self.__class__.__name__, self.name, self.syntax ) def getSyntax(self): return self.syntax def getUnits(self): return getattr(self, 'units', '') def setUnits(self, v): self.units = v return self def getMaxAccess(self): return getattr(self, 'maxAccess', 'not-accessible') def setMaxAccess(self, v): self.maxAccess = v return self def getStatus(self): return getattr(self, 'status', 'current') def setStatus(self, v): self.status = v return self def getDescription(self): return getattr(self, 'description', '') def setDescription(self, v): self.description = v return self def getReference(self): return getattr(self, 'reference', '') def setReference(self, v): self.reference = v return self def asn1Print(self): return '\ OBJECT-TYPE\n\ SYNTAX %s\n\ UNITS \"%s\"\n\ MAX-ACCESS %s\n\ STATUS %s\n\ DESCRIPTION \"%s\"\n\ REFERENCE \"%s\"\ ' % (self.getSyntax().__class__.__name__, self.getUnits(), self.getMaxAccess(), self.getStatus(), self.getDescription(), self.getReference()) class MibTree(ObjectType): branchVersionId = 0L # increments on tree structure change XXX maxAccess = 'not-accessible' def __init__(self, name, syntax=None): ObjectType.__init__(self, name, syntax) self._vars = OidOrderedDict() # Subtrees registration def registerSubtrees(self, *subTrees): """Register subtrees at this tree. Subtrees are always attached at the level of this tree, not subtrees.""" for subTree in subTrees: if self._vars.has_key(subTree.name): raise error.SmiError( 'MIB subtree %s already registered at %s' % (subTree.name, self) ) self._vars[subTree.name] = subTree MibTree.branchVersionId = MibTree.branchVersionId + 1 def unregisterSubtrees(self, *names): """Detach subtrees from this tree""" for name in names: # This may fail if you fill a table by exporting MibScalarInstances # but later drop them through SNMP. if not self._vars.has_key(name): raise error.SmiError( 'MIB subtree %s not registered at %s' % (name, self) ) del self._vars[name] MibTree.branchVersionId = MibTree.branchVersionId + 1 # Tree traversal def getBranch(self, name, idx): """Return a branch of this tree where the 'name' OID may reside""" name = tuple(name) # XXX if len(self.name) < len(name): for keyLen in self._vars.getKeysLens(): subName = name[:keyLen] if self._vars.has_key(subName): return self._vars[subName] raise error.NoSuchObjectError(name=name, idx=idx) def getNode(self, name, idx=None): """Return tree node found by name""" if name == self.name: return self else: return self.getBranch(name, idx).getNode(name, idx) def getNextNode(self, name, idx=None): """Return tree node next to name""" try: nextNode = self.getBranch(name, idx) except error.NoSuchObjectError: # Start from the beginning if self._vars and name <= self._vars.keys()[0]: return self._vars[self._vars.keys()[0]] else: # Try following the white rabbit at our level try: return self._vars[self._vars.nextKey(name)] except KeyError: raise error.NoSuchObjectError(idx=idx, name=name) else: try: return nextNode.getNextNode(name, idx) except error.NoSuchObjectError: try: return self._vars[self._vars.nextKey(nextNode.name)] except KeyError: raise error.NoSuchObjectError(idx=idx, name=name) # MIB instrumentation # Read operation def readTest(self, name, val, idx, (acFun, acCtx)): if name == self.name: if acFun and \ self.maxAccess != 'readonly' and \ self.maxAccess != 'readwrite' and \ self.maxAccess != 'readcreate' or \ acFun and acFun(name, self.syntax, idx, 'read', acCtx): raise error.NoAccessError(idx=idx, name=name) else: try: node = self.getBranch(name, idx) except error.NoSuchObjectError: return # missing object is not an error here node.readTest(name, val, idx, (acFun, acCtx)) def readGet(self, name, val, idx, (acFun, acCtx)): try: node = self.getBranch(name, idx) except error.NoSuchObjectError: return name, exval.noSuchInstance else: return node.readGet(name, val, idx, (acFun, acCtx)) # Read next operation is subtree-specific def readTestNext(self, name, val, idx, (acFun, acCtx)): nextName = name while 1: # XXX linear search here try: nextName = self.getNextNode(nextName, idx).name except error.NoSuchObjectError: return # missing object is not an error here try: return self.readTest(nextName, val, idx, (acFun, acCtx)) except error.NoAccessError: continue def readGetNext(self, name, val, idx, (acFun, acCtx)): nextName = name while 1: try: nextName = self.getNextNode(nextName, idx).name except error.NoSuchObjectError: return name, exval.endOfMib try: self.readTest(nextName, val, idx, (acFun, acCtx)) # XXX except error.NoAccessError: continue else: return self.readGet(nextName, val, idx, (acFun, acCtx)) # Write operation def writeTest(self, name, val, idx, (acFun, acCtx)): if name == self.name: # Make sure variable is writable if acFun and \ self.maxAccess != 'readwrite' and \ self.maxAccess != 'readcreate' or \ acFun and acFun(name, self.syntax, idx, 'write', acCtx): raise error.NotWritableError(idx=idx, name=name) else: node = self.getBranch(name, idx) node.writeTest(name, val, idx, (acFun, acCtx)) def writeCommit(self, name, val, idx, (acFun, acCtx)): self.getBranch(name, idx).writeCommit(name, val, idx, (acFun, acCtx)) def writeCleanup(self, name, val, idx, (acFun, acCtx)): self.getBranch(name, idx).writeCleanup(name, val, idx, (acFun, acCtx)) def writeUndo(self, name, val, idx, (acFun, acCtx)): self.getBranch(name, idx).writeUndo(name, val, idx, (acFun, acCtx)) class MibScalar(MibTree): """Scalar MIB variable. Implements access control checking.""" maxAccess = 'readonly' # MIB instrumentation methods # Read operation def readTest(self, name, val, idx, (acFun, acCtx)): if name == self.name: raise error.NoAccessError(idx=idx, name=name) else: MibTree.readTest(self, name, val, idx, (acFun, acCtx)) # If instance exists, check permissions if acFun and \ self.maxAccess != 'readonly' and \ self.maxAccess != 'readwrite' and \ self.maxAccess != 'readcreate' or \ acFun and acFun(name, self.syntax, idx, 'read', acCtx): raise error.NoAccessError(idx=idx, name=name) # Two-phase commit implementation def writeTest(self, name, val, idx, (acFun, acCtx)): if name == self.name: raise error.NoAccessError(idx=idx, name=name) else: MibTree.writeTest(self, name, val, idx, (acFun, acCtx)) # If instance exists, check permissions if acFun and \ self.maxAccess != 'readwrite' and \ self.maxAccess != 'readcreate' or \ acFun and acFun(name, self.syntax, idx, 'write', acCtx): raise error.NotWritableError(idx=idx, name=name) class MibScalarInstance(MibTree): """Scalar MIB variable instance. Implements read/write operations.""" def __init__(self, typeName, instId, syntax): MibTree.__init__(self, typeName+instId, syntax) self.typeName = typeName self.instId = instId self.__oldSyntax = None def getNode(self, name, idx=None): # Recursion terminator if name == self.name: return self raise error.NoSuchInstanceError(idx=idx, name=name) def getNextNode(self, name, idx=None): raise error.NoSuchInstanceError(idx=idx, name=name) # MIB instrumentation methods # Read operation def readTest(self, name, val, idx, (acFun, acCtx)): if name != self.name: raise error.NoSuchObjectError(idx=idx, name=name) def readGet(self, name, val, idx, (acFun, acCtx)): # Return current variable (name, value). This is the only API method # capable of returning anything! if name == self.name: debug.logger & debug.flagIns and debug.logger('readGet: %s=%s' % (self.name, repr(self.syntax))) return self.name, self.syntax.clone() else: raise error.NoSuchObjectError(idx=idx, name=name) # Write operation: two-phase commit def writeTest(self, name, val, idx, (acFun, acCtx)): # Make sure write's allowed if name == self.name: if hasattr(self.syntax, 'smiWrite'): self.__newSyntax = self.syntax.smiWrite(name, val, idx) else: self.__newSyntax = self.syntax.clone(val) if hasattr(self.__newSyntax, 'smiRaisePendingError'): self.__newSyntax.smiRaisePendingError() else: raise error.NoSuchObjectError(idx=idx, name=name) def writeCommit(self, name, val, idx, (acFun, acCtx)): # Backup original value if self.__oldSyntax is None: self.__oldSyntax = self.syntax # Commit new value self.syntax = self.__newSyntax def writeCleanup(self, name, val, idx, (acFun, acCtx)): debug.logger & debug.flagIns and debug.logger('writeCleanup: %s=%s' % (name, repr(val))) # Drop previous value self.__newSyntax = self.__oldSyntax = None def writeUndo(self, name, val, idx, (acFun, acCtx)): # Revive previous value self.syntax = self.__oldSyntax self.__newSyntax = self.__oldSyntax = None # Table column instance specifics # Create operation def createTest(self, name, val, idx, (acFun, acCtx)): if name == self.name: if hasattr(self.syntax, 'smiCreate'): self.__newSyntax = self.syntax.smiCreate(name, val, idx) else: self.__newSyntax = self.syntax.clone(val) else: raise error.NoSuchObjectError(idx=idx, name=name) def createCommit(self, name, val, idx, (acFun, acCtx)): if val is not None: self.writeCommit(name, val, idx, (acFun, acCtx)) def createCleanup(self, name, val, idx, (acFun, acCtx)): debug.logger & debug.flagIns and debug.logger('createCleanup: %s=%s' % (name, repr(val))) if val is not None: self.writeCleanup(name, val, idx, (acFun, acCtx)) def createUndo(self, name, val, idx, (acFun, acCtx)): if val is not None: self.writeUndo(name, val, idx, (acFun, acCtx)) # Destroy operation def destroyTest(self, name, val, idx, (acFun, acCtx)): if name == self.name: if hasattr(self.syntax, 'smiDestroy'): self.__newSyntax = self.syntax.smiDestoy(name, val) else: self.__newSyntax = self.syntax.clone(val) else: raise error.NoSuchObjectError(idx=idx, name=name) def destroyCommit(self, name, val, idx, (acFun, acCtx)): pass def destroyCleanup(self, name, val, idx, (acFun, acCtx)): pass def destroyUndo(self, name, val, idx, (acFun, acCtx)): pass # Conceptual table classes class MibTableColumn(MibScalar): """MIB table column. Manages a set of column instance variables""" protoInstance = MibScalarInstance def __init__(self, name, syntax): MibScalar.__init__(self, name, syntax) self.__createdInstances = {}; self.__destroyedInstances = {} self.__rowOpWanted = {} self.__valIdx = {} # column instance value to OID index self.__valIdxId = -1 # No branches here, terminal OIDs only def getBranch(self, name, idx): if len(self.name) < len(name): if self._vars.has_key(name): return self._vars[name] raise error.NoSuchObjectError(name=name, idx=idx) def getNode(self, name, idx=None): try: return MibScalar.getNode(self, name, idx=None) except error.NoSuchObjectError: raise error.NoSuchInstanceError(idx=idx, name=name) def getNextNode(self, name, idx=None): try: return MibScalar.getNextNode(self, name, idx=None) except error.NoSuchObjectError: raise error.NoSuchInstanceError(idx=idx, name=name) def setProtoInstance(self, protoInstance): self.protoInstance = protoInstance # Value to instances map def getNextNodeWithValue(self, name, value): if not self.__valIdx or self.__valIdxId != self.branchVersionId: # Build a value->oid index node = self while 1: try: node = self.getNextNode(node.name) except error.NoSuchInstanceError: break if not self.__valIdx.has_key(node.syntax): self.__valIdx[node.syntax] = OidOrderedDict() self.__valIdx[node.syntax][node.name] = 1 debug.logger & debug.flagIns and debug.logger('value index rebuilt at %s, %s entries' % (self.name,len(self.__valIdx))) # Sync to tree version self.__valIdxId = self.branchVersionId if self.__valIdx.has_key(value): try: return self.getNode( self.__valIdx[value].nextKey(name) ) except KeyError: raise error.NoSuchInstanceError(name=name) else: raise error.NoSuchInstanceError(name=name) # Column creation (this should probably be converted into some state # machine for clarity). Also, it might be a good idea to inidicate # defaulted cols creation in a clearer way than just a val == None. def createTest(self, name, val, idx, (acFun, acCtx)): # Make sure creation allowed, create a new column instance but # do not replace the old one if name == self.name: raise error.NoAccessError(idx=idx, name=name) if acFun and \ val is not None and \ self.maxAccess != 'readcreate' or \ acFun and acFun(name, self.syntax, idx, 'write', acCtx): debug.logger & debug.flagACL and debug.logger('createTest: %s=%s %s at %s' % (name, repr(val), self.maxAccess, self.name)) raise error.NoCreationError(idx=idx, name=name) # Create instances if either it does not yet exist (row creation) # or a value is passed (multiple OIDs in SET PDU) if val is None and self.__createdInstances.has_key(name): return self.__createdInstances[name] = self.protoInstance( self.name, name[len(self.name):], self.syntax.clone() ) self.__createdInstances[name].createTest( name, val, idx, (acFun, acCtx) ) def createCommit(self, name, val, idx, (acFun, acCtx)): # Commit new instance value if self._vars.has_key(name): # XXX if self.__createdInstances.has_key(name): self._vars[name].createCommit(name, val, idx, (acFun, acCtx)) return self.__createdInstances[name].createCommit( name, val, idx, (acFun, acCtx) ) # ...commit new column instance self._vars[name], self.__createdInstances[name] = \ self.__createdInstances[name], self._vars.get(name) def createCleanup(self, name, val, idx, (acFun, acCtx)): # Drop by-value index self.__valIdx.clear() # Drop previous column instance if self.__createdInstances.has_key(name): if self.__createdInstances[name] is not None: self.__createdInstances[name].createCleanup( name, val, idx, (acFun, acCtx) ) del self.__createdInstances[name] elif self._vars.has_key(name): self._vars[name].createCleanup(name, val, idx, (acFun, acCtx)) def createUndo(self, name, val, idx, (acFun, acCtx)): # Set back previous column instance, drop the new one if self.__createdInstances.has_key(name): self._vars[name] = self.__createdInstances[name] del self.__createdInstances[name] # Remove new instance on rollback if self._vars[name] is None: del self._vars[name] else: # Catch half-created instances (hackerish) try: self._vars[name] == 0 except PyAsn1Error: del self._vars[name] else: self._vars[name].createUndo(name, val, idx, (acFun, acCtx)) # Column destruction def destroyTest(self, name, val, idx, (acFun, acCtx)): # Make sure destruction is allowed if name == self.name: raise error.NoAccessError(idx=idx, name=name) if not self._vars.has_key(name): return if acFun and \ val is not None and \ self.maxAccess != 'readcreate' or \ acFun and acFun(name, self.syntax, idx, 'write', acCtx): raise error.NoAccessError(idx=idx, name=name) self._vars[name].destroyTest( name, val, idx, (acFun, acCtx) ) def destroyCommit(self, name, val, idx, (acFun, acCtx)): # Make a copy of column instance and take it off the tree if self._vars.has_key(name): self._vars[name].destroyCommit( name, val, idx, (acFun, acCtx) ) self.__destroyedInstances[name] = self._vars[name] del self._vars[name] def destroyCleanup(self, name, val, idx, (acFun, acCtx)): # Drop by-value index self.__valIdx.clear() # Drop instance copy if self.__destroyedInstances.has_key(name): self.__destroyedInstances[name].destroyCleanup( name, val, idx, (acFun, acCtx) ) debug.logger & debug.flagIns and debug.logger('destroyCleanup: %s=%s' % (name, repr(val))) del self.__destroyedInstances[name] def destroyUndo(self, name, val, idx, (acFun, acCtx)): # Set back column instance if self.__destroyedInstances.has_key(name): self._vars[name] = self.__destroyedInstances[name] self._vars[name].destroyUndo( name, val, idx, (acFun, acCtx) ) del self.__destroyedInstances[name] # Set/modify column def writeTest(self, name, val, idx, (acFun, acCtx)): # Besides common checks, request row creation on no-instance try: # First try the instance MibScalar.writeTest( self, name, val, idx, (acFun, acCtx) ) # ...otherwise proceed with creating new column except (error.NoSuchObjectError, error.RowCreationWanted): self.__rowOpWanted[name] = error.RowCreationWanted() self.createTest(name, val, idx, (acFun, acCtx)) except error.RowDestructionWanted: self.__rowOpWanted[name] = error.RowDestructionWanted() self.destroyTest(name, val, idx, (acFun, acCtx)) if self.__rowOpWanted.has_key(name): debug.logger & debug.flagIns and debug.logger('%s flagged by %s=%s' % (self.__rowOpWanted[name], name, repr(val))) raise self.__rowOpWanted[name] def __delegateWrite(self, subAction, name, val, idx, (acFun, acCtx)): if not self.__rowOpWanted.has_key(name): getattr(MibScalar, 'write'+subAction)( self, name, val, idx, (acFun, acCtx) ) return if isinstance(self.__rowOpWanted[name], error.RowCreationWanted): getattr(self, 'create'+subAction)( name, val, idx, (acFun, acCtx) ) if isinstance(self.__rowOpWanted[name], error.RowDestructionWanted): getattr(self, 'destroy'+subAction)( name, val, idx, (acFun, acCtx) ) def writeCommit(self, name, val, idx, (acFun, acCtx)): self.__delegateWrite( 'Commit', name, val, idx, (acFun, acCtx) ) if self.__rowOpWanted.has_key(name): raise self.__rowOpWanted[name] def writeCleanup(self, name, val, idx, (acFun, acCtx)): # Drop by-value index self.__valIdx.clear() self.__delegateWrite( 'Cleanup', name, val, idx, (acFun, acCtx) ) if self.__rowOpWanted.has_key(name): e = self.__rowOpWanted[name] del self.__rowOpWanted[name] debug.logger & debug.flagIns and debug.logger('%s dropped by %s=%s' % (e, name, repr(val))) raise e def writeUndo(self, name, val, idx, (acFun, acCtx)): self.__delegateWrite( 'Undo', name, val, idx, (acFun, acCtx) ) if self.__rowOpWanted.has_key(name): e = self.__rowOpWanted[name] del self.__rowOpWanted[name] debug.logger & debug.flagIns and debug.logger('%s dropped by %s=%s' % (e, name, repr(val))) raise e class MibTableRow(MibTree): """MIB table row (SMI 'Entry'). Manages a set of table columns. Implements row creation/destruction. """ def __init__(self, name): MibTree.__init__(self, name) self.indexNames = () self.augmentingRows = {} # Table indices resolution. Handle almost all possible rfc1902 types # explicitly rather than by means of isSuperTypeOf() method because # some subtypes may be implicitly tagged what renders base tag # unavailable. __intValue = Integer() __counter32Value = Counter32() __uint32Value = Unsigned32() __timeticksValue = TimeTicks() __counter64Value = Counter64() __strValue = OctetString() __oidValue = ObjectIdentifier() __ipaddrValue = IpAddress() __bitsValue = Bits() def setFromName(self, obj, value, impliedFlag=None): if not value: raise error.SmiError('Short OID for index %s' % repr(obj)) if self.__intValue.isSuperTypeOf(obj) or \ self.__uint32Value.isSuperTypeOf(obj) or \ self.__timeticksValue.isSuperTypeOf(obj) or \ self.__counter32Value.isSuperTypeOf(obj) or \ self.__counter64Value.isSuperTypeOf(obj): return obj.clone(value[0]), value[1:] elif self.__ipaddrValue.isSuperTypeOf(obj): return obj.clone(string.join(map(str, value[:4]), '.')), value[4:] elif self.__strValue.isSuperTypeOf(obj): # rfc1902, 7.7 if impliedFlag: s = reduce(lambda x,y: x+y, map(lambda x: chr(x), value)) return obj.clone(s), () elif obj.isFixedLength(): len = obj.getFixedLength() s = reduce(lambda x,y: x+y, map(lambda x: chr(x), value[:len])) return obj.clone(s), value[len:] else: s = reduce(lambda x,y: x+y, map(lambda x: chr(x), value[1:value[0]+1]), '') return obj.clone(s), value[value[0]+1:] elif self.__oidValue.isSuperTypeOf(obj): if impliedFlag: return obj.clone(value), () else: return obj.clone(value[1:value[0]+1]), value[value[0]+1:] # rfc2578, 7.1 elif self.__bitsValue.isSuperTypeOf(obj): s = reduce( lambda x,y: x+y, map(lambda x: chr(x),value[1:value[0]+1]),'' ) return obj.clone(s), value[value[0]+1:] else: raise error.SmiError('Unknown value type for index %s' % repr(obj)) def getAsName(self, obj, impliedFlag=None): if self.__intValue.isSuperTypeOf(obj) or \ self.__uint32Value.isSuperTypeOf(obj) or \ self.__timeticksValue.isSuperTypeOf(obj) or \ self.__counter32Value.isSuperTypeOf(obj) or \ self.__counter64Value.isSuperTypeOf(obj): return (int(obj),) elif self.__ipaddrValue.isSuperTypeOf(obj): return tuple(map(ord, obj)) elif self.__strValue.isSuperTypeOf(obj): if impliedFlag or obj.isFixedLength(): initial = () else: initial = (len(obj),) return reduce( lambda x,y: x+(y,), map(lambda x: ord(x), obj), initial ) elif self.__oidValue.isSuperTypeOf(obj): if impliedFlag: return tuple(obj) else: return (len(self.name),) + tuple(obj) # rfc2578, 7.1 elif self.__bitsValue.isSuperTypeOf(obj): return reduce( lambda x,y: x+(y,), map(lambda x: ord(x), obj),(len(obj),) ) else: raise error.SmiError('Unknown value type for index %s' % repr(obj)) # Fate sharing mechanics def announceManagementEvent(self, action, name, val, idx, (acFun, acCtx)): # Convert OID suffix into index vals instId = name[len(self.name)+1:] baseIndices = [] for impliedFlag, modName, symName in self.indexNames: mibObj, = mibBuilder.importSymbols(modName, symName) syntax, instId = self.setFromName( mibObj.syntax, instId, impliedFlag ) if self.name == mibObj.name[:-1]: baseIndices.append((mibObj.name, syntax)) if instId: raise error.SmiError( 'Excessive instance identifier sub-OIDs left at %s: %s' % (self, instId) ) if not baseIndices: return for modName, mibSym in self.augmentingRows.keys(): mibObj, = mibBuilder.importSymbols(modName, mibSym) debug.logger & debug.flagIns and debug.logger('announceManagementEvent %s to %s' % (action, mibObj)) mibObj.receiveManagementEvent( action, baseIndices, val, idx, (acFun, acCtx) ) def receiveManagementEvent( self, action, baseIndices, val, idx, (acFun, acCtx) ): # The default implementation supports one-to-one rows dependency newSuffix = () # Resolve indices intersection for impliedFlag, modName, symName in self.indexNames: mibObj, = mibBuilder.importSymbols(modName, symName) for name, syntax in baseIndices: if name == mibObj.name: newSuffix = newSuffix + self.getAsName(syntax, impliedFlag) if newSuffix: debug.logger & debug.flagIns and debug.logger('receiveManagementEvent %s for suffix %s' % (action, newSuffix)) self.__manageColumns(action, (), newSuffix, val, idx, (acFun, acCtx)) def registerAugmentions(self, *names): for modName, symName in names: if self.augmentingRows.has_key((modName, symName)): raise error.SmiError( 'Row %s already augmented by %s::%s' % \ (self.name, modName, symName) ) self.augmentingRows[(modName, symName)] = 1 return self def setIndexNames(self, *names): for name in names: self.indexNames = self.indexNames + (name,) return self def getIndexNames(self): return self.indexNames def __manageColumns(self, action, excludeName, nameSuffix, val, idx, (acFun, acCtx)): # Build a map of index names and values for automatic initialization indexVals = {}; instId = nameSuffix for impliedFlag, modName, symName in self.indexNames: mibObj, = mibBuilder.importSymbols(modName, symName) syntax, instId = self.setFromName( mibObj.syntax, instId, impliedFlag ) indexVals[mibObj.name] = syntax for name, var in self._vars.items(): if name == excludeName: continue if indexVals.has_key(name): getattr(var, action)(name + nameSuffix, indexVals[name], idx, (None, None)) else: getattr(var, action)(name + nameSuffix, val, idx, (acFun, acCtx)) debug.logger & debug.flagIns and debug.logger('__manageColumns: action %s name %s suffix %s %svalue %s' % (action, name, nameSuffix, indexVals.has_key(name) and "index " or "", repr(indexVals.get(name, val)))) def __delegate(self, subAction, name, val, idx, (acFun, acCtx)): # Relay operation request to column, expect row operation request. try: getattr(self.getBranch(name, idx), 'write'+subAction)( name, val, idx, (acFun, acCtx) ) except error.RowCreationWanted, why: self.__manageColumns( 'create'+subAction, name[:len(self.name)+1], name[len(self.name)+1:], None, idx, (acFun, acCtx) ) self.announceManagementEvent( 'create'+subAction, name, None, idx, (acFun, acCtx) ) except error.RowDestructionWanted, why: self.__manageColumns( 'destroy'+subAction, name[:len(self.name)+1], name[len(self.name)+1:], None, idx, (acFun, acCtx) ) self.announceManagementEvent( 'destroy'+subAction, name, None, idx, (acFun,acCtx) ) def writeTest(self, name, val, idx, (acFun, acCtx)): self.__delegate('Test', name, val, idx, (acFun, acCtx)) def writeCommit(self, name, val, idx, (acFun, acCtx)): self.__delegate('Commit', name, val, idx, (acFun, acCtx)) def writeCleanup(self, name, val, idx, (acFun, acCtx)): self.__delegate('Cleanup', name, val, idx, (acFun, acCtx)) def writeUndo(self, name, val, idx, (acFun, acCtx)): self.__delegate('Undo', name, val, idx, (acFun, acCtx)) # Table row management # Table row access by instance name def getInstName(self, colId, instId): return self.name + (colId,) + instId # Table index management def getIndicesFromInstId(self, instId): """Return index values for instance identification""" indices = [] for impliedFlag, modName, symName in self.indexNames: mibObj, = mibBuilder.importSymbols(modName, symName) syntax, instId = self.setFromName(mibObj.syntax, instId, impliedFlag) indices.append(syntax) # to avoid cyclic refs if instId: raise error.SmiError( 'Excessive instance identifier sub-OIDs left at %s: %s' % (self, instId) ) return tuple(indices) def getInstIdFromIndices(self, *indices): """Return column instance identification from indices""" idx = 0; instId = () for impliedFlag, modName, symName in self.indexNames: mibObj, = mibBuilder.importSymbols(modName, symName) if idx < len(indices): instId = instId + self.getAsName( mibObj.syntax.clone(indices[idx]), impliedFlag ) else: break idx = idx + 1 return instId # Table access by index def getInstNameByIndex(self, colId, *indices): """Build column instance name from components""" return self.name + (colId,) + apply( self.getInstIdFromIndices, indices ) def getInstNamesByIndex(self, *indices): """Build column instance names from indices""" instNames = [] for columnName in self._vars.keys(): instNames.append( apply(self.getInstNameByIndex, (columnName[-1],) + indices) ) return tuple(instNames) class MibTable(MibTree): """MIB table. Manages a set of TableRow's""" def __init__(self, name): MibTree.__init__(self, name) zeroDotZero = ObjectIdentity((0,0)) #dot = MibTree() iso = MibTree((1,)) org = MibIdentifier(iso.name + (3,)) dod = MibIdentifier(org.name + (6,)) internet = MibIdentifier(dod.name + (1,)) directory = MibIdentifier(internet.name + (1,)) mgmt = MibIdentifier(internet.name + (2,)) mib_2 = MibIdentifier(mgmt.name + (1,)); mib_2.label = 'mib-2' transmission = MibIdentifier(mib_2.name + (10,)) experimental = MibIdentifier(internet.name + (3,)) private = MibIdentifier(internet.name + (4,)) enterprises = MibIdentifier(private.name + (1,)) security = MibIdentifier(internet.name + (5,)) snmpV2 = MibIdentifier(internet.name + (6,)) snmpDomains = MibIdentifier(snmpV2.name + (1,)) snmpProxys = MibIdentifier(snmpV2.name +(2,)) snmpModules = MibIdentifier(snmpV2.name +(3,)) mibBuilder.exportSymbols( 'SNMPv2-SMI', Integer32=Integer32, Bits=Bits, IpAddress=IpAddress, Counter32=Counter32, Gauge32=Gauge32, Unsigned32=Unsigned32, TimeTicks=TimeTicks, Opaque=Opaque, Counter64=Counter64, ExtUTCTime=ExtUTCTime, MibNode=MibNode, ModuleIdentity=ModuleIdentity, ObjectIdentity=ObjectIdentity, NotificationType=NotificationType, MibScalar=MibScalar, MibScalarInstance=MibScalarInstance, MibIdentifier=MibIdentifier, MibTree=MibTree, MibTableColumn=MibTableColumn, MibTableRow=MibTableRow, MibTable=MibTable, zeroDotZero=zeroDotZero, iso=iso, org=org, dod=dod, internet=internet, directory=directory, mgmt=mgmt, mib_2=mib_2, transmission=transmission, experimental=experimental, private=private, enterprises=enterprises, security=security, snmpV2=snmpV2, snmpDomains=snmpDomains, snmpProxys=snmpProxys, snmpModules=snmpModules ) # XXX # getAsName/setFromName goes out of MibRow? # revisit getNextNode() -- needs optimization PK†£=Ø7Œ\BýBýpysnmp/smi/mibs/RFC1213-MIB.pyc;ò %ÆËIc@söIdklZlZeiddddƒ\ZZZeiddƒ\Zeiddd d d d d d dddddddƒ\Z Z Z Z Z Z ZZZZZZZZdefd„ƒYZdefd„ƒYZeddddddfƒidƒZedddddddfƒZeddddddddfeƒideiddƒƒƒid ƒZeioeid!ƒneddddddddfeƒƒid ƒZ eioe id"ƒneddddddddfeƒƒid ƒZ!eioe!id#ƒnedddddddd$feƒideiddƒƒƒid%ƒZ"eioe"id&ƒnedddddddd'feƒideiddƒƒƒid%ƒZ#eioe#id(ƒneddddddddfeƒideiddƒƒƒid%ƒZ$eioe$id)ƒnedddddddd*fe ƒidei%dd+ƒƒƒid ƒZ&eioe&id,ƒnedddddddfƒZ'eddddddddfe ƒƒid ƒZ(eioe(id-ƒneddddddddfƒZ)eioe)id.ƒnedddddddddf ƒi*dd/d0fƒZ+eioe+id1ƒneddddddddddf e ƒƒid ƒZ,eioe,id2ƒneddddddddddf eƒideiddƒƒƒid ƒZ-eioe-id3ƒneddddddddddf eƒidei.d4d5d6d'd7d8d$d9d:d;d<d*dd=d>d?d@dAddBdCdDdEdFdGdHdIddJddKdLƒ ƒidMei/dNdfdOdKfdPdFfdQd:fdRdEfdSd@fdTdDfdUd>fdVd=fdWdIfdXdCfdYdfdZdAfd[dBfd\d4fd]d8fd^d6fd_dGfd`d;fdadJfdbd9fdcdLfdddfded7fdfd<fdgd5fdhd$fdid'fdjdfdkd*fdld?fdmdHfƒ ƒƒid ƒZ0eioe0idnƒnedddddddddd$f e ƒƒid ƒZ1eioe1idoƒnedddddddddd'f e ƒƒid ƒZ2eioe2idpƒneddddddddddf eƒƒid ƒZ3eioe3idqƒnedddddddddd*f eƒidei.dddƒƒidMei/drdfdsdfdtdfƒƒƒid%ƒZ4eioe4iduƒnedddddddddd?f eƒidei.dddƒƒidMei/drdfdsdfdtdfƒƒƒid ƒZ5eioe5idvƒneddddddddddHf eƒƒid ƒZ6eioe6idwƒneddddddddddKf e ƒƒid ƒZ7eioe7idxƒneddddddddddFf e ƒƒid ƒZ8eioe8idyƒnedddddddddd:f e ƒƒid ƒZ9eioe9idzƒneddddddddddEf e ƒƒid ƒZ:eioe:id{ƒnedddddddddd@f e ƒƒid ƒZ;eioe;id|ƒneddddddddddDf e ƒƒid ƒZ<eioe<id}ƒnedddddddddd>f e ƒƒid ƒZ=eioe=id~ƒnedddddddddd=f e ƒƒid ƒZ>eioe>idƒneddddddddddIf e ƒƒid ƒZ?eioe?id€ƒneddddddddddCf e ƒƒid ƒZ@eioe@idƒneddddddddddAf e ƒƒid ƒZAeioeAid‚ƒneddddddddddBf e ƒƒid ƒZBeioeBidƒƒnedddddddddd4f eƒƒid ƒZCeioeCid„ƒnedddddddfƒZDeddddddddfƒZEeioeEid…ƒnedddddddddf ƒi*dd/d†fdd/d‡fdd/dˆfƒZFeioeFid‰ƒneddddddddddf e ƒƒid%ƒZGeioeGidŠƒneddddddddddf eƒƒid%ƒZHeioeHid‹ƒneddddddddddf e ƒƒid%ƒZIeioeIidŒƒneddddddddddf edƒƒidŽƒZJeddddddd$fƒZKeddddddd$dfeƒidei.ddƒƒidMei/ddfddfƒƒƒid%ƒZLeioeLid‘ƒneddddddd$dfe ƒƒid%ƒZMeioeMid’ƒneddddddd$dfe ƒƒid ƒZNeioeNid“ƒneddddddd$d$fe ƒƒid ƒZOeioeOid”ƒneddddddd$d'fe ƒƒid ƒZPeioePid•ƒneddddddd$dfe ƒƒid ƒZQeioeQid–ƒneddddddd$d*fe ƒƒid ƒZReioeRid—ƒneddddddd$d?fe ƒƒid ƒZSeioeSid˜ƒneddddddd$dHfe ƒƒid ƒZTeioeTid™ƒneddddddd$dKfe ƒƒid ƒZUeioeUidšƒneddddddd$dFfe ƒƒid ƒZVeioeVid›ƒneddddddd$d:fe ƒƒid ƒZWeioeWidœƒneddddddd$dEfe ƒƒid ƒZXeioeXidƒneddddddd$d@fe ƒƒid ƒZYeioeYidžƒneddddddd$dDfe ƒƒid ƒZZeioeZidŸƒneddddddd$d>fe ƒƒid ƒZ[eioe[id ƒneddddddd$d=fe ƒƒid ƒZ\eioe\id¡ƒneddddddd$dIfe ƒƒid ƒZ]eioe]id¢ƒneddddddd$dCfe ƒƒid ƒZ^eioe^id£ƒneddddddd$dAfƒZ_eioe_id¤ƒneddddddd$dAdf ƒi*dd/d¥fƒZ`eioe`id¦ƒneddddddd$dAddf e ƒƒid ƒZaeioeaid§ƒneddddddd$dAddf e ƒƒid ƒZbeioebid¨ƒneddddddd$dAddf e ƒƒid ƒZceioecid©ƒneddddddd$dAdd$f e ƒƒid ƒZdeioedidªƒneddddddd$dAdd'f e ƒidei%dd«ƒƒƒid ƒZeeioeeid¬ƒneddddddd$dBfƒZfeioefid­ƒneddddddd$dBdf ƒi*dd/d®fƒZgeioegid¯ƒneddddddd$dBddf e ƒƒid%ƒZheioehid°ƒneddddddd$dBddf e ƒƒid%ƒZieioeiid±ƒneddddddd$dBddf e ƒƒid%ƒZjeioejid²ƒneddddddd$dBdd$f e ƒƒid%ƒZkeioekid³ƒneddddddd$dBdd'f e ƒƒid%ƒZleioelid³ƒneddddddd$dBddf e ƒƒid%ƒZmeioemid³ƒneddddddd$dBdd*f e ƒƒid%ƒZneioenid´ƒneddddddd$dBdd?f eƒidei.d$dddƒƒidMei/dNdfdµdfd¶dfd·d$fƒƒƒid%ƒZoeioeoid¸ƒneddddddd$dBddHf eƒidei.d@d:ddEd'd?dKdFddHd$dd*dƒƒidMei/dNdfd¹dKfdºdFfd»d:fd¼dEfd½d@fd¾dfd¿dfdÀd$fdÁd'fdÂdfdÃd*fdÄd?fdÅdHfƒƒƒid ƒZpeioepidƃneddddddd$dBddKf e ƒƒid%ƒZqeioeqidǃneddddddd$dBddFf e ƒƒid%ƒZreioeridȃneddddddd$dBdd:f e ƒƒid%ƒZseioesid³ƒneddddddd$dBddEf eƒƒid ƒZteioetidɃneddddddd$d4fƒZueioeuidʃneddddddd$d4df ƒi*dd/dËfdd/dÌfƒZveioevid̓neddddddd$d4ddf e ƒƒid%ƒZweioewidŠƒneddddddd$d4ddf eƒƒid%ƒZxeioexid΃neddddddd$d4ddf e ƒƒid%ƒZyeioeyidσneddddddd$d4dd$f eƒidei.d$dddƒƒidMei/dNdfdµdfdÐdfdÑd$fƒƒƒid%ƒZzeioezidÒƒneddddddd$d8fe ƒƒid ƒZ{eioe{idÓƒneddddddd'fƒZ|eddddddd'dfe ƒƒid ƒZ}eioe}idÔƒneddddddd'dfe ƒƒid ƒZ~eioe~idÕƒneddddddd'dfe ƒƒid ƒZeioeidÖƒneddddddd'd$fe ƒƒid ƒZ€eioe€id׃neddddddd'd'fe ƒƒid ƒZeioeid؃neddddddd'dfe ƒƒid ƒZ‚eioe‚idÙƒneddddddd'd*fe ƒƒid ƒZƒeioeƒidÚƒneddddddd'd?fe ƒƒid ƒZ„eioe„idÛƒneddddddd'dHfe ƒƒid ƒZ…eioe…id܃neddddddd'dKfe ƒƒid ƒZ†eioe†id݃neddddddd'dFfe ƒƒid ƒZ‡eioe‡idÞƒneddddddd'd:fe ƒƒid ƒZˆeioeˆid߃neddddddd'dEfe ƒƒid ƒZ‰eioe‰idàƒneddddddd'd@fe ƒƒid ƒZŠeioeŠidáƒneddddddd'dDfe ƒƒid ƒZ‹eioe‹idâƒneddddddd'd>fe ƒƒid ƒZŒeioeŒidãƒneddddddd'd=fe ƒƒid ƒZeioeidäƒneddddddd'dIfe ƒƒid ƒZŽeioeŽidåƒneddddddd'dCfe ƒƒid ƒZeioeidæƒneddddddd'dAfe ƒƒid ƒZeioeidçƒneddddddd'dBfe ƒƒid ƒZ‘eioe‘idèƒneddddddd'd4fe ƒƒid ƒZ’eioe’idéƒneddddddd'd8fe ƒƒid ƒZ“eioe“idêƒneddddddd'd6fe ƒƒid ƒZ”eioe”idëƒneddddddd'dGfe ƒƒid ƒZ•eioe•idìƒneddddddd'd;fe ƒƒid ƒZ–eioe–idíƒnedddddddfƒZ—eddddddddfeƒidei.d$dddƒƒidMei/dNdfdîdfdïdfdðd$fƒƒƒid ƒZ˜eioe˜idñƒneddddddddfe ƒƒid ƒZ™eioe™idòƒneddddddddfe ƒƒid ƒZšeioešidóƒnedddddddd$fe ƒƒid ƒZ›eioe›idôƒnedddddddd'fe ƒƒid ƒZœeioeœidõƒneddddddddfe ƒƒid ƒZeioeidöƒnedddddddd*fe ƒƒid ƒZžeioežid÷ƒnedddddddd?fe ƒƒid ƒZŸeioeŸidøƒneddddddddHfe ƒƒid ƒZ eioe idùƒneddddddddKfe ƒƒid ƒZ¡eioe¡idúƒneddddddddFfe ƒƒid ƒZ¢eioe¢idûƒnedddddddd:fe ƒƒid ƒZ£eioe£idüƒneddddddddEfƒZ¤eioe¤idýƒneddddddddEdf ƒi*dd/dþfdd/dÿfdd/dfdd/dfƒZ¥eioe¥idƒneddddddddEddf eƒidei.d$d'd*dFdHd?d:dddKddƒ ƒidMei/ddfddKfddFfdd:fddfddfd d$fd d'fd dfd d*fd d?fddHfƒ ƒƒid%ƒZ¦eioe¦idƒneddddddddEddf e ƒƒid ƒZ§eioe§idƒneddddddddEddf e ƒidei%dd«ƒƒƒid ƒZ¨eioe¨idƒneddddddddEdd$f e ƒƒid ƒZ©eioe©idƒneddddddddEdd'f e ƒidei%dd«ƒƒƒid ƒZªeioeªidƒnedddddddd@fe ƒƒid ƒZ«eioe«idƒneddddddddDfe ƒƒid ƒZ¬eioe¬idƒneddddddd*fƒZ­eddddddd*dfe ƒƒid ƒZ®eioe®idƒneddddddd*dfe ƒƒid ƒZ¯eioe¯idƒneddddddd*dfe ƒƒid ƒZ°eioe°idƒneddddddd*d$fe ƒƒid ƒZ±eioe±idƒneddddddd*d'fƒZ²eioe²idƒneddddddd*d'df ƒi*dd/dfdd/dfƒZ³eioe³idƒneddddddd*d'ddf e ƒƒid ƒZ´eioe´idƒneddddddd*d'ddf e ƒidei%dd«ƒƒƒid ƒZµeioeµidƒneddddddd?fƒZ¶eddddddd?dfe ƒƒid ƒZ·eioe·id ƒneddddddd?dfe ƒƒid ƒZ¸eioe¸id!ƒneddddddd?dfe ƒƒid ƒZ¹eioe¹id"ƒneddddddd?d$fe ƒƒid ƒZºeioeºid#ƒneddddddd?d'fƒZ»eioe»id$ƒneddddddd?d'df ƒi*dd/d%fƒZ¼eioe¼id&ƒneddddddd?d'ddf eƒidei.d$ddd'dƒƒidMei/d'dfd(dfdsdfdrd$fd)d'fƒƒƒid ƒZ½eioe½id*ƒneddddddd?d'ddf e ƒƒid ƒZ¾eioe¾id+ƒneddddddd?d'ddf e ƒƒid ƒZ¿eioe¿id,ƒneddddddd?d'dd$f e ƒƒid ƒZÀeioeÀid-ƒneddddddd?d'dd'f e ƒƒid ƒZÁeioeÁid.ƒneddddddd?d'ddf e ƒƒid ƒZÂeioeÂid/ƒneddddddd?d'dd*f e ƒƒid ƒZÃeioeÃid0ƒneddddddd?d'dd?f e ƒƒid ƒZÄeioeÄid1ƒneddddddd?d'ddHf e ƒƒid ƒZÅeioeÅid2ƒneddddddd?d'ddKf e ƒƒid ƒZÆeioeÆid3ƒneddddddd?d'ddFf e ƒƒid ƒZÇeioeÇid4ƒneddddddd?d'dd:f e ƒƒid ƒZÈeioeÈid5ƒneddddddd?d'ddEf e ƒƒid ƒZÉeioeÉid6ƒneddddddd?d'dd@f eƒidei.ddƒƒidMei/d7dfd8dfƒƒƒid ƒZÊeioeÊid9ƒneddddddd?d'ddDf eƒidei.ddƒƒidMei/d:dfd;dfƒƒƒid%ƒZËeioeËid<ƒneddddddd?dfe ƒƒid ƒZÌeioeÌid=ƒnedddddddKfƒZÍedddddddFfƒZÎedddddddFdfe ƒƒid ƒZÏeioeÏid>ƒnedddddddFdfe ƒƒid ƒZÐeioeÐid?ƒnedddddddFdfe ƒƒid ƒZÑeioeÑid@ƒnedddddddFd$fe ƒƒid ƒZÒeioeÒidAƒnedddddddFd'fe ƒƒid ƒZÓeioeÓidBƒnedddddddFdfe ƒƒid ƒZÔeioeÔidCƒnedddddddFd?fe ƒƒid ƒZÕeioeÕidDƒnedddddddFdHfe ƒƒid ƒZÖeioeÖidEƒnedddddddFdKfe ƒƒid ƒZ×eioe×idFƒnedddddddFdFfe ƒƒid ƒZØeioeØidGƒnedddddddFd:fe ƒƒid ƒZÙeioeÙidHƒnedddddddFdEfe ƒƒid ƒZÚeioeÚidIƒnedddddddFd@fe ƒƒid ƒZÛeioeÛidJƒnedddddddFdDfe ƒƒid ƒZÜeioeÜidKƒnedddddddFd>fe ƒƒid ƒZÝeioeÝidLƒnedddddddFd=fe ƒƒid ƒZÞeioeÞidMƒnedddddddFdIfe ƒƒid ƒZßeioeßidNƒnedddddddFdCfe ƒƒid ƒZàeioeàidOƒnedddddddFdAfe ƒƒid ƒZáeioeáidPƒnedddddddFdBfe ƒƒid ƒZâeioeâidQƒnedddddddFd4fe ƒƒid ƒZãeioeãidRƒnedddddddFd6fe ƒƒid ƒZäeioeäidSƒnedddddddFdGfe ƒƒid ƒZåeioeåidTƒnedddddddFd;fe ƒƒid ƒZæeioeæidUƒnedddddddFdJfe ƒƒid ƒZçeioeçidVƒnedddddddFd9fe ƒƒid ƒZèeioeèidWƒnedddddddFdLfe ƒƒid ƒZéeioeéidXƒnedddddddFd7feƒidei.ddƒƒidMei/dYdfdZdfƒƒƒid%ƒZêeioeêid[ƒneiëd/dedeƒeiëd/d\ed]ed^ed_e d`e!dae"dbe#dce$dde&dee'dfe(dge)dhe+d0e,die-dje0dke1dle2dme3dne4doe5dpe6dqe7dre8dse9dte:due;dve<dwe=dxe>dye?dze@d{eAd|eBd}eCd~eDdeEd€eFd†eGdeHdˆeId‡eJd‚eKdƒeLd„eMd…eNd†eOd‡ePdˆeQd‰eRdŠeSd‹eTdŒeUdeVdŽeWdeXdeYd‘eZd’e[d“e\d”e]d•e^d–e_d—e`d¥ead˜ebd™ecdšedd›eedœefdegd®ehdžeidŸejd ekd¡eld¢emd£end¤eod¥epd¦eqd§erd¨esd©etdªeud«evdËewd¬exdÌeyd­ezd®e{dÀe|d¯e}d°e~d±ed²e€d³ed´e‚dµeƒd¶e„d·e…d¸e†d¹e‡dºeˆd»e‰d¼eŠd½e‹d¾eŒd¿edÀeŽdÁedÂedÃe‘dÄe’dÅe“dÆe”dÇe•dÈe–dÉe—dÊe˜dËe™dÌešdÍe›dÎeœdÏedÐeždÑeŸƒeiëd/dÒe dÓe¡dÔe¢dÕe£dÖe¤d×e¥dØe¦dþe§dÿe¨de©deªdÙe«dÚe¬dÛe­dÜe®dÝe¯dÞe°dße±dàe²dáe³de´deµdÁe¶dâe·dãe¸däe¹dåeºdæe»dçe¼dèe½d%e¾dée¿dêeÀdëeÁdìeÂdíeÃdîeÄdïeÅdðeÆdñeÇdòeÈdóeÉdôeÊdõeËdöeÌd÷eÍdøeÎdùeÏdúeÐdûeÑdüeÒdýeÓdþeÔdÿeÕdeÖde×deØdeÙdeÚdeÛdeÜdeÝdeÞd eßd eàd eád eâd eãdeädeådeædeçdeèdeédeêƒKdS((s constraintsnamedvalsASN1sIntegersObjectIdentifiers OctetStrings RFC1155-SMIsNetworkAddresss SNMPv2-SMIsBitss Counter32sGauge32s Integer32s IpAddresss MibIdentifiers MibScalarsMibTables MibTableRowsMibTableColumns TimeTickssmgmts DisplayStringcBstZRS(N(s__name__s __module__(((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/RFC1213-MIB.pys DisplayStringss PhysAddresscBstZRS(N(s__name__s __module__(((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/RFC1213-MIB.pys PhysAddresssiiiismib-2s subtypeSpeciiÿsreadonlysÿA textual description of the entity. This value should include the full name and version identification of the system's hardware type, software operating-system, and networking software. It is mandatory that this only contain printable ASCII characters.s±The vendor's authoritative identification of the network management subsystem contained in the entity. This value is allocated within the SMI enterprises subtree (1.3.6.1.4.1) and provides an easy and unambiguous means for determining `what kind of box' is being managed. For example, if vendor `Flintstones, Inc.' was assigned the subtree 1.3.6.1.4.1.4242, it could assign the identifier 1.3.6.1.4.1.4242.1.1 to its `Fred Router'.spThe time (in hundredths of a second) since the network management portion of the system was last re-initialized.is readwrites€The textual identification of the contact person for this managed node, together with information on how to contact this person.isxAn administratively-assigned name for this managed node. By convention, this is the node's fully-qualified domain name.sIThe physical location of this node (e.g., `telephone closet, 3rd floor').iis‰A value which indicates the set of services that this entity primarily offers. The value is a sum. This sum initially takes the value zero, Then, for each layer, L, in the range 1 through 7, that this node performs transactions for, 2 raised to (L - 1) is added to the sum. For example, a node which performs primarily routing functions would have a value of 4 (2^(3-1)). In contrast, a node which is a host offering application services would have a value of 72 (2^(4-1) + 2^(7-1)). Note that in the context of the Internet suite of protocols, values should be calculated accordingly: layer functionality 1 physical (e.g., repeaters) 2 datalink/subnetwork (e.g., bridges) 3 internet (e.g., IP gateways) 4 end-to-end (e.g., IP hosts) 7 applications (e.g., mail relays) For systems including OSI protocols, layers 5 and 6 may also be counted.s\The number of network interfaces (regardless of their current state) present on this system.sVA list of interface entries. The number of entries is given by the value of ifNumber.s RFC1213-MIBsifIndexscAn interface entry containing objects at the subnetwork layer and below for a particular interface.súA unique value for each interface. Its value ranges between 1 and the value of ifNumber. The value for each interface must remain constant at least from one re-initialization of the entity's network management system to the next re- initialization.s²A textual string containing information about the interface. This string should include the name of the manufacturer, the product name and the version of the hardware interface.ii iiiii iiiiiiiiiii i ii iii is namedValuessothers iso88026-mansstarLansproteon-10Mbitsproteon-80Mbits hyperchannelsfddislapbssdlcsds1se1s regular1822s basicISDNs primaryISDNspropPointToPointSerialspppssoftwareLoopbackseonsethernet-3Mbitsnsipsslipsultrashdh1822sds3ssips frame-relaysddn-x25s rfc877-x25sethernet-csmacdsiso88023-csmacdsiso88024-tokenBussiso88025-tokenRingsŒThe type of interface, distinguished according to the physical/link protocol(s) immediately `below' the network layer in the protocol stack.søThe size of the largest datagram which can be sent/received on the interface, specified in octets. For interfaces that are used for transmitting network datagrams, this is the size of the largest network datagram that can be sent on the interface.sÜAn estimate of the interface's current bandwidth in bits per second. For interfaces which do not vary in bandwidth or for those where no accurate estimation can be made, this object should contain the nominal bandwidth.sîThe interface's address at the protocol layer immediately `below' the network layer in the protocol stack. For interfaces which do not have such an address (e.g., a serial line), this object should contain an octet string of zero length.supsdownstestingsnThe desired state of the interface. The testing(3) state indicates that no operational packets can be passed.syThe current operational state of the interface. The testing(3) state indicates that no operational packets can be passed.sñThe value of sysUpTime at the time the interface entered its current operational state. If the current state was entered prior to the last re- initialization of the local network management subsystem, then this object contains a zero value.sSThe total number of octets received on the interface, including framing characters.sNThe number of subnetwork-unicast packets delivered to a higher-layer protocol.s}The number of non-unicast (i.e., subnetwork- broadcast or subnetwork-multicast) packets delivered to a higher-layer protocol.súThe number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space.svThe number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol.stThe number of packets received via the interface which were discarded because of an unknown or unsupported protocol.sZThe total number of octets transmitted out of the interface, including framing characters.s¢The total number of packets that higher-level protocols requested be transmitted to a subnetwork-unicast address, including those that were discarded or not sent.sÓThe total number of packets that higher-level protocols requested be transmitted to a non- unicast (i.e., a subnetwork-broadcast or subnetwork-multicast) address, including those that were discarded or not sent.sàThe number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being transmitted. One possible reason for discarding such a packet could be to free up buffer space.sOThe number of outbound packets that could not be transmitted because of errors.s3The length of the output packet queue (in packets).sïA reference to MIB definitions specific to the particular media being used to realize the interface. For example, if the interface is realized by an ethernet, then the value of this object refers to a document defining objects specific to ethernet. If this information is not present, its value should be set to the OBJECT IDENTIFIER { 0 0 }, which is a syntatically valid object identifier, and any conformant implementation of ASN.1 and BER must be able to generate and recognize this value.sEThe Address Translation tables contain the NetworkAddress to `physical' address equivalences. Some interfaces do not use translation tables for determining address equivalences (e.g., DDN-X.25 has an algorithmic method); if all interfaces are of this type, then the Address Translation table is empty, i.e., has zero entries.s atIfIndexsatNetAddressPlaceholders atNetAddresssIEach entry contains one NetworkAddress to `physical' address equivalence.s½The interface on which this entry's equivalence is effective. The interface identified by a particular value of this index is the same interface as identified by the same value of ifIndex.s‰The media-dependent `physical' address. Setting this object to a null string (one of zero length) has the effect of invaliding the corresponding entry in the atTable object. That is, it effectively dissasociates the interface identified with said entry from the mapping identified with said entry. It is an implementation-specific matter as to whether the agent removes an invalidated entry from the table. Accordingly, management stations must be prepared to receive tabular information from agents that corresponds to entries not currently in use. Proper interpretation of such entries requires examination of the relevant atPhysAddress object.sbThe NetworkAddress (e.g., the IP address) corresponding to the media-dependent `physical' address.i 'snot-accessibles forwardingsnot-forwardingsõThe indication of whether this entity is acting as an IP gateway in respect to the forwarding of datagrams received by, but not addressed to, this entity. IP gateways forward datagrams. IP hosts do not (except those source-routed via the host). Note that for some managed nodes, this object may take on only a subset of the values possible. Accordingly, it is appropriate for an agent to return a `badValue' response if a management station attempts to change this object to an inappropriate value.sµThe default value inserted into the Time-To-Live field of the IP header of datagrams originated at this entity, whenever a TTL value is not supplied by the transport layer protocol.s`The total number of input datagrams received from interfaces, including those received in error.sßThe number of input datagrams discarded due to errors in their IP headers, including bad checksums, version number mismatch, other format errors, time-to-live exceeded, errors discovered in processing their IP options, etc.s¼The number of input datagrams discarded because the IP address in their IP header's destination field was not a valid address to be received at this entity. This count includes invalid addresses (e.g., 0.0.0.0) and addresses of unsupported Classes (e.g., Class E). For entities which are not IP Gateways and therefore do not forward datagrams, this counter includes datagrams discarded because the destination address was not a local address.swThe number of input datagrams for which this entity was not their final IP destination, as a result of which an attempt was made to find a route to forward them to that final destination. In entities which do not act as IP Gateways, this counter will include only those packets which were Source-Routed via this entity, and the Source- Route option processing was successful.s|The number of locally-addressed datagrams received successfully but discarded because of an unknown or unsupported protocol.sThe number of input IP datagrams for which no problems were encountered to prevent their continued processing, but which were discarded (e.g., for lack of buffer space). Note that this counter does not include any datagrams discarded while awaiting re-assembly.saThe total number of input datagrams successfully delivered to IP user-protocols (including ICMP).sÏThe total number of IP datagrams which local IP user-protocols (including ICMP) supplied to IP in requests for transmission. Note that this counter does not include any datagrams counted in ipForwDatagrams.s@The number of output IP datagrams for which no problem was encountered to prevent their transmission to their destination, but which were discarded (e.g., for lack of buffer space). Note that this counter would include datagrams counted in ipForwDatagrams if any such packets met this (discretionary) discard criterion.sHThe number of IP datagrams discarded because no route could be found to transmit them to their destination. Note that this counter includes any packets counted in ipForwDatagrams which meet this `no-route' criterion. Note that this includes any datagarms which a host cannot route because all of its default gateways are down.srThe maximum number of seconds which received fragments are held while they are awaiting reassembly at this entity.sRThe number of IP fragments received which needed to be reassembled at this entity.s6The number of IP datagrams successfully re- assembled.s?The number of failures detected by the IP re- assembly algorithm (for whatever reason: timed out, errors, etc). Note that this is not necessarily a count of discarded IP fragments since some algorithms (notably the algorithm in RFC 815) can lose track of the number of fragments by combining them as they are received.sQThe number of IP datagrams that have been successfully fragmented at this entity.sªThe number of IP datagrams that have been discarded because they needed to be fragmented at this entity but could not be, e.g., because their Don't Fragment flag was set.siThe number of IP datagram fragments that have been generated as a result of fragmentation at this entity.sKThe table of addressing information relevant to this entity's IP addresses.s ipAdEntAddrsAThe addressing information for one of this entity's IP addresses.sEThe IP address to which this entry's addressing information pertains.sÚThe index value which uniquely identifies the interface to which this entry is applicable. The interface identified by a particular value of this index is the same interface as identified by the same value of ifIndex.s©The subnet mask associated with the IP address of this entry. The value of the mask is an IP address with all the network bits set to 1 and all the hosts bits set to 0.s€The value of the least-significant bit in the IP broadcast address used for sending datagrams on the (logical) interface associated with the IP address of this entry. For example, when the Internet standard all-ones broadcast address is used, the value will be 1. This value applies to both the subnet and network broadcasts addresses used by the entity on this (logical) interface.iÿÿs‡The size of the largest IP datagram which this entity can re-assemble from incoming IP fragmented datagrams received on this interface.sThis entity's IP Routing table.s ipRouteDests$A route to a particular destination.s0The destination IP address of this route. An entry with a value of 0.0.0.0 is considered a default route. Multiple routes to a single destination can appear in the table, but access to such multiple entries is dependent on the table- access mechanisms defined by the network management protocol in use.sùThe index value which uniquely identifies the local interface through which the next hop of this route should be reached. The interface identified by a particular value of this index is the same interface as identified by the same value of ifIndex.sØThe primary routing metric for this route. The semantics of this metric are determined by the routing-protocol specified in the route's ipRouteProto value. If this metric is not used, its value should be set to -1.sÙAn alternate routing metric for this route. The semantics of this metric are determined by the routing-protocol specified in the route's ipRouteProto value. If this metric is not used, its value should be set to -1.sÊThe IP address of the next hop of this route. (In the case of a route bound to an interface which is realized via a broadcast media, the value of this field is the agent's IP address on that interface.)sinvalidsdirectsindirectsæThe type of route. Note that the values direct(3) and indirect(4) refer to the notion of direct and indirect routing in the IP architecture. Setting this object to the value invalid(2) has the effect of invalidating the corresponding entry in the ipRouteTable object. That is, it effectively dissasociates the destination identified with said entry from the route identified with said entry. It is an implementation-specific matter as to whether the agent removes an invalidated entry from the table. Accordingly, management stations must be prepared to receive tabular information from agents that corresponds to entries not currently in use. Proper interpretation of such entries requires examination of the relevant ipRouteType object.ses-iss ciscoIgrps bbnSpfIgpsospfsbgpslocalsnetmgmtsicmpsegpsggpshellosripsis-iss®The routing mechanism via which this route was learned. Inclusion of values for gateway routing protocols is not intended to imply that hosts should support those protocols.sâThe number of seconds since this route was last updated or otherwise determined to be correct. Note that no semantics of `too old' can be implied except through knowledge of the routing protocol by which the route was learned.sšIndicate the mask to be logical-ANDed with the destination address before being compared to the value in the ipRouteDest field. For those systems that do not support arbitrary subnet masks, an agent constructs the value of the ipRouteMask by determining whether the value of the correspondent ipRouteDest field belong to a class-A, B, or C network, and then using one of: mask network 255.0.0.0 class-A 255.255.0.0 class-B 255.255.255.0 class-C If the value of the ipRouteDest is 0.0.0.0 (a default route), then the mask value is also 0.0.0.0. It should be noted that all IP routing subsystems implicitly use this mechanism.s­A reference to MIB definitions specific to the particular routing protocol which is responsible for this route, as determined by the value specified in the route's ipRouteProto value. If this information is not present, its value should be set to the OBJECT IDENTIFIER { 0 0 }, which is a syntatically valid object identifier, and any conformant implementation of ASN.1 and BER must be able to generate and recognize this value.sZThe IP Address Translation table used for mapping from IP addresses to physical addresses.sipNetToMediaIfIndexsipNetToMediaNetAddresssDEach entry contains one IpAddress to `physical' address equivalence.s'The media-dependent `physical' address.sGThe IpAddress corresponding to the media- dependent `physical' address.sdynamicsstaticsqThe type of mapping. Setting this object to the value invalid(2) has the effect of invalidating the corresponding entry in the ipNetToMediaTable. That is, it effectively dissasociates the interface identified with said entry from the mapping identified with said entry. It is an implementation-specific matter as to whether the agent removes an invalidated entry from the table. Accordingly, management stations must be prepared to receive tabular information from agents that corresponds to entries not currently in use. Proper interpretation of such entries requires examination of the relevant ipNetToMediaType object.sÉThe number of routing entries which were chosen to be discarded even though they are valid. One possible reason for discarding such an entry could be to free-up buffer space for other routing entries.s€The total number of ICMP messages which the entity received. Note that this counter includes all those counted by icmpInErrors.s‹The number of ICMP messages which the entity received but determined as having ICMP-specific errors (bad ICMP checksums, bad length, etc.).s=The number of ICMP Destination Unreachable messages received.s3The number of ICMP Time Exceeded messages received.s7The number of ICMP Parameter Problem messages received.s3The number of ICMP Source Quench messages received.s.The number of ICMP Redirect messages received.s4The number of ICMP Echo (request) messages received.s0The number of ICMP Echo Reply messages received.s9The number of ICMP Timestamp (request) messages received.s5The number of ICMP Timestamp Reply messages received.s:The number of ICMP Address Mask Request messages received.s8The number of ICMP Address Mask Reply messages received.s‹The total number of ICMP messages which this entity attempted to send. Note that this counter includes all those counted by icmpOutErrors.scThe number of ICMP messages which this entity did not send due to problems discovered within ICMP such as a lack of buffers. This value should not include errors discovered outside the ICMP layer such as the inability of IP to route the resultant datagram. In some implementations there may be no types of error which contribute to this counter's value.s9The number of ICMP Destination Unreachable messages sent.s/The number of ICMP Time Exceeded messages sent.s3The number of ICMP Parameter Problem messages sent.s/The number of ICMP Source Quench messages sent.s{The number of ICMP Redirect messages sent. For a host, this object will always be zero, since hosts do not send redirects.s0The number of ICMP Echo (request) messages sent.s,The number of ICMP Echo Reply messages sent.s5The number of ICMP Timestamp (request) messages sent.s1The number of ICMP Timestamp Reply messages sent.s6The number of ICMP Address Mask Request messages sent.s4The number of ICMP Address Mask Reply messages sent.sconstantsrsresvanjs`The algorithm used to determine the timeout value used for retransmitting unacknowledged octets.ssThe minimum value permitted by a TCP implementation for the retransmission timeout, measured in milliseconds. More refined semantics for objects of this type depend upon the algorithm used to determine the retransmission timeout. In particular, when the timeout algorithm is rsre(3), an object of this type has the semantics of the LBOUND quantity described in RFC 793.ssThe maximum value permitted by a TCP implementation for the retransmission timeout, measured in milliseconds. More refined semantics for objects of this type depend upon the algorithm used to determine the retransmission timeout. In particular, when the timeout algorithm is rsre(3), an object of this type has the semantics of the UBOUND quantity described in RFC 793.s²The limit on the total number of TCP connections the entity can support. In entities where the maximum number of connections is dynamic, this object should contain the value -1.snThe number of times TCP connections have made a direct transition to the SYN-SENT state from the CLOSED state.snThe number of times TCP connections have made a direct transition to the SYN-RCVD state from the LISTEN state.sÿThe number of times TCP connections have made a direct transition to the CLOSED state from either the SYN-SENT state or the SYN-RCVD state, plus the number of times TCP connections have made a direct transition to the LISTEN state from the SYN-RCVD state.sThe number of times TCP connections have made a direct transition to the CLOSED state from either the ESTABLISHED state or the CLOSE-WAIT state.s_The number of TCP connections for which the current state is either ESTABLISHED or CLOSE- WAIT.s–The total number of segments received, including those received in error. This count includes segments received on currently established connections.sƒThe total number of segments sent, including those on current connections but excluding those containing only retransmitted octets.s’The total number of segments retransmitted - that is, the number of TCP segments transmitted containing one or more previously transmitted octets.s7A table containing TCP connection-specific information.stcpConnLocalAddressstcpConnLocalPortstcpConnRemAddressstcpConnRemPortsÅInformation about a particular current TCP connection. An object of this type is transient, in that it ceases to exist when (or soon after) the connection makes the transition to the CLOSED state.sclosedsclosingstimeWaits deleteTCBslistenssynSents synReceiveds establishedsfinWait1sfinWait2s closeWaitslastAcks The state of this TCP connection. The only value which may be set by a management station is deleteTCB(12). Accordingly, it is appropriate for an agent to return a `badValue' response if a management station attempts to set this object to any other value. If a management station sets this object to the value deleteTCB(12), then this has the effect of deleting the TCB (as defined in RFC 793) of the corresponding connection on the managed node, resulting in immediate termination of the connection. As an implementation-specific option, a RST segment may be sent from the managed node to the other TCP endpoint (note however that RST segments are not sent reliably).sÏThe local IP address for this TCP connection. In the case of a connection in the listen state which is willing to accept connections for any IP interface associated with the node, the value 0.0.0.0 is used.s.The local port number for this TCP connection.s.The remote IP address for this TCP connection.s/The remote port number for this TCP connection.sIThe total number of segments received in error (e.g., bad TCP checksums).s8The number of TCP segments sent containing the RST flag.s9The total number of UDP datagrams delivered to UDP users.sfThe total number of received UDP datagrams for which there was no application at the destination port.s‹The number of received UDP datagrams that could not be delivered for reasons other than the lack of an application at the destination port.s8The total number of UDP datagrams sent from this entity.s,A table containing UDP listener information.sudpLocalAddresss udpLocalPorts4Information about a particular current UDP listener.s¹The local IP address for this UDP listener. In the case of a UDP listener which is willing to accept datagrams for any IP interface associated with the node, the value 0.0.0.0 is used.s,The local port number for this UDP listener.s2The number of EGP messages received without error.s?The number of EGP messages received that proved to be in error.s3The total number of locally generated EGP messages.sgThe number of locally generated EGP messages not sent due to resource limitations within an EGP entity.sThe EGP neighbor table.s egpNeighAddrsLInformation about this entity's relationship with a particular EGP neighbor.sidles acquisitionsceasesÊThe EGP state of the local system with respect to this entry's EGP neighbor. Each EGP state is represented by a value that is one greater than the numerical value associated with said state in RFC 904.s,The IP address of this entry's EGP neighbor.sƒThe autonomous system of this EGP peer. Zero should be specified if the autonomous system number of the neighbor is not yet known.sEThe number of EGP messages received without error from this EGP peer.skThe number of EGP messages received from this EGP peer that proved to be in error (e.g., bad EGP checksum).s>The number of locally generated EGP messages to this EGP peer.sxThe number of locally generated EGP messages not sent to this EGP peer due to resource limitations within an EGP entity.sEThe number of EGP-defined error messages received from this EGP peer.s?The number of EGP-defined error messages sent to this EGP peer.sGThe number of EGP state transitions to the UP state with this EGP peer.s\The number of EGP state transitions from the UP state to any other state with this EGP peer.sˆThe interval between EGP Hello command retransmissions (in hundredths of a second). This represents the t1 timer as defined in RFC 904.s‡The interval between EGP poll command retransmissions (in hundredths of a second). This represents the t3 timer as defined in RFC 904.sactivespassives>The polling mode of this EGP entity, either passive or active.sstartsstops¼A control variable used to trigger operator- initiated Start and Stop events. When read, this variable always returns the most recent value that egpNeighEventTrigger was set to. If it has not been set since the last initialization of the network management subsystem on the node, it returns a value of `stop'. When set, this variable causes a Start or Stop event on the specified neighbor, as specified on pages 8-10 of RFC 904. Briefly, a Start event causes an Idle peer to begin neighbor acquisition and a non-Idle peer to reinitiate neighbor acquisition. A stop event causes a non-Idle peer to return to the Idle state until a Start event occurs, either via egpNeighEventTrigger or otherwise.s0The autonomous system number of this EGP entity.sUThe total number of Messages delivered to the SNMP entity from the transport service.skThe total number of SNMP Messages which were passed from the SNMP protocol entity to the transport service.s|The total number of SNMP Messages which were delivered to the SNMP protocol entity and were for an unsupported SNMP version.s‚The total number of SNMP Messages delivered to the SNMP protocol entity which used a SNMP community name not known to said entity.s­The total number of SNMP Messages delivered to the SNMP protocol entity which represented an SNMP operation which was not allowed by the SNMP community named in the Message.suThe total number of ASN.1 or BER errors encountered by the SNMP protocol entity when decoding received SNMP Messages.sThe total number of SNMP PDUs which were delivered to the SNMP protocol entity and for which the value of the error-status field is `tooBig'.s‘The total number of SNMP PDUs which were delivered to the SNMP protocol entity and for which the value of the error-status field is `noSuchName'.sThe total number of SNMP PDUs which were delivered to the SNMP protocol entity and for which the value of the error-status field is `badValue'.sxThe total number valid SNMP PDUs which were delivered to the SNMP protocol entity and for which the value of the error-status field is `readOnly'. It should be noted that it is a protocol error to generate an SNMP PDU which contains the value `readOnly' in the error-status field, as such this object is provided as a means of detecting incorrect implementations of the SNMP.sThe total number of SNMP PDUs which were delivered to the SNMP protocol entity and for which the value of the error-status field is `genErr'.s§The total number of MIB objects which have been retrieved successfully by the SNMP protocol entity as the result of receiving valid SNMP Get-Request and Get-Next PDUs.s˜The total number of MIB objects which have been altered successfully by the SNMP protocol entity as the result of receiving valid SNMP Set-Request PDUs.smThe total number of SNMP Get-Request PDUs which have been accepted and processed by the SNMP protocol entity.sjThe total number of SNMP Get-Next PDUs which have been accepted and processed by the SNMP protocol entity.smThe total number of SNMP Set-Request PDUs which have been accepted and processed by the SNMP protocol entity.snThe total number of SNMP Get-Response PDUs which have been accepted and processed by the SNMP protocol entity.sfThe total number of SNMP Trap PDUs which have been accepted and processed by the SNMP protocol entity.sThe total number of SNMP PDUs which were generated by the SNMP protocol entity and for which the value of the error-status field is `tooBig.'s‹The total number of SNMP PDUs which were generated by the SNMP protocol entity and for which the value of the error-status is `noSuchName'.sThe total number of SNMP PDUs which were generated by the SNMP protocol entity and for which the value of the error-status field is `badValue'.sThe total number of SNMP PDUs which were generated by the SNMP protocol entity and for which the value of the error-status field is `genErr'.s`The total number of SNMP Get-Request PDUs which have been generated by the SNMP protocol entity.s]The total number of SNMP Get-Next PDUs which have been generated by the SNMP protocol entity.s`The total number of SNMP Set-Request PDUs which have been generated by the SNMP protocol entity.saThe total number of SNMP Get-Response PDUs which have been generated by the SNMP protocol entity.sYThe total number of SNMP Trap PDUs which have been generated by the SNMP protocol entity.senabledsdisabledsªIndicates whether the SNMP agent process is permitted to generate authentication-failure traps. The value of this object overrides any configuration information; as such, it provides a means whereby all authentication-failure traps may be disabled. Note that it is strongly recommended that this object be stored in non-volatile memory so that it remains constant between re-initializations of the network management system.smib_2ssystemssysDescrs sysObjectIDs sysUpTimes sysContactssysNames sysLocations sysServicess interfacessifNumbersifTablesifEntrysifDescrsifTypesifMtusifSpeeds ifPhysAddresss ifAdminStatuss ifOperStatuss ifLastChanges ifInOctetss ifInUcastPktssifInNUcastPktss ifInDiscardss ifInErrorssifInUnknownProtoss ifOutOctetssifOutUcastPktssifOutNUcastPktss ifOutDiscardss ifOutErrorss ifOutQLens ifSpecificsatsatTablesatEntrys atPhysAddresssips ipForwardings ipDefaultTTLs ipInReceivess ipInHdrErrorssipInAddrErrorssipForwDatagramssipInUnknownProtoss ipInDiscardss ipInDeliverss ipOutRequestss ipOutDiscardss ipOutNoRoutessipReasmTimeouts ipReasmReqdss ipReasmOKss ipReasmFailss ipFragOKss ipFragFailss ipFragCreatess ipAddrTables ipAddrEntrysipAdEntIfIndexsipAdEntNetMasksipAdEntBcastAddrsipAdEntReasmMaxSizes ipRouteTables ipRouteEntrysipRouteIfIndexsipRouteMetric1sipRouteMetric2sipRouteMetric3sipRouteMetric4sipRouteNextHops ipRouteTypes ipRouteProtos ipRouteAges ipRouteMasksipRouteMetric5s ipRouteInfosipNetToMediaTablesipNetToMediaEntrysipNetToMediaPhysAddresssipNetToMediaTypesipRoutingDiscardss icmpInMsgss icmpInErrorssicmpInDestUnreachssicmpInTimeExcdssicmpInParmProbssicmpInSrcQuenchssicmpInRedirectss icmpInEchossicmpInEchoRepssicmpInTimestampssicmpInTimestampRepssicmpInAddrMaskssicmpInAddrMaskRepss icmpOutMsgss icmpOutErrorssicmpOutDestUnreachssicmpOutTimeExcdssicmpOutParmProbssicmpOutSrcQuenchssicmpOutRedirectss icmpOutEchossicmpOutEchoRepssicmpOutTimestampssicmpOutTimestampRepssicmpOutAddrMaskssicmpOutAddrMaskRepsstcpstcpRtoAlgorithms tcpRtoMins tcpRtoMaxs tcpMaxConnstcpActiveOpensstcpPassiveOpensstcpAttemptFailsstcpEstabResetss tcpCurrEstabs tcpInSegss tcpOutSegsstcpRetransSegss tcpConnTables tcpConnEntrys tcpConnStates tcpInErrss tcpOutRstssudpsudpInDatagramss udpNoPortss udpInErrorssudpOutDatagramssudpTablesudpEntrys egpInMsgss egpInErrorss egpOutMsgss egpOutErrorss egpNeighTables egpNeighEntrys egpNeighStates egpNeighAssegpNeighInMsgssegpNeighInErrssegpNeighOutMsgssegpNeighOutErrssegpNeighInErrMsgssegpNeighOutErrMsgssegpNeighStateUpssegpNeighStateDownssegpNeighIntervalHellosegpNeighIntervalPolls egpNeighModesegpNeighEventTriggersegpAss transmissionssnmps snmpInPktss snmpOutPktsssnmpInBadVersionsssnmpInBadCommunityNamesssnmpInBadCommunityUsesssnmpInASNParseErrss snmpInTooBigsssnmpInNoSuchNamesssnmpInBadValuesssnmpInReadOnlyss snmpInGenErrsssnmpInTotalReqVarsssnmpInTotalSetVarsssnmpInGetRequestsssnmpInGetNextsssnmpInSetRequestsssnmpInGetResponsess snmpInTrapsssnmpOutTooBigsssnmpOutNoSuchNamesssnmpOutBadValuesssnmpOutGenErrsssnmpOutGetRequestsssnmpOutGetNextsssnmpOutSetRequestsssnmpOutGetResponsess snmpOutTrapsssnmpEnableAuthenTrapsN(ìs pyasn1.types constraintsnamedvals mibBuilders importSymbolssIntegersObjectIdentifiers OctetStringsNetworkAddresssBitss Counter32sGauge32s Integer32s IpAddresss MibIdentifiers MibScalarsMibTables MibTableRowsMibTableColumns TimeTickssmgmts DisplayStrings PhysAddressssetLabelsmib_2ssystemssubtypesValueSizeConstraints setMaxAccessssysDescrs loadTextsssetDescriptions sysObjectIDs sysUpTimes sysContactssysNames sysLocationsValueRangeConstraints sysServicess interfacessifNumbersifTables setIndexNamessifEntrysifIndexsifDescrsSingleValueConstraints NamedValuessifTypesifMtusifSpeeds ifPhysAddresss ifAdminStatuss ifOperStatuss ifLastChanges ifInOctetss ifInUcastPktssifInNUcastPktss ifInDiscardss ifInErrorssifInUnknownProtoss ifOutOctetssifOutUcastPktssifOutNUcastPktss ifOutDiscardss ifOutErrorss ifOutQLens ifSpecificsatsatTablesatEntrys atIfIndexs atPhysAddresss atNetAddresssatNetAddressPlaceholdersips ipForwardings ipDefaultTTLs ipInReceivess ipInHdrErrorssipInAddrErrorssipForwDatagramssipInUnknownProtoss ipInDiscardss ipInDeliverss ipOutRequestss ipOutDiscardss ipOutNoRoutessipReasmTimeouts ipReasmReqdss ipReasmOKss ipReasmFailss ipFragOKss ipFragFailss ipFragCreatess ipAddrTables ipAddrEntrys ipAdEntAddrsipAdEntIfIndexsipAdEntNetMasksipAdEntBcastAddrsipAdEntReasmMaxSizes ipRouteTables ipRouteEntrys ipRouteDestsipRouteIfIndexsipRouteMetric1sipRouteMetric2sipRouteMetric3sipRouteMetric4sipRouteNextHops ipRouteTypes ipRouteProtos ipRouteAges ipRouteMasksipRouteMetric5s ipRouteInfosipNetToMediaTablesipNetToMediaEntrysipNetToMediaIfIndexsipNetToMediaPhysAddresssipNetToMediaNetAddresssipNetToMediaTypesipRoutingDiscardssicmps icmpInMsgss icmpInErrorssicmpInDestUnreachssicmpInTimeExcdssicmpInParmProbssicmpInSrcQuenchssicmpInRedirectss icmpInEchossicmpInEchoRepssicmpInTimestampssicmpInTimestampRepssicmpInAddrMaskssicmpInAddrMaskRepss icmpOutMsgss icmpOutErrorssicmpOutDestUnreachssicmpOutTimeExcdssicmpOutParmProbssicmpOutSrcQuenchssicmpOutRedirectss icmpOutEchossicmpOutEchoRepssicmpOutTimestampssicmpOutTimestampRepssicmpOutAddrMaskssicmpOutAddrMaskRepsstcpstcpRtoAlgorithms tcpRtoMins tcpRtoMaxs tcpMaxConnstcpActiveOpensstcpPassiveOpensstcpAttemptFailsstcpEstabResetss tcpCurrEstabs tcpInSegss tcpOutSegsstcpRetransSegss tcpConnTables tcpConnEntrys tcpConnStatestcpConnLocalAddressstcpConnLocalPortstcpConnRemAddressstcpConnRemPorts tcpInErrss tcpOutRstssudpsudpInDatagramss udpNoPortss udpInErrorssudpOutDatagramssudpTablesudpEntrysudpLocalAddresss udpLocalPortsegps egpInMsgss egpInErrorss egpOutMsgss egpOutErrorss egpNeighTables egpNeighEntrys egpNeighStates egpNeighAddrs egpNeighAssegpNeighInMsgssegpNeighInErrssegpNeighOutMsgssegpNeighOutErrssegpNeighInErrMsgssegpNeighOutErrMsgssegpNeighStateUpssegpNeighStateDownssegpNeighIntervalHellosegpNeighIntervalPolls egpNeighModesegpNeighEventTriggersegpAss transmissionssnmps snmpInPktss snmpOutPktsssnmpInBadVersionsssnmpInBadCommunityNamesssnmpInBadCommunityUsesssnmpInASNParseErrss snmpInTooBigsssnmpInNoSuchNamesssnmpInBadValuesssnmpInReadOnlyss snmpInGenErrsssnmpInTotalReqVarsssnmpInTotalSetVarsssnmpInGetRequestsssnmpInGetNextsssnmpInSetRequestsssnmpInGetResponsess snmpInTrapsssnmpOutTooBigsssnmpOutNoSuchNamesssnmpOutBadValuesssnmpOutGenErrsssnmpOutGetRequestsssnmpOutGetNextsssnmpOutSetRequestsssnmpOutGetResponsess snmpOutTrapsssnmpEnableAuthenTrapss exportSymbols(ÞssnmpOutNoSuchNamessicmpOutTimestampss ipInDeliverss ipOutDiscardssifNumbersicmpOutAddrMaskssicmpInTimestampsstcps icmpInErrorss snmpInTrapssatTablesicmpOutAddrMaskRepss icmpInMsgss PhysAddresss egpOutMsgssifMtus ifInDiscardsssnmpEnableAuthenTrapssicmpOutEchoRepssudpInDatagramsssnmpOutBadValuess ipInHdrErrorssegpAss ipFragFailss snmpInPktsssnmpInBadVersionss ipAddrEntrys icmpOutErrorssMibTablesnamedvalsegpNeighStateUpsssysNames ipRouteAges ifInOctetssicmpOutSrcQuenchss ifLastChanges ifPhysAddressssnmpInBadCommunityNamess atNetAddresssGauge32sipNetToMediaEntrysmgmtssnmpInTotalReqVarss ifOutQLens ipRouteDestsudpLocalAddresss ipRouteEntrysicmpInAddrMaskssicmpInRedirectssudpEntrys transmissions ipFragOKsstcpConnRemPorts sysServicessipAdEntNetMasks ifOutOctetsssnmpOutSetRequestssicmpInTimestampRepss egpNeighModes ipInDiscardsssnmpInTotalSetVarsstcpActiveOpenssicmpInParmProbssifTypes TimeTickss ipRouteTypestcpConnLocalAddresss ipRouteProtos ifAdminStatuss ipReasmFailsssnmpInGetRequestssBitssipRoutingDiscardssMibTableColumnsipRouteIfIndexs egpInMsgss ipRouteTablesipRouteNextHopssnmpInNoSuchNamess egpInErrorssipAdEntReasmMaxSizes DisplayStrings tcpCurrEstabs ipAddrTables ipFragCreatess tcpInErrsstcpConnRemAddresssipAdEntIfIndexsicmpInDestUnreachss interfacess tcpInSegssifOutNUcastPktss ifSpecificstcpAttemptFailss sysUpTimesegpNeighEventTriggers icmpOutEchoss ipOutNoRoutess constraintsegpNeighInMsgss sysLocationsipNetToMediaTables snmpOutTrapsstcpRtoAlgorithmsipAdEntBcastAddrsicmpOutDestUnreachss udpInErrorss egpNeighStatesNetworkAddresss ipRouteMasksipNetToMediaPhysAddressssnmpInReadOnlyss egpNeighTables icmpInEchoss tcpRtoMinsegpNeighIntervalHellossnmpOutGetRequestss tcpConnStatesicmpOutParmProbss ifInErrorss icmpOutMsgsssnmpssystems egpNeighAsstcpEstabResetss egpOutErrorssicmpOutTimestampRepss ipInReceivessIntegersudpTablesegpNeighStateDownss sysObjectIDsifOutUcastPktssegpNeighOutErrMsgsssnmpOutGetResponsess ipDefaultTTLsegpNeighIntervalPollsifIndexsicmpInTimeExcdssicmps ipReasmOKss sysContacts Integer32s ipAdEntAddrs udpLocalPorts ipRouteInfosipNetToMediaIfIndexs tcpMaxConnstcpPassiveOpenssicmpInSrcQuenchsssnmpInBadValuessipInAddrErrorss egpNeighEntrys MibIdentifiersifInUnknownProtosssnmpOutGenErrsssysDescrs tcpConnTablesmib_2ssnmpInGetResponsessicmpOutRedirectss MibScalarssnmpInGetNextssips atPhysAddresssudpsipForwDatagramss snmpInGenErrss ifOutDiscardsssnmpInBadCommunityUsessats ipForwardings tcpOutSegss IpAddresssicmpOutTimeExcdss snmpInTooBigss tcpOutRstssipNetToMediaNetAddresss egpNeighAddrs tcpConnEntrys udpNoPortssifEntrysegpNeighInErrssegpNeighOutErrssipNetToMediaTypesifDescrsipReasmTimeouts ifOperStatuss OctetStringsudpOutDatagramss MibTableRowsifTables tcpRtoMaxsegpNeighInErrMsgsssnmpInASNParseErrss ifInUcastPktss snmpOutPktssipInUnknownProtossicmpInAddrMaskRepss atIfIndexssnmpInSetRequestssipRouteMetric1sipRouteMetric2sipRouteMetric3sipRouteMetric4sipRouteMetric5stcpConnLocalPortsifSpeedstcpRetransSegssatEntrysatNetAddressPlaceholders ipOutRequestssegpsegpNeighOutMsgss ipReasmReqdssObjectIdentifierssnmpOutGetNextssicmpInEchoRepssifInNUcastPktsssnmpOutTooBigss Counter32s ifOutErrors((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/RFC1213-MIB.pys?s¦!c'!K 3 3 K K K K !3 $ 9 9 Q ÿÞ 9 9 9   9 9 9 9 9 9 9 9 9 9 9 9 9 9 !$ Q 9 9 9 <!o 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 $ 9 9 9 9 9 Q $ 9 9 9 9 9 9 9 9  ÿ 9 9 9 9 $ E 9 9 9  3 !3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 !‡ 3 3 3 3 3 3 3 3 3 3 3 $ ] í 9 Q 9 Q 3 3 !3 3 3 3 $ E 9 Q !3 3 3 3 $ 9 ™ 9 9 9 9 9 9 9 9 9 9 9 9 u u 3 !!3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 o ÿÿÿ PK†£= ÈÛ††pysnmp/smi/mibs/__init__.pyc;ò Ÿ´˜Ac@sdS(N((((s6build/bdist.linux-i686/egg/pysnmp/smi/mibs/__init__.pys?sPKt£,<èH¼ˆN+N+(pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.py# PySNMP SMI module. Autogenerated from smidump -f python TRANSPORT-ADDRESS-MIB # by libsmi2pysnmp-0.0.9-alpha at Thu Mar 26 20:58:12 2009, # Python version (2, 4, 4, 'final', 0) import socket import types # Imported just in case new ASN.1 types would be created from pyasn1.type import constraint, namedval # Imports ( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") ( Bits, Integer32, ModuleIdentity, MibIdentifier, ObjectIdentity, TimeTicks, mib_2, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "Integer32", "ModuleIdentity", "MibIdentifier", "ObjectIdentity", "TimeTicks", "mib-2") ( TextualConvention, ) = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention") # Types class TransportAddress(OctetString): subtypeSpec = OctetString.subtypeSpec+constraint.ValueSizeConstraint(0,255) pass class TransportAddressDns(TextualConvention, OctetString): displayHint = "1a" subtypeSpec = OctetString.subtypeSpec+constraint.ValueSizeConstraint(1,255) pass class TransportAddressIPv4(TextualConvention, OctetString): displayHint = "1d.1d.1d.1d:2d" subtypeSpec = OctetString.subtypeSpec+constraint.ValueSizeConstraint(6,6) fixedLength = 6 def prettyIn(self, value): if type(value) == types.TupleType: return reduce(lambda x,y: x+y, map(lambda x: chr(string.atoi(x)), string.split(value[0], '.'))) + chr((value[1] >> 8) & 0xff) + chr((value[1] & 0xff)) else: return OctetString.prettyIn(self, value) # Socket address syntax coercion def __getitem__(self, i): if not hasattr(self, '__tuple_value'): self.__tuple_value = ( string.join(map(lambda x: str(ord(x)), self._value[:4]), '.'), ord(self._value[4:5]) << 8 | ord(self._value[5:6]) ) return self.__tuple_value[i] class TransportAddressIPv4z(TextualConvention, OctetString): displayHint = "1d.1d.1d.1d%4d:2d" subtypeSpec = OctetString.subtypeSpec+constraint.ValueSizeConstraint(10,10) fixedLength = 10 pass class TransportAddressIPv6(TextualConvention, OctetString): displayHint = "0a[2x:2x:2x:2x:2x:2x:2x:2x]0a:2d" subtypeSpec = OctetString.subtypeSpec+constraint.ValueSizeConstraint(18,18) fixedLength = 18 def prettyIn(self, value): if type(value) == types.TupleType: return socket.inet_pton(socket.AF_INET6, value[0]) + chr((value[1] >> 8) & 0xff) + chr((value[1] & 0xff)) else: return OctetString.prettyIn(self, value) # Socket address syntax coercion def __getitem__(self, i): if not hasattr(self, '__tuple_value'): self.__tuple_value = ( socket.inet_ntop(socket.AF_INET6, self._value[:16]), ord(self._value[16:17]) << 8 | ord(self._value[17:18]), 0, 0) return self.__tuple_value[i] class TransportAddressIPv6z(TextualConvention, OctetString): displayHint = "0a[2x:2x:2x:2x:2x:2x:2x:2x%4d]0a:2d" subtypeSpec = OctetString.subtypeSpec+constraint.ValueSizeConstraint(22,22) fixedLength = 22 pass class TransportAddressLocal(TextualConvention, OctetString): displayHint = "1a" subtypeSpec = OctetString.subtypeSpec+constraint.ValueSizeConstraint(1,255) pass class TransportAddressType(Integer): subtypeSpec = Integer.subtypeSpec+constraint.SingleValueConstraint(12,9,14,2,7,1,8,0,11,15,16,3,4,10,6,5,13,) namedValues = namedval.NamedValues(("unknown", 0), ("udpIpv4", 1), ("sctpIpv6", 10), ("sctpIpv4z", 11), ("sctpIpv6z", 12), ("local", 13), ("udpDns", 14), ("tcpDns", 15), ("sctpDns", 16), ("udpIpv6", 2), ("udpIpv4z", 3), ("udpIpv6z", 4), ("tcpIpv4", 5), ("tcpIpv6", 6), ("tcpIpv4z", 7), ("tcpIpv6z", 8), ("sctpIpv4", 9), ) pass class TransportDomain(ObjectIdentifier): pass # Objects transportAddressMIB = ModuleIdentity((1, 3, 6, 1, 2, 1, 100)).setRevisions(("2002-11-01 00:00",)) if mibBuilder.loadTexts: transportAddressMIB.setOrganization("IETF Operations and Management Area") if mibBuilder.loadTexts: transportAddressMIB.setContactInfo("Juergen Schoenwaelder (Editor)\nTU Braunschweig\nBueltenweg 74/75\n38106 Braunschweig, Germany\n\n\n\nPhone: +49 531 391-3289\nEMail: schoenw@ibr.cs.tu-bs.de\n\nSend comments to .") if mibBuilder.loadTexts: transportAddressMIB.setDescription("This MIB module provides commonly used transport\naddress definitions.\n\nCopyright (C) The Internet Society (2002). This version of\nthis MIB module is part of RFC 3419; see the RFC itself for\nfull legal notices.") transportDomains = MibIdentifier((1, 3, 6, 1, 2, 1, 100, 1)) transportDomainUdpIpv4 = ObjectIdentity((1, 3, 6, 1, 2, 1, 100, 1, 1)) if mibBuilder.loadTexts: transportDomainUdpIpv4.setDescription("The UDP over IPv4 transport domain. The corresponding\ntransport address is of type TransportAddressIPv4 for\nglobal IPv4 addresses.") transportDomainUdpIpv6 = ObjectIdentity((1, 3, 6, 1, 2, 1, 100, 1, 2)) if mibBuilder.loadTexts: transportDomainUdpIpv6.setDescription("The UDP over IPv6 transport domain. The corresponding\ntransport address is of type TransportAddressIPv6 for\nglobal IPv6 addresses.") transportDomainUdpIpv4z = ObjectIdentity((1, 3, 6, 1, 2, 1, 100, 1, 3)) if mibBuilder.loadTexts: transportDomainUdpIpv4z.setDescription("The UDP over IPv4 transport domain. The corresponding\ntransport address is of type TransportAddressIPv4z for\nscoped IPv4 addresses with a zone index.") transportDomainUdpIpv6z = ObjectIdentity((1, 3, 6, 1, 2, 1, 100, 1, 4)) if mibBuilder.loadTexts: transportDomainUdpIpv6z.setDescription("The UDP over IPv6 transport domain. The corresponding\ntransport address is of type TransportAddressIPv6z for\nscoped IPv6 addresses with a zone index.") transportDomainTcpIpv4 = ObjectIdentity((1, 3, 6, 1, 2, 1, 100, 1, 5)) if mibBuilder.loadTexts: transportDomainTcpIpv4.setDescription("The TCP over IPv4 transport domain. The corresponding\ntransport address is of type TransportAddressIPv4 for\nglobal IPv4 addresses.") transportDomainTcpIpv6 = ObjectIdentity((1, 3, 6, 1, 2, 1, 100, 1, 6)) if mibBuilder.loadTexts: transportDomainTcpIpv6.setDescription("The TCP over IPv6 transport domain. The corresponding\ntransport address is of type TransportAddressIPv6 for\nglobal IPv6 addresses.") transportDomainTcpIpv4z = ObjectIdentity((1, 3, 6, 1, 2, 1, 100, 1, 7)) if mibBuilder.loadTexts: transportDomainTcpIpv4z.setDescription("The TCP over IPv4 transport domain. The corresponding\ntransport address is of type TransportAddressIPv4z for\nscoped IPv4 addresses with a zone index.") transportDomainTcpIpv6z = ObjectIdentity((1, 3, 6, 1, 2, 1, 100, 1, 8)) if mibBuilder.loadTexts: transportDomainTcpIpv6z.setDescription("The TCP over IPv6 transport domain. The corresponding\ntransport address is of type TransportAddressIPv6z for\nscoped IPv6 addresses with a zone index.") transportDomainSctpIpv4 = ObjectIdentity((1, 3, 6, 1, 2, 1, 100, 1, 9)) if mibBuilder.loadTexts: transportDomainSctpIpv4.setDescription("The SCTP over IPv4 transport domain. The corresponding\ntransport address is of type TransportAddressIPv4 for\nglobal IPv4 addresses. This transport domain usually\nrepresents the primary address on multihomed SCTP\nendpoints.") transportDomainSctpIpv6 = ObjectIdentity((1, 3, 6, 1, 2, 1, 100, 1, 10)) if mibBuilder.loadTexts: transportDomainSctpIpv6.setDescription("The SCTP over IPv6 transport domain. The corresponding\ntransport address is of type TransportAddressIPv6 for\nglobal IPv6 addresses. This transport domain usually\nrepresents the primary address on multihomed SCTP\nendpoints.") transportDomainSctpIpv4z = ObjectIdentity((1, 3, 6, 1, 2, 1, 100, 1, 11)) if mibBuilder.loadTexts: transportDomainSctpIpv4z.setDescription("The SCTP over IPv4 transport domain. The corresponding\ntransport address is of type TransportAddressIPv4z for\nscoped IPv4 addresses with a zone index. This transport\ndomain usually represents the primary address on\nmultihomed SCTP endpoints.") transportDomainSctpIpv6z = ObjectIdentity((1, 3, 6, 1, 2, 1, 100, 1, 12)) if mibBuilder.loadTexts: transportDomainSctpIpv6z.setDescription("The SCTP over IPv6 transport domain. The corresponding\ntransport address is of type TransportAddressIPv6z for\nscoped IPv6 addresses with a zone index. This transport\ndomain usually represents the primary address on\nmultihomed SCTP endpoints.") transportDomainLocal = ObjectIdentity((1, 3, 6, 1, 2, 1, 100, 1, 13)) if mibBuilder.loadTexts: transportDomainLocal.setDescription("The Posix Local IPC transport domain. The corresponding\ntransport address is of type TransportAddressLocal.\n\nThe Posix Local IPC transport domain incorporates the\nwell-known UNIX domain sockets.") transportDomainUdpDns = ObjectIdentity((1, 3, 6, 1, 2, 1, 100, 1, 14)) if mibBuilder.loadTexts: transportDomainUdpDns.setDescription("The UDP transport domain using fully qualified domain\nnames. The corresponding transport address is of type\nTransportAddressDns.") transportDomainTcpDns = ObjectIdentity((1, 3, 6, 1, 2, 1, 100, 1, 15)) if mibBuilder.loadTexts: transportDomainTcpDns.setDescription("The TCP transport domain using fully qualified domain\nnames. The corresponding transport address is of type\nTransportAddressDns.") transportDomainSctpDns = ObjectIdentity((1, 3, 6, 1, 2, 1, 100, 1, 16)) if mibBuilder.loadTexts: transportDomainSctpDns.setDescription("The SCTP transport domain using fully qualified domain\nnames. The corresponding transport address is of type\nTransportAddressDns.") # Augmentions # Exports # Module identity mibBuilder.exportSymbols("TRANSPORT-ADDRESS-MIB", PYSNMP_MODULE_ID=transportAddressMIB) # Types mibBuilder.exportSymbols("TRANSPORT-ADDRESS-MIB", TransportAddress=TransportAddress, TransportAddressDns=TransportAddressDns, TransportAddressIPv4=TransportAddressIPv4, TransportAddressIPv4z=TransportAddressIPv4z, TransportAddressIPv6=TransportAddressIPv6, TransportAddressIPv6z=TransportAddressIPv6z, TransportAddressLocal=TransportAddressLocal, TransportAddressType=TransportAddressType, TransportDomain=TransportDomain) # Objects mibBuilder.exportSymbols("TRANSPORT-ADDRESS-MIB", transportAddressMIB=transportAddressMIB, transportDomains=transportDomains, transportDomainUdpIpv4=transportDomainUdpIpv4, transportDomainUdpIpv6=transportDomainUdpIpv6, transportDomainUdpIpv4z=transportDomainUdpIpv4z, transportDomainUdpIpv6z=transportDomainUdpIpv6z, transportDomainTcpIpv4=transportDomainTcpIpv4, transportDomainTcpIpv6=transportDomainTcpIpv6, transportDomainTcpIpv4z=transportDomainTcpIpv4z, transportDomainTcpIpv6z=transportDomainTcpIpv6z, transportDomainSctpIpv4=transportDomainSctpIpv4, transportDomainSctpIpv6=transportDomainSctpIpv6, transportDomainSctpIpv4z=transportDomainSctpIpv4z, transportDomainSctpIpv6z=transportDomainSctpIpv6z, transportDomainLocal=transportDomainLocal, transportDomainUdpDns=transportDomainUdpDns, transportDomainTcpDns=transportDomainTcpDns, transportDomainSctpDns=transportDomainSctpDns) PKà©z:¦=ªbªbpysnmp/smi/mibs/SNMPv2-MIB.py# PySNMP SMI module. Autogenerated from smidump -f python SNMPv2-MIB # by libsmi2pysnmp-0.0.9-alpha at Thu Mar 26 20:58:12 2009, # Python version (2, 4, 4, 'final', 0) # Imported just in case new ASN.1 types would be created from pyasn1.type import constraint, namedval # Imports ( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") ( ModuleCompliance, NotificationGroup, ObjectGroup, ) = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup") ( Bits, Counter32, Integer32, ModuleIdentity, MibIdentifier, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, TimeTicks, mib_2, snmpModules, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "Counter32", "Integer32", "ModuleIdentity", "MibIdentifier", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "TimeTicks", "mib-2", "snmpModules") ( DisplayString, TestAndIncr, TimeStamp, ) = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TestAndIncr", "TimeStamp") # Objects system = MibIdentifier((1, 3, 6, 1, 2, 1, 1)) sysDescr = MibScalar((1, 3, 6, 1, 2, 1, 1, 1), DisplayString().subtype(subtypeSpec=constraint.ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: sysDescr.setDescription("A textual description of the entity. This value should\ninclude the full name and version identification of\nthe system's hardware type, software operating-system,\nand networking software.") sysObjectID = MibScalar((1, 3, 6, 1, 2, 1, 1, 2), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysObjectID.setDescription("The vendor's authoritative identification of the\nnetwork management subsystem contained in the entity.\nThis value is allocated within the SMI enterprises\nsubtree (1.3.6.1.4.1) and provides an easy and\nunambiguous means for determining `what kind of box' is\nbeing managed. For example, if vendor `Flintstones,\nInc.' was assigned the subtree 1.3.6.1.4.1.424242,\nit could assign the identifier 1.3.6.1.4.1.424242.1.1\nto its `Fred Router'.") sysUpTime = MibScalar((1, 3, 6, 1, 2, 1, 1, 3), TimeTicks()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysUpTime.setDescription("The time (in hundredths of a second) since the\nnetwork management portion of the system was last\nre-initialized.") sysContact = MibScalar((1, 3, 6, 1, 2, 1, 1, 4), DisplayString().subtype(subtypeSpec=constraint.ValueSizeConstraint(0, 255))).setMaxAccess("readwrite") if mibBuilder.loadTexts: sysContact.setDescription("The textual identification of the contact person for\nthis managed node, together with information on how\nto contact this person. If no contact information is\nknown, the value is the zero-length string.") sysName = MibScalar((1, 3, 6, 1, 2, 1, 1, 5), DisplayString().subtype(subtypeSpec=constraint.ValueSizeConstraint(0, 255))).setMaxAccess("readwrite") if mibBuilder.loadTexts: sysName.setDescription("An administratively-assigned name for this managed\nnode. By convention, this is the node's fully-qualified\ndomain name. If the name is unknown, the value is\nthe zero-length string.") sysLocation = MibScalar((1, 3, 6, 1, 2, 1, 1, 6), DisplayString().subtype(subtypeSpec=constraint.ValueSizeConstraint(0, 255))).setMaxAccess("readwrite") if mibBuilder.loadTexts: sysLocation.setDescription("The physical location of this node (e.g., 'telephone\ncloset, 3rd floor'). If the location is unknown, the\nvalue is the zero-length string.") sysServices = MibScalar((1, 3, 6, 1, 2, 1, 1, 7), Integer32().subtype(subtypeSpec=constraint.ValueRangeConstraint(0, 127))).setMaxAccess("readonly") if mibBuilder.loadTexts: sysServices.setDescription("A value which indicates the set of services that this\nentity may potentially offer. The value is a sum.\n\n\n\nThis sum initially takes the value zero. Then, for\neach layer, L, in the range 1 through 7, that this node\nperforms transactions for, 2 raised to (L - 1) is added\nto the sum. For example, a node which performs only\nrouting functions would have a value of 4 (2^(3-1)).\nIn contrast, a node which is a host offering application\nservices would have a value of 72 (2^(4-1) + 2^(7-1)).\nNote that in the context of the Internet suite of\nprotocols, values should be calculated accordingly:\n\n layer functionality\n 1 physical (e.g., repeaters)\n 2 datalink/subnetwork (e.g., bridges)\n 3 internet (e.g., supports the IP)\n 4 end-to-end (e.g., supports the TCP)\n 7 applications (e.g., supports the SMTP)\n\nFor systems including OSI protocols, layers 5 and 6\nmay also be counted.") sysORLastChange = MibScalar((1, 3, 6, 1, 2, 1, 1, 8), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysORLastChange.setDescription("The value of sysUpTime at the time of the most recent\nchange in state or value of any instance of sysORID.") sysORTable = MibTable((1, 3, 6, 1, 2, 1, 1, 9)) if mibBuilder.loadTexts: sysORTable.setDescription("The (conceptual) table listing the capabilities of\nthe local SNMP application acting as a command\nresponder with respect to various MIB modules.\nSNMP entities having dynamically-configurable support\nof MIB modules will have a dynamically-varying number\nof conceptual rows.") sysOREntry = MibTableRow((1, 3, 6, 1, 2, 1, 1, 9, 1)).setIndexNames((0, "SNMPv2-MIB", "sysORIndex")) if mibBuilder.loadTexts: sysOREntry.setDescription("An entry (conceptual row) in the sysORTable.") sysORIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 1, 9, 1, 1), Integer32().subtype(subtypeSpec=constraint.ValueRangeConstraint(1, 2147483647L))).setMaxAccess("noaccess") if mibBuilder.loadTexts: sysORIndex.setDescription("The auxiliary variable used for identifying instances\nof the columnar objects in the sysORTable.") sysORID = MibTableColumn((1, 3, 6, 1, 2, 1, 1, 9, 1, 2), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysORID.setDescription("An authoritative identification of a capabilities\nstatement with respect to various MIB modules supported\nby the local SNMP application acting as a command\nresponder.") sysORDescr = MibTableColumn((1, 3, 6, 1, 2, 1, 1, 9, 1, 3), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysORDescr.setDescription("A textual description of the capabilities identified\nby the corresponding instance of sysORID.") sysORUpTime = MibTableColumn((1, 3, 6, 1, 2, 1, 1, 9, 1, 4), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: sysORUpTime.setDescription("The value of sysUpTime at the time this conceptual\nrow was last instantiated.") snmp = MibIdentifier((1, 3, 6, 1, 2, 1, 11)) snmpInPkts = MibScalar((1, 3, 6, 1, 2, 1, 11, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInPkts.setDescription("The total number of messages delivered to the SNMP\nentity from the transport service.") snmpOutPkts = MibScalar((1, 3, 6, 1, 2, 1, 11, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutPkts.setDescription("The total number of SNMP Messages which were\npassed from the SNMP protocol entity to the\ntransport service.") snmpInBadVersions = MibScalar((1, 3, 6, 1, 2, 1, 11, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInBadVersions.setDescription("The total number of SNMP messages which were delivered\nto the SNMP entity and were for an unsupported SNMP\nversion.") snmpInBadCommunityNames = MibScalar((1, 3, 6, 1, 2, 1, 11, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInBadCommunityNames.setDescription("The total number of community-based SNMP messages (for\nexample, SNMPv1) delivered to the SNMP entity which\nused an SNMP community name not known to said entity.\nAlso, implementations which authenticate community-based\nSNMP messages using check(s) in addition to matching\nthe community name (for example, by also checking\nwhether the message originated from a transport address\nallowed to use a specified community name) MAY include\nin this value the number of messages which failed the\nadditional check(s). It is strongly RECOMMENDED that\n\n\n\nthe documentation for any security model which is used\nto authenticate community-based SNMP messages specify\nthe precise conditions that contribute to this value.") snmpInBadCommunityUses = MibScalar((1, 3, 6, 1, 2, 1, 11, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInBadCommunityUses.setDescription("The total number of community-based SNMP messages (for\nexample, SNMPv1) delivered to the SNMP entity which\nrepresented an SNMP operation that was not allowed for\nthe SNMP community named in the message. The precise\nconditions under which this counter is incremented\n(if at all) depend on how the SNMP entity implements\nits access control mechanism and how its applications\ninteract with that access control mechanism. It is\nstrongly RECOMMENDED that the documentation for any\naccess control mechanism which is used to control access\nto and visibility of MIB instrumentation specify the\nprecise conditions that contribute to this value.") snmpInASNParseErrs = MibScalar((1, 3, 6, 1, 2, 1, 11, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInASNParseErrs.setDescription("The total number of ASN.1 or BER errors encountered by\nthe SNMP entity when decoding received SNMP messages.") snmpInTooBigs = MibScalar((1, 3, 6, 1, 2, 1, 11, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInTooBigs.setDescription("The total number of SNMP PDUs which were\ndelivered to the SNMP protocol entity and for\nwhich the value of the error-status field was\n`tooBig'.") snmpInNoSuchNames = MibScalar((1, 3, 6, 1, 2, 1, 11, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInNoSuchNames.setDescription("The total number of SNMP PDUs which were\ndelivered to the SNMP protocol entity and for\nwhich the value of the error-status field was\n`noSuchName'.") snmpInBadValues = MibScalar((1, 3, 6, 1, 2, 1, 11, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInBadValues.setDescription("The total number of SNMP PDUs which were\ndelivered to the SNMP protocol entity and for\nwhich the value of the error-status field was\n`badValue'.") snmpInReadOnlys = MibScalar((1, 3, 6, 1, 2, 1, 11, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInReadOnlys.setDescription("The total number valid SNMP PDUs which were delivered\nto the SNMP protocol entity and for which the value\nof the error-status field was `readOnly'. It should\nbe noted that it is a protocol error to generate an\nSNMP PDU which contains the value `readOnly' in the\nerror-status field, as such this object is provided\nas a means of detecting incorrect implementations of\nthe SNMP.") snmpInGenErrs = MibScalar((1, 3, 6, 1, 2, 1, 11, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInGenErrs.setDescription("The total number of SNMP PDUs which were delivered\nto the SNMP protocol entity and for which the value\nof the error-status field was `genErr'.") snmpInTotalReqVars = MibScalar((1, 3, 6, 1, 2, 1, 11, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInTotalReqVars.setDescription("The total number of MIB objects which have been\nretrieved successfully by the SNMP protocol entity\nas the result of receiving valid SNMP Get-Request\nand Get-Next PDUs.") snmpInTotalSetVars = MibScalar((1, 3, 6, 1, 2, 1, 11, 14), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInTotalSetVars.setDescription("The total number of MIB objects which have been\naltered successfully by the SNMP protocol entity as\nthe result of receiving valid SNMP Set-Request PDUs.") snmpInGetRequests = MibScalar((1, 3, 6, 1, 2, 1, 11, 15), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInGetRequests.setDescription("The total number of SNMP Get-Request PDUs which\nhave been accepted and processed by the SNMP\nprotocol entity.") snmpInGetNexts = MibScalar((1, 3, 6, 1, 2, 1, 11, 16), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInGetNexts.setDescription("The total number of SNMP Get-Next PDUs which have been\naccepted and processed by the SNMP protocol entity.") snmpInSetRequests = MibScalar((1, 3, 6, 1, 2, 1, 11, 17), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInSetRequests.setDescription("The total number of SNMP Set-Request PDUs which\nhave been accepted and processed by the SNMP protocol\nentity.") snmpInGetResponses = MibScalar((1, 3, 6, 1, 2, 1, 11, 18), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInGetResponses.setDescription("The total number of SNMP Get-Response PDUs which\nhave been accepted and processed by the SNMP protocol\nentity.") snmpInTraps = MibScalar((1, 3, 6, 1, 2, 1, 11, 19), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpInTraps.setDescription("The total number of SNMP Trap PDUs which have been\naccepted and processed by the SNMP protocol entity.") snmpOutTooBigs = MibScalar((1, 3, 6, 1, 2, 1, 11, 20), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutTooBigs.setDescription("The total number of SNMP PDUs which were generated\nby the SNMP protocol entity and for which the value\nof the error-status field was `tooBig.'") snmpOutNoSuchNames = MibScalar((1, 3, 6, 1, 2, 1, 11, 21), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutNoSuchNames.setDescription("The total number of SNMP PDUs which were generated\nby the SNMP protocol entity and for which the value\nof the error-status was `noSuchName'.") snmpOutBadValues = MibScalar((1, 3, 6, 1, 2, 1, 11, 22), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutBadValues.setDescription("The total number of SNMP PDUs which were generated\nby the SNMP protocol entity and for which the value\nof the error-status field was `badValue'.") snmpOutGenErrs = MibScalar((1, 3, 6, 1, 2, 1, 11, 24), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutGenErrs.setDescription("The total number of SNMP PDUs which were generated\nby the SNMP protocol entity and for which the value\nof the error-status field was `genErr'.") snmpOutGetRequests = MibScalar((1, 3, 6, 1, 2, 1, 11, 25), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutGetRequests.setDescription("The total number of SNMP Get-Request PDUs which\nhave been generated by the SNMP protocol entity.") snmpOutGetNexts = MibScalar((1, 3, 6, 1, 2, 1, 11, 26), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutGetNexts.setDescription("The total number of SNMP Get-Next PDUs which have\nbeen generated by the SNMP protocol entity.") snmpOutSetRequests = MibScalar((1, 3, 6, 1, 2, 1, 11, 27), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutSetRequests.setDescription("The total number of SNMP Set-Request PDUs which\nhave been generated by the SNMP protocol entity.") snmpOutGetResponses = MibScalar((1, 3, 6, 1, 2, 1, 11, 28), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutGetResponses.setDescription("The total number of SNMP Get-Response PDUs which\nhave been generated by the SNMP protocol entity.") snmpOutTraps = MibScalar((1, 3, 6, 1, 2, 1, 11, 29), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpOutTraps.setDescription("The total number of SNMP Trap PDUs which have\nbeen generated by the SNMP protocol entity.") snmpEnableAuthenTraps = MibScalar((1, 3, 6, 1, 2, 1, 11, 30), Integer().subtype(subtypeSpec=constraint.SingleValueConstraint(2,1,)).subtype(namedValues=namedval.NamedValues(("enabled", 1), ("disabled", 2), ))).setMaxAccess("readwrite") if mibBuilder.loadTexts: snmpEnableAuthenTraps.setDescription("Indicates whether the SNMP entity is permitted to\ngenerate authenticationFailure traps. The value of this\nobject overrides any configuration information; as such,\nit provides a means whereby all authenticationFailure\ntraps may be disabled.\n\nNote that it is strongly recommended that this object\nbe stored in non-volatile memory so that it remains\nconstant across re-initializations of the network\nmanagement system.") snmpSilentDrops = MibScalar((1, 3, 6, 1, 2, 1, 11, 31), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpSilentDrops.setDescription("The total number of Confirmed Class PDUs (such as\nGetRequest-PDUs, GetNextRequest-PDUs,\nGetBulkRequest-PDUs, SetRequest-PDUs, and\nInformRequest-PDUs) delivered to the SNMP entity which\nwere silently dropped because the size of a reply\ncontaining an alternate Response Class PDU (such as a\nResponse-PDU) with an empty variable-bindings field\nwas greater than either a local constraint or the\nmaximum message size associated with the originator of\nthe request.") snmpProxyDrops = MibScalar((1, 3, 6, 1, 2, 1, 11, 32), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpProxyDrops.setDescription("The total number of Confirmed Class PDUs\n(such as GetRequest-PDUs, GetNextRequest-PDUs,\nGetBulkRequest-PDUs, SetRequest-PDUs, and\nInformRequest-PDUs) delivered to the SNMP entity which\nwere silently dropped because the transmission of\nthe (possibly translated) message to a proxy target\nfailed in a manner (other than a time-out) such that\nno Response Class PDU (such as a Response-PDU) could\nbe returned.") snmpMIB = ModuleIdentity((1, 3, 6, 1, 6, 3, 1)).setRevisions(("2002-10-16 00:00","1995-11-09 00:00","1993-04-01 00:00",)) if mibBuilder.loadTexts: snmpMIB.setOrganization("IETF SNMPv3 Working Group") if mibBuilder.loadTexts: snmpMIB.setContactInfo("WG-EMail: snmpv3@lists.tislabs.com\nSubscribe: snmpv3-request@lists.tislabs.com\n\nCo-Chair: Russ Mundy\n Network Associates Laboratories\npostal: 15204 Omega Drive, Suite 300\n Rockville, MD 20850-4601\n USA\nEMail: mundy@tislabs.com\nphone: +1 301 947-7107\n\nCo-Chair: David Harrington\n Enterasys Networks\npostal: 35 Industrial Way\n P. O. Box 5005\n Rochester, NH 03866-5005\n USA\nEMail: dbh@enterasys.com\nphone: +1 603 337-2614\n\nEditor: Randy Presuhn\n BMC Software, Inc.\npostal: 2141 North First Street\n San Jose, CA 95131\n USA\nEMail: randy_presuhn@bmc.com\nphone: +1 408 546-1006") if mibBuilder.loadTexts: snmpMIB.setDescription("The MIB module for SNMP entities.\n\nCopyright (C) The Internet Society (2002). This\nversion of this MIB module is part of RFC 3418;\nsee the RFC itself for full legal notices.") snmpMIBObjects = MibIdentifier((1, 3, 6, 1, 6, 3, 1, 1)) snmpTrap = MibIdentifier((1, 3, 6, 1, 6, 3, 1, 1, 4)) snmpTrapOID = MibScalar((1, 3, 6, 1, 6, 3, 1, 1, 4, 1), ObjectIdentifier()).setMaxAccess("notifyonly") if mibBuilder.loadTexts: snmpTrapOID.setDescription("The authoritative identification of the notification\ncurrently being sent. This variable occurs as\nthe second varbind in every SNMPv2-Trap-PDU and\nInformRequest-PDU.") snmpTrapEnterprise = MibScalar((1, 3, 6, 1, 6, 3, 1, 1, 4, 3), ObjectIdentifier()).setMaxAccess("notifyonly") if mibBuilder.loadTexts: snmpTrapEnterprise.setDescription("The authoritative identification of the enterprise\nassociated with the trap currently being sent. When an\nSNMP proxy agent is mapping an RFC1157 Trap-PDU\ninto a SNMPv2-Trap-PDU, this variable occurs as the\nlast varbind.") snmpTraps = MibIdentifier((1, 3, 6, 1, 6, 3, 1, 1, 5)) snmpSet = MibIdentifier((1, 3, 6, 1, 6, 3, 1, 1, 6)) snmpSetSerialNo = MibScalar((1, 3, 6, 1, 6, 3, 1, 1, 6, 1), TestAndIncr()).setMaxAccess("readwrite") if mibBuilder.loadTexts: snmpSetSerialNo.setDescription("An advisory lock used to allow several cooperating\ncommand generator applications to coordinate their\nuse of the SNMP set operation.\n\nThis object is used for coarse-grain coordination.\nTo achieve fine-grain coordination, one or more similar\nobjects might be defined within each MIB group, as\nappropriate.") snmpMIBConformance = MibIdentifier((1, 3, 6, 1, 6, 3, 1, 2)) snmpMIBCompliances = MibIdentifier((1, 3, 6, 1, 6, 3, 1, 2, 1)) snmpMIBGroups = MibIdentifier((1, 3, 6, 1, 6, 3, 1, 2, 2)) # Augmentions # Notifications authenticationFailure = NotificationType((1, 3, 6, 1, 6, 3, 1, 1, 5, 5)).setObjects() warmStart = NotificationType((1, 3, 6, 1, 6, 3, 1, 1, 5, 2)).setObjects() coldStart = NotificationType((1, 3, 6, 1, 6, 3, 1, 1, 5, 1)).setObjects() # Groups snmpGroup = ObjectGroup((1, 3, 6, 1, 6, 3, 1, 2, 2, 8)).setObjects(("SNMPv2-MIB", "snmpEnableAuthenTraps"), ("SNMPv2-MIB", "snmpSilentDrops"), ("SNMPv2-MIB", "snmpInASNParseErrs"), ("SNMPv2-MIB", "snmpInPkts"), ("SNMPv2-MIB", "snmpInBadVersions"), ("SNMPv2-MIB", "snmpProxyDrops"), ) snmpWarmStartNotificationGroup = NotificationGroup((1, 3, 6, 1, 6, 3, 1, 2, 2, 11)).setObjects(("SNMPv2-MIB", "warmStart"), ) snmpObsoleteGroup = ObjectGroup((1, 3, 6, 1, 6, 3, 1, 2, 2, 10)).setObjects(("SNMPv2-MIB", "snmpOutNoSuchNames"), ("SNMPv2-MIB", "snmpInReadOnlys"), ("SNMPv2-MIB", "snmpInTotalReqVars"), ("SNMPv2-MIB", "snmpInSetRequests"), ("SNMPv2-MIB", "snmpOutGenErrs"), ("SNMPv2-MIB", "snmpOutGetRequests"), ("SNMPv2-MIB", "snmpOutPkts"), ("SNMPv2-MIB", "snmpOutBadValues"), ("SNMPv2-MIB", "snmpOutTraps"), ("SNMPv2-MIB", "snmpInNoSuchNames"), ("SNMPv2-MIB", "snmpInGetNexts"), ("SNMPv2-MIB", "snmpInGetRequests"), ("SNMPv2-MIB", "snmpOutGetResponses"), ("SNMPv2-MIB", "snmpInGenErrs"), ("SNMPv2-MIB", "snmpInTraps"), ("SNMPv2-MIB", "snmpInTotalSetVars"), ("SNMPv2-MIB", "snmpInGetResponses"), ("SNMPv2-MIB", "snmpOutSetRequests"), ("SNMPv2-MIB", "snmpInBadValues"), ("SNMPv2-MIB", "snmpInTooBigs"), ("SNMPv2-MIB", "snmpOutGetNexts"), ("SNMPv2-MIB", "snmpOutTooBigs"), ) snmpBasicNotificationsGroup = NotificationGroup((1, 3, 6, 1, 6, 3, 1, 2, 2, 7)).setObjects(("SNMPv2-MIB", "authenticationFailure"), ("SNMPv2-MIB", "coldStart"), ) snmpCommunityGroup = ObjectGroup((1, 3, 6, 1, 6, 3, 1, 2, 2, 9)).setObjects(("SNMPv2-MIB", "snmpInBadCommunityNames"), ("SNMPv2-MIB", "snmpInBadCommunityUses"), ) snmpNotificationGroup = ObjectGroup((1, 3, 6, 1, 6, 3, 1, 2, 2, 12)).setObjects(("SNMPv2-MIB", "snmpTrapOID"), ("SNMPv2-MIB", "snmpTrapEnterprise"), ) systemGroup = ObjectGroup((1, 3, 6, 1, 6, 3, 1, 2, 2, 6)).setObjects(("SNMPv2-MIB", "sysName"), ("SNMPv2-MIB", "sysObjectID"), ("SNMPv2-MIB", "sysORLastChange"), ("SNMPv2-MIB", "sysORID"), ("SNMPv2-MIB", "sysLocation"), ("SNMPv2-MIB", "sysServices"), ("SNMPv2-MIB", "sysUpTime"), ("SNMPv2-MIB", "sysORDescr"), ("SNMPv2-MIB", "sysORUpTime"), ("SNMPv2-MIB", "sysDescr"), ("SNMPv2-MIB", "sysContact"), ) snmpSetGroup = ObjectGroup((1, 3, 6, 1, 6, 3, 1, 2, 2, 5)).setObjects(("SNMPv2-MIB", "snmpSetSerialNo"), ) # Exports # Module identity mibBuilder.exportSymbols("SNMPv2-MIB", PYSNMP_MODULE_ID=snmpMIB) # Objects mibBuilder.exportSymbols("SNMPv2-MIB", system=system, sysDescr=sysDescr, sysObjectID=sysObjectID, sysUpTime=sysUpTime, sysContact=sysContact, sysName=sysName, sysLocation=sysLocation, sysServices=sysServices, sysORLastChange=sysORLastChange, sysORTable=sysORTable, sysOREntry=sysOREntry, sysORIndex=sysORIndex, sysORID=sysORID, sysORDescr=sysORDescr, sysORUpTime=sysORUpTime, snmp=snmp, snmpInPkts=snmpInPkts, snmpOutPkts=snmpOutPkts, snmpInBadVersions=snmpInBadVersions, snmpInBadCommunityNames=snmpInBadCommunityNames, snmpInBadCommunityUses=snmpInBadCommunityUses, snmpInASNParseErrs=snmpInASNParseErrs, snmpInTooBigs=snmpInTooBigs, snmpInNoSuchNames=snmpInNoSuchNames, snmpInBadValues=snmpInBadValues, snmpInReadOnlys=snmpInReadOnlys, snmpInGenErrs=snmpInGenErrs, snmpInTotalReqVars=snmpInTotalReqVars, snmpInTotalSetVars=snmpInTotalSetVars, snmpInGetRequests=snmpInGetRequests, snmpInGetNexts=snmpInGetNexts, snmpInSetRequests=snmpInSetRequests, snmpInGetResponses=snmpInGetResponses, snmpInTraps=snmpInTraps, snmpOutTooBigs=snmpOutTooBigs, snmpOutNoSuchNames=snmpOutNoSuchNames, snmpOutBadValues=snmpOutBadValues, snmpOutGenErrs=snmpOutGenErrs, snmpOutGetRequests=snmpOutGetRequests, snmpOutGetNexts=snmpOutGetNexts, snmpOutSetRequests=snmpOutSetRequests, snmpOutGetResponses=snmpOutGetResponses, snmpOutTraps=snmpOutTraps, snmpEnableAuthenTraps=snmpEnableAuthenTraps, snmpSilentDrops=snmpSilentDrops, snmpProxyDrops=snmpProxyDrops, snmpMIB=snmpMIB, snmpMIBObjects=snmpMIBObjects, snmpTrap=snmpTrap, snmpTrapOID=snmpTrapOID, snmpTrapEnterprise=snmpTrapEnterprise, snmpTraps=snmpTraps, snmpSet=snmpSet, snmpSetSerialNo=snmpSetSerialNo, snmpMIBConformance=snmpMIBConformance, snmpMIBCompliances=snmpMIBCompliances, snmpMIBGroups=snmpMIBGroups) # Notifications mibBuilder.exportSymbols("SNMPv2-MIB", authenticationFailure=authenticationFailure, warmStart=warmStart, coldStart=coldStart) # Groups mibBuilder.exportSymbols("SNMPv2-MIB", snmpGroup=snmpGroup, snmpWarmStartNotificationGroup=snmpWarmStartNotificationGroup, snmpObsoleteGroup=snmpObsoleteGroup, snmpBasicNotificationsGroup=snmpBasicNotificationsGroup, snmpCommunityGroup=snmpCommunityGroup, snmpNotificationGroup=snmpNotificationGroup, systemGroup=systemGroup, snmpSetGroup=snmpSetGroup) PKó²;@Ìô@xxpysnmp/smi/mibs/RFC1155-SMI.py# PySNMP SMI module. Autogenerated from smidump -f python RFC1155-SMI # by libsmi2pysnmp-0.0.9-alpha at Thu Mar 26 20:59:40 2009, # Python version (2, 4, 4, 'final', 0) # Imported just in case new ASN.1 types would be created from pyasn1.type import constraint, namedval # Manually added from pysnmp.proto.rfc1155 import NetworkAddress # Imports ( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") ( Bits, Integer32, MibIdentifier, TimeTicks, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "Integer32", "MibIdentifier", "TimeTicks") # Types class Counter(Integer32): subtypeSpec = Integer32.subtypeSpec+constraint.ValueRangeConstraint(0,4294967295L) pass class Gauge(Integer32): subtypeSpec = Integer32.subtypeSpec+constraint.ValueRangeConstraint(0,4294967295L) pass class IpAddress(OctetString): subtypeSpec = OctetString.subtypeSpec+constraint.ValueSizeConstraint(4,4) fixedLength = 4 pass class NetworkAddress(IpAddress): pass class ObjectName(ObjectIdentifier): pass class Opaque(OctetString): pass class TimeTicks(Integer32): subtypeSpec = Integer32.subtypeSpec+constraint.ValueRangeConstraint(0,4294967295L) pass # Objects internet = MibIdentifier((1, 3, 6, 1)) directory = MibIdentifier((1, 3, 6, 1, 1)) mgmt = MibIdentifier((1, 3, 6, 1, 2)) experimental = MibIdentifier((1, 3, 6, 1, 3)) private = MibIdentifier((1, 3, 6, 1, 4)) enterprises = MibIdentifier((1, 3, 6, 1, 4, 1)) # Augmentions # Exports # Types mibBuilder.exportSymbols("RFC1155-SMI", Counter=Counter, Gauge=Gauge, IpAddress=IpAddress, NetworkAddress=NetworkAddress, ObjectName=ObjectName, Opaque=Opaque, TimeTicks=TimeTicks) # Objects mibBuilder.exportSymbols("RFC1155-SMI", internet=internet, directory=directory, mgmt=mgmt, experimental=experimental, private=private, enterprises=enterprises) PK†£=©‘øA/Z/Zpysnmp/smi/mibs/SNMPv2-MIB.pyc;ò %ÆËIct@svdklZlZeiddddƒ\ZZZeiddddƒ\ZZ Z eid d d d d ddddddddddƒ\Z Z Z ZZZZZZZZZZZeiddddƒ\ZZZedddddddfƒZeddddddddfeƒideid d!ƒƒƒid"ƒZei oei!d#ƒneddddddddfeƒƒid"ƒZ"ei oe"i!d$ƒneddddddddfeƒƒid"ƒZ#ei oe#i!d%ƒnedddddddd&feƒideid d!ƒƒƒid'ƒZ$ei oe$i!d(ƒnedddddddd)feƒideid d!ƒƒƒid'ƒZ%ei oe%i!d*ƒneddddddddfeƒideid d!ƒƒƒid'ƒZ&ei oe&i!d+ƒnedddddddd,fe ƒidei'd d-ƒƒƒid"ƒZ(ei oe(i!d.ƒnedddddddd/feƒƒid"ƒZ)ei oe)i!d0ƒnedddddddd1fƒZ*ei oe*i!d2ƒnedddddddd1df ƒi+d d3d4fƒZ,ei oe,i!d5ƒnedddddddd1ddf e ƒidei'dd6ƒƒƒid7ƒZ-ei oe-i!d8ƒnedddddddd1ddf eƒƒid"ƒZ.ei oe.i!d9ƒnedddddddd1ddf eƒƒid"ƒZ/ei oe/i!d:ƒnedddddddd1dd&f eƒƒid"ƒZ0ei oe0i!d;ƒneddddddd<fƒZ1eddddddd<dfe ƒƒid"ƒZ2ei oe2i!d=ƒneddddddd<dfe ƒƒid"ƒZ3ei oe3i!d>ƒneddddddd<dfe ƒƒid"ƒZ4ei oe4i!d?ƒneddddddd<d&fe ƒƒid"ƒZ5ei oe5i!d@ƒneddddddd<d)fe ƒƒid"ƒZ6ei oe6i!dAƒneddddddd<dfe ƒƒid"ƒZ7ei oe7i!dBƒneddddddd<d/fe ƒƒid"ƒZ8ei oe8i!dCƒneddddddd<d1fe ƒƒid"ƒZ9ei oe9i!dDƒneddddddd<dEfe ƒƒid"ƒZ:ei oe:i!dFƒneddddddd<d<fe ƒƒid"ƒZ;ei oe;i!dGƒneddddddd<dHfe ƒƒid"ƒZ<ei oe<i!dIƒneddddddd<dJfe ƒƒid"ƒZ=ei oe=i!dKƒneddddddd<dLfe ƒƒid"ƒZ>ei oe>i!dMƒneddddddd<dNfe ƒƒid"ƒZ?ei oe?i!dOƒneddddddd<dPfe ƒƒid"ƒZ@ei oe@i!dQƒneddddddd<dRfe ƒƒid"ƒZAei oeAi!dSƒneddddddd<dTfe ƒƒid"ƒZBei oeBi!dUƒneddddddd<dVfe ƒƒid"ƒZCei oeCi!dWƒneddddddd<dXfe ƒƒid"ƒZDei oeDi!dYƒneddddddd<dZfe ƒƒid"ƒZEei oeEi!d[ƒneddddddd<d\fe ƒƒid"ƒZFei oeFi!d]ƒneddddddd<d^fe ƒƒid"ƒZGei oeGi!d_ƒneddddddd<d`fe ƒƒid"ƒZHei oeHi!daƒneddddddd<dbfe ƒƒid"ƒZIei oeIi!dcƒneddddddd<ddfe ƒƒid"ƒZJei oeJi!deƒneddddddd<dffe ƒƒid"ƒZKei oeKi!dgƒneddddddd<dhfe ƒƒid"ƒZLei oeLi!diƒneddddddd<djfeƒideiMddƒƒidkeiNdldfdmdfƒƒƒid'ƒZOei oeOi!dnƒneddddddd<dofe ƒƒid"ƒZPei oePi!dpƒneddddddd<dqfe ƒƒid"ƒZQei oeQi!drƒnedddddddfƒiRdsdtdufƒZSei oeSiTdvƒnei oeSiUdwƒnei oeSi!dxƒneddddddddfƒZVeddddddddd&f ƒZWeddddddddd&df eƒƒidyƒZXei oeXi!dzƒneddddddddd&df eƒƒidyƒZYei oeYi!d{ƒneddddddddd)f ƒZZedddddddddf ƒZ[eddddddddddf eƒƒid'ƒZ\ei oe\i!d|ƒneddddddddfƒZ]edddddddddf ƒZ^edddddddddf ƒZ_eddddddddd)d)f ƒi`ƒZaeddddddddd)df ƒi`ƒZbeddddddddd)df ƒi`ƒZce dddddddddd/f ƒi`d3d}fd3d~fd3dfd3d€fd3dfd3d‚fƒZde dddddddddd<f ƒi`d3dƒfƒZee ddddddddddEf ƒi`d3d„fd3d…fd3d†fd3d‡fd3dˆfd3d‰fd3dŠfd3d‹fd3dŒfd3dfd3dŽfd3dfd3dfd3d‘fd3d’fd3d“fd3d”fd3d•fd3d–fd3d—fd3d˜fd3d™fƒZfe dddddddddd,f ƒi`d3dšfd3d›fƒZge dddddddddd1f ƒi`d3dœfd3dfƒZhe ddddddddddHf ƒi`d3džfd3dŸfƒZie ddddddddddf ƒi`d3d fd3d¡fd3d¢fd3d£fd3d¤fd3d¥fd3d¦fd3d§fd3d¨fd3d©fd3dªfƒ Zje dddddddddd)f ƒi`d3d«fƒZkeild3d¬eSƒeild3d­ed©ed¡e"d¦e#dªe$d e%d¤e&d¥e(d¢e)d®e*d¯e,d4e-d£e.d§e/d¨e0d°e1d€e2dŠe3de4dœe5de6de7d—e8de9d–e:d…e;d‘e<d†e=d“e>de?dŽe@d‡eAd”eBd’eCd™eDd„eEd‹eFdˆeGd‰eHd˜eId•eJdeKdŒeLd}eOd~ePd‚eQd±eSd²eVd³eWdžeXdŸeYd´eZdµe[d«e\d¶e]d·e^d¸e_ƒ9eild3dšeadƒebd›ecƒeild3d¹eddºeed»efd¼egd½ehd¾eid¿ejdÀekƒdÁS(Â(s constraintsnamedvalsASN1sIntegersObjectIdentifiers OctetStrings SNMPv2-CONFsModuleCompliancesNotificationGroups ObjectGroups SNMPv2-SMIsBitss Counter32s Integer32sModuleIdentitys MibIdentifiersNotificationTypes MibScalarsMibTables MibTableRowsMibTableColumns TimeTickssmib-2s snmpModuless SNMPv2-TCs DisplayStrings TestAndIncrs TimeStampiiiis subtypeSpeciiÿsreadonlys»A textual description of the entity. This value should include the full name and version identification of the system's hardware type, software operating-system, and networking software.s´The vendor's authoritative identification of the network management subsystem contained in the entity. This value is allocated within the SMI enterprises subtree (1.3.6.1.4.1) and provides an easy and unambiguous means for determining `what kind of box' is being managed. For example, if vendor `Flintstones, Inc.' was assigned the subtree 1.3.6.1.4.1.424242, it could assign the identifier 1.3.6.1.4.1.424242.1.1 to its `Fred Router'.spThe time (in hundredths of a second) since the network management portion of the system was last re-initialized.is readwritesÊThe textual identification of the contact person for this managed node, together with information on how to contact this person. If no contact information is known, the value is the zero-length string.is¶An administratively-assigned name for this managed node. By convention, this is the node's fully-qualified domain name. If the name is unknown, the value is the zero-length string.s‹The physical location of this node (e.g., 'telephone closet, 3rd floor'). If the location is unknown, the value is the zero-length string.iis³A value which indicates the set of services that this entity may potentially offer. The value is a sum. This sum initially takes the value zero. Then, for each layer, L, in the range 1 through 7, that this node performs transactions for, 2 raised to (L - 1) is added to the sum. For example, a node which performs only routing functions would have a value of 4 (2^(3-1)). In contrast, a node which is a host offering application services would have a value of 72 (2^(4-1) + 2^(7-1)). Note that in the context of the Internet suite of protocols, values should be calculated accordingly: layer functionality 1 physical (e.g., repeaters) 2 datalink/subnetwork (e.g., bridges) 3 internet (e.g., supports the IP) 4 end-to-end (e.g., supports the TCP) 7 applications (e.g., supports the SMTP) For systems including OSI protocols, layers 5 and 6 may also be counted.isjThe value of sysUpTime at the time of the most recent change in state or value of any instance of sysORID.i sThe (conceptual) table listing the capabilities of the local SNMP application acting as a command responder with respect to various MIB modules. SNMP entities having dynamically-configurable support of MIB modules will have a dynamically-varying number of conceptual rows.s SNMPv2-MIBs sysORIndexs,An entry (conceptual row) in the sysORTable.lÿÿsnoaccesss`The auxiliary variable used for identifying instances of the columnar objects in the sysORTable.s¦An authoritative identification of a capabilities statement with respect to various MIB modules supported by the local SNMP application acting as a command responder.s^A textual description of the capabilities identified by the corresponding instance of sysORID.sMThe value of sysUpTime at the time this conceptual row was last instantiated.i sUThe total number of messages delivered to the SNMP entity from the transport service.skThe total number of SNMP Messages which were passed from the SNMP protocol entity to the transport service.ssThe total number of SNMP messages which were delivered to the SNMP entity and were for an unsupported SNMP version.sÂThe total number of community-based SNMP messages (for example, SNMPv1) delivered to the SNMP entity which used an SNMP community name not known to said entity. Also, implementations which authenticate community-based SNMP messages using check(s) in addition to matching the community name (for example, by also checking whether the message originated from a transport address allowed to use a specified community name) MAY include in this value the number of messages which failed the additional check(s). It is strongly RECOMMENDED that the documentation for any security model which is used to authenticate community-based SNMP messages specify the precise conditions that contribute to this value.s}The total number of community-based SNMP messages (for example, SNMPv1) delivered to the SNMP entity which represented an SNMP operation that was not allowed for the SNMP community named in the message. The precise conditions under which this counter is incremented (if at all) depend on how the SNMP entity implements its access control mechanism and how its applications interact with that access control mechanism. It is strongly RECOMMENDED that the documentation for any access control mechanism which is used to control access to and visibility of MIB instrumentation specify the precise conditions that contribute to this value.slThe total number of ASN.1 or BER errors encountered by the SNMP entity when decoding received SNMP messages.sŽThe total number of SNMP PDUs which were delivered to the SNMP protocol entity and for which the value of the error-status field was `tooBig'.s’The total number of SNMP PDUs which were delivered to the SNMP protocol entity and for which the value of the error-status field was `noSuchName'.i sThe total number of SNMP PDUs which were delivered to the SNMP protocol entity and for which the value of the error-status field was `badValue'.syThe total number valid SNMP PDUs which were delivered to the SNMP protocol entity and for which the value of the error-status field was `readOnly'. It should be noted that it is a protocol error to generate an SNMP PDU which contains the value `readOnly' in the error-status field, as such this object is provided as a means of detecting incorrect implementations of the SNMP.i sŽThe total number of SNMP PDUs which were delivered to the SNMP protocol entity and for which the value of the error-status field was `genErr'.i s§The total number of MIB objects which have been retrieved successfully by the SNMP protocol entity as the result of receiving valid SNMP Get-Request and Get-Next PDUs.is˜The total number of MIB objects which have been altered successfully by the SNMP protocol entity as the result of receiving valid SNMP Set-Request PDUs.ismThe total number of SNMP Get-Request PDUs which have been accepted and processed by the SNMP protocol entity.isjThe total number of SNMP Get-Next PDUs which have been accepted and processed by the SNMP protocol entity.ismThe total number of SNMP Set-Request PDUs which have been accepted and processed by the SNMP protocol entity.isnThe total number of SNMP Get-Response PDUs which have been accepted and processed by the SNMP protocol entity.isfThe total number of SNMP Trap PDUs which have been accepted and processed by the SNMP protocol entity.isŽThe total number of SNMP PDUs which were generated by the SNMP protocol entity and for which the value of the error-status field was `tooBig.'isŒThe total number of SNMP PDUs which were generated by the SNMP protocol entity and for which the value of the error-status was `noSuchName'.isThe total number of SNMP PDUs which were generated by the SNMP protocol entity and for which the value of the error-status field was `badValue'.isŽThe total number of SNMP PDUs which were generated by the SNMP protocol entity and for which the value of the error-status field was `genErr'.is`The total number of SNMP Get-Request PDUs which have been generated by the SNMP protocol entity.is]The total number of SNMP Get-Next PDUs which have been generated by the SNMP protocol entity.is`The total number of SNMP Set-Request PDUs which have been generated by the SNMP protocol entity.isaThe total number of SNMP Get-Response PDUs which have been generated by the SNMP protocol entity.isYThe total number of SNMP Trap PDUs which have been generated by the SNMP protocol entity.is namedValuessenabledsdisableds Indicates whether the SNMP entity is permitted to generate authenticationFailure traps. The value of this object overrides any configuration information; as such, it provides a means whereby all authenticationFailure traps may be disabled. Note that it is strongly recommended that this object be stored in non-volatile memory so that it remains constant across re-initializations of the network management system.isÊThe total number of Confirmed Class PDUs (such as GetRequest-PDUs, GetNextRequest-PDUs, GetBulkRequest-PDUs, SetRequest-PDUs, and InformRequest-PDUs) delivered to the SNMP entity which were silently dropped because the size of a reply containing an alternate Response Class PDU (such as a Response-PDU) with an empty variable-bindings field was greater than either a local constraint or the maximum message size associated with the originator of the request.i s•The total number of Confirmed Class PDUs (such as GetRequest-PDUs, GetNextRequest-PDUs, GetBulkRequest-PDUs, SetRequest-PDUs, and InformRequest-PDUs) delivered to the SNMP entity which were silently dropped because the transmission of the (possibly translated) message to a proxy target failed in a manner (other than a time-out) such that no Response Class PDU (such as a Response-PDU) could be returned.s2002-10-16 00:00s1995-11-09 00:00s1993-04-01 00:00sIETF SNMPv3 Working GroupsÝWG-EMail: snmpv3@lists.tislabs.com Subscribe: snmpv3-request@lists.tislabs.com Co-Chair: Russ Mundy Network Associates Laboratories postal: 15204 Omega Drive, Suite 300 Rockville, MD 20850-4601 USA EMail: mundy@tislabs.com phone: +1 301 947-7107 Co-Chair: David Harrington Enterasys Networks postal: 35 Industrial Way P. O. Box 5005 Rochester, NH 03866-5005 USA EMail: dbh@enterasys.com phone: +1 603 337-2614 Editor: Randy Presuhn BMC Software, Inc. postal: 2141 North First Street San Jose, CA 95131 USA EMail: randy_presuhn@bmc.com phone: +1 408 546-1006s­The MIB module for SNMP entities. Copyright (C) The Internet Society (2002). This version of this MIB module is part of RFC 3418; see the RFC itself for full legal notices.s notifyonlys¦The authoritative identification of the notification currently being sent. This variable occurs as the second varbind in every SNMPv2-Trap-PDU and InformRequest-PDU.sÜThe authoritative identification of the enterprise associated with the trap currently being sent. When an SNMP proxy agent is mapping an RFC1157 Trap-PDU into a SNMPv2-Trap-PDU, this variable occurs as the last varbind.s0An advisory lock used to allow several cooperating command generator applications to coordinate their use of the SNMP set operation. This object is used for coarse-grain coordination. To achieve fine-grain coordination, one or more similar objects might be defined within each MIB group, as appropriate.ssnmpEnableAuthenTrapsssnmpSilentDropsssnmpInASNParseErrss snmpInPktsssnmpInBadVersionsssnmpProxyDropss warmStartssnmpOutNoSuchNamesssnmpInReadOnlysssnmpInTotalReqVarsssnmpInSetRequestsssnmpOutGenErrsssnmpOutGetRequestss snmpOutPktsssnmpOutBadValuess snmpOutTrapsssnmpInNoSuchNamesssnmpInGetNextsssnmpInGetRequestsssnmpOutGetResponsess snmpInGenErrss snmpInTrapsssnmpInTotalSetVarsssnmpInGetResponsesssnmpOutSetRequestsssnmpInBadValuess snmpInTooBigsssnmpOutGetNextsssnmpOutTooBigssauthenticationFailures coldStartssnmpInBadCommunityNamesssnmpInBadCommunityUsess snmpTrapOIDssnmpTrapEnterprisessysNames sysObjectIDssysORLastChangessysORIDs sysLocations sysServicess sysUpTimes sysORDescrs sysORUpTimessysDescrs sysContactssnmpSetSerialNosPYSNMP_MODULE_IDssystems sysORTables sysOREntryssnmpssnmpMIBssnmpMIBObjectsssnmpTraps snmpTrapsssnmpSetssnmpMIBConformancessnmpMIBCompliancess snmpMIBGroupss snmpGroupssnmpWarmStartNotificationGroupssnmpObsoleteGroupssnmpBasicNotificationsGroupssnmpCommunityGroupssnmpNotificationGroups systemGroups snmpSetGroupN(ms pyasn1.types constraintsnamedvals mibBuilders importSymbolssIntegersObjectIdentifiers OctetStringsModuleCompliancesNotificationGroups ObjectGroupsBitss Counter32s Integer32sModuleIdentitys MibIdentifiersNotificationTypes MibScalarsMibTables MibTableRowsMibTableColumns TimeTickssmib_2s snmpModuless DisplayStrings TestAndIncrs TimeStampssystemssubtypesValueSizeConstraints setMaxAccessssysDescrs loadTextsssetDescriptions sysObjectIDs sysUpTimes sysContactssysNames sysLocationsValueRangeConstraints sysServicesssysORLastChanges sysORTables setIndexNamess sysOREntrys sysORIndexssysORIDs sysORDescrs sysORUpTimessnmps snmpInPktss snmpOutPktsssnmpInBadVersionsssnmpInBadCommunityNamesssnmpInBadCommunityUsesssnmpInASNParseErrss snmpInTooBigsssnmpInNoSuchNamesssnmpInBadValuesssnmpInReadOnlyss snmpInGenErrsssnmpInTotalReqVarsssnmpInTotalSetVarsssnmpInGetRequestsssnmpInGetNextsssnmpInSetRequestsssnmpInGetResponsess snmpInTrapsssnmpOutTooBigsssnmpOutNoSuchNamesssnmpOutBadValuesssnmpOutGenErrsssnmpOutGetRequestsssnmpOutGetNextsssnmpOutSetRequestsssnmpOutGetResponsess snmpOutTrapssSingleValueConstraints NamedValuesssnmpEnableAuthenTrapsssnmpSilentDropsssnmpProxyDropss setRevisionsssnmpMIBssetOrganizationssetContactInfossnmpMIBObjectsssnmpTraps snmpTrapOIDssnmpTrapEnterprises snmpTrapsssnmpSetssnmpSetSerialNossnmpMIBConformancessnmpMIBCompliancess snmpMIBGroupss setObjectssauthenticationFailures warmStarts coldStarts snmpGroupssnmpWarmStartNotificationGroupssnmpObsoleteGroupssnmpBasicNotificationsGroupssnmpCommunityGroupssnmpNotificationGroups systemGroups snmpSetGroups exportSymbols(\ssnmpOutNoSuchNamesssnmpInTotalReqVarss snmpTrapss snmpModuless ObjectGroupssnmpEnableAuthenTrapsssnmpOutBadValuesssnmpCommunityGroupsauthenticationFailures snmpInPktsssnmpInBadVersionsssnmpMIBObjectssnamedvalssysNames TimeStampssnmpInBadCommunityNamess snmpGroups sysORTablessnmpObsoleteGroups sysServicess systemGroupssnmpInBadCommunityUsess TimeTicksssnmpInTotalSetVarssModuleIdentitys snmpInGenErrss sysORDescrsBitss coldStarts snmpOutPktssMibTableColumnssysORLastChangesModuleCompliancesNotificationTypessnmpNotificationGroupssnmpTrapssnmpInNoSuchNamessNotificationGroups DisplayStrings snmpMIBGroupss sysORIndexssnmpInGetRequestss warmStarts sysUpTimes snmpTrapOIDs constraintssnmpOutSetRequestss sysLocations sysOREntryssnmpMIBssysORIDssnmpInReadOnlysssnmpBasicNotificationsGroupssnmpOutGetRequestsssnmpTrapEnterprisessnmpSets snmpOutTrapsssnmpssystemsIntegers sysORUpTimessnmpMIBConformances sysObjectIDssnmpSilentDropsssnmpOutGetResponsess snmpSetGroupssnmpSetSerialNos snmpInTrapss sysContacts Integer32ssnmpInBadValuess snmpInTooBigss MibIdentifierssnmpProxyDropsssysDescrsmib_2s MibScalarssnmpInGetNextsssnmpOutGenErrssMibTables OctetStrings MibTableRowssnmpInASNParseErrss TestAndIncrssnmpInSetRequestsssnmpMIBCompliancesssnmpWarmStartNotificationGroupssnmpInGetResponsessObjectIdentifierssnmpOutGetNextsssnmpOutTooBigss Counter32((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-MIB.pys?sb!!c!!K 3 3 K K K K 3 $ 9 Q 9 9 9 !3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 o 3 3 3   $'9 9 ''9 $''000f9öBBB“9ÿdPKà©z:êKÅ‹ÄBÄB"pysnmp/smi/mibs/SNMP-TARGET-MIB.py# PySNMP SMI module. Autogenerated from smidump -f python SNMP-TARGET-MIB # by libsmi2pysnmp-0.0.9-alpha at Thu Mar 26 20:58:12 2009, # Python version (2, 4, 4, 'final', 0) # Imported just in case new ASN.1 types would be created from pyasn1.type import constraint, namedval # Imports ( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") ( SnmpAdminString, SnmpMessageProcessingModel, SnmpSecurityLevel, SnmpSecurityModel, ) = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString", "SnmpMessageProcessingModel", "SnmpSecurityLevel", "SnmpSecurityModel") ( ModuleCompliance, ObjectGroup, ) = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup") ( Bits, Counter32, Integer32, Integer32, ModuleIdentity, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, snmpModules, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "Counter32", "Integer32", "Integer32", "ModuleIdentity", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "snmpModules") ( RowStatus, StorageType, TAddress, TDomain, TextualConvention, TestAndIncr, TimeInterval, ) = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "StorageType", "TAddress", "TDomain", "TextualConvention", "TestAndIncr", "TimeInterval") # Types class SnmpTagList(TextualConvention, OctetString): displayHint = "255t" subtypeSpec = OctetString.subtypeSpec+constraint.ValueSizeConstraint(0,255) pass class SnmpTagValue(TextualConvention, OctetString): displayHint = "255t" subtypeSpec = OctetString.subtypeSpec+constraint.ValueSizeConstraint(0,255) pass # Objects snmpTargetMIB = ModuleIdentity((1, 3, 6, 1, 6, 3, 12)).setRevisions(("2002-10-14 00:00","1998-08-04 00:00","1997-07-14 00:00",)) if mibBuilder.loadTexts: snmpTargetMIB.setOrganization("IETF SNMPv3 Working Group") if mibBuilder.loadTexts: snmpTargetMIB.setContactInfo("WG-email: snmpv3@lists.tislabs.com\nSubscribe: majordomo@lists.tislabs.com\n In message body: subscribe snmpv3\n\nCo-Chair: Russ Mundy\n Network Associates Laboratories\nPostal: 15204 Omega Drive, Suite 300\n Rockville, MD 20850-4601\n USA\nEMail: mundy@tislabs.com\nPhone: +1 301-947-7107\n\nCo-Chair: David Harrington\n Enterasys Networks\nPostal: 35 Industrial Way\n P. O. Box 5004\n Rochester, New Hampshire 03866-5005\n USA\nEMail: dbh@enterasys.com\nPhone: +1 603-337-2614\n\nCo-editor: David B. Levi\n Nortel Networks\nPostal: 3505 Kesterwood Drive\n Knoxville, Tennessee 37918\nEMail: dlevi@nortelnetworks.com\nPhone: +1 865 686 0432\n\nCo-editor: Paul Meyer\n Secure Computing Corporation\nPostal: 2675 Long Lake Road\n\n\n\n Roseville, Minnesota 55113\nEMail: paul_meyer@securecomputing.com\nPhone: +1 651 628 1592\n\nCo-editor: Bob Stewart\n Retired") if mibBuilder.loadTexts: snmpTargetMIB.setDescription("This MIB module defines MIB objects which provide\nmechanisms to remotely configure the parameters used\nby an SNMP entity for the generation of SNMP messages.\n\nCopyright (C) The Internet Society (2002). This\nversion of this MIB module is part of RFC 3413;\nsee the RFC itself for full legal notices.") snmpTargetObjects = MibIdentifier((1, 3, 6, 1, 6, 3, 12, 1)) snmpTargetSpinLock = MibScalar((1, 3, 6, 1, 6, 3, 12, 1, 1), TestAndIncr()).setMaxAccess("readwrite") if mibBuilder.loadTexts: snmpTargetSpinLock.setDescription("This object is used to facilitate modification of table\nentries in the SNMP-TARGET-MIB module by multiple\nmanagers. In particular, it is useful when modifying\nthe value of the snmpTargetAddrTagList object.\n\nThe procedure for modifying the snmpTargetAddrTagList\nobject is as follows:\n\n\n\n 1. Retrieve the value of snmpTargetSpinLock and\n of snmpTargetAddrTagList.\n\n 2. Generate a new value for snmpTargetAddrTagList.\n\n 3. Set the value of snmpTargetSpinLock to the\n retrieved value, and the value of\n snmpTargetAddrTagList to the new value. If\n the set fails for the snmpTargetSpinLock\n object, go back to step 1.") snmpTargetAddrTable = MibTable((1, 3, 6, 1, 6, 3, 12, 1, 2)) if mibBuilder.loadTexts: snmpTargetAddrTable.setDescription("A table of transport addresses to be used in the generation\nof SNMP messages.") snmpTargetAddrEntry = MibTableRow((1, 3, 6, 1, 6, 3, 12, 1, 2, 1)).setIndexNames((1, "SNMP-TARGET-MIB", "snmpTargetAddrName")) if mibBuilder.loadTexts: snmpTargetAddrEntry.setDescription("A transport address to be used in the generation\nof SNMP operations.\n\nEntries in the snmpTargetAddrTable are created and\ndeleted using the snmpTargetAddrRowStatus object.") snmpTargetAddrName = MibTableColumn((1, 3, 6, 1, 6, 3, 12, 1, 2, 1, 1), SnmpAdminString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, 32))).setMaxAccess("noaccess") if mibBuilder.loadTexts: snmpTargetAddrName.setDescription("The locally arbitrary, but unique identifier associated\nwith this snmpTargetAddrEntry.") snmpTargetAddrTDomain = MibTableColumn((1, 3, 6, 1, 6, 3, 12, 1, 2, 1, 2), TDomain()).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpTargetAddrTDomain.setDescription("This object indicates the transport type of the address\ncontained in the snmpTargetAddrTAddress object.") snmpTargetAddrTAddress = MibTableColumn((1, 3, 6, 1, 6, 3, 12, 1, 2, 1, 3), TAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpTargetAddrTAddress.setDescription("This object contains a transport address. The format of\nthis address depends on the value of the\nsnmpTargetAddrTDomain object.") snmpTargetAddrTimeout = MibTableColumn((1, 3, 6, 1, 6, 3, 12, 1, 2, 1, 4), TimeInterval().clone(1500)).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpTargetAddrTimeout.setDescription("This object should reflect the expected maximum round\ntrip time for communicating with the transport address\ndefined by this row. When a message is sent to this\naddress, and a response (if one is expected) is not\nreceived within this time period, an implementation\nmay assume that the response will not be delivered.\n\nNote that the time interval that an application waits\nfor a response may actually be derived from the value\nof this object. The method for deriving the actual time\ninterval is implementation dependent. One such method\nis to derive the expected round trip time based on a\nparticular retransmission algorithm and on the number\nof timeouts which have occurred. The type of message may\nalso be considered when deriving expected round trip\ntimes for retransmissions. For example, if a message is\nbeing sent with a securityLevel that indicates both\n\n\n\nauthentication and privacy, the derived value may be\nincreased to compensate for extra processing time spent\nduring authentication and encryption processing.") snmpTargetAddrRetryCount = MibTableColumn((1, 3, 6, 1, 6, 3, 12, 1, 2, 1, 5), Integer32().subtype(subtypeSpec=constraint.ValueRangeConstraint(0, 255)).clone(3)).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpTargetAddrRetryCount.setDescription("This object specifies a default number of retries to be\nattempted when a response is not received for a generated\nmessage. An application may provide its own retry count,\nin which case the value of this object is ignored.") snmpTargetAddrTagList = MibTableColumn((1, 3, 6, 1, 6, 3, 12, 1, 2, 1, 6), SnmpTagList().clone('')).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpTargetAddrTagList.setDescription("This object contains a list of tag values which are\nused to select target addresses for a particular\noperation.") snmpTargetAddrParams = MibTableColumn((1, 3, 6, 1, 6, 3, 12, 1, 2, 1, 7), SnmpAdminString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, 32))).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpTargetAddrParams.setDescription("The value of this object identifies an entry in the\nsnmpTargetParamsTable. The identified entry\ncontains SNMP parameters to be used when generating\nmessages to be sent to this transport address.") snmpTargetAddrStorageType = MibTableColumn((1, 3, 6, 1, 6, 3, 12, 1, 2, 1, 8), StorageType().clone('nonVolatile')).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpTargetAddrStorageType.setDescription("The storage type for this conceptual row.\nConceptual rows having the value 'permanent' need not\nallow write-access to any columnar objects in the row.") snmpTargetAddrRowStatus = MibTableColumn((1, 3, 6, 1, 6, 3, 12, 1, 2, 1, 9), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpTargetAddrRowStatus.setDescription("The status of this conceptual row.\n\nTo create a row in this table, a manager must\nset this object to either createAndGo(4) or\ncreateAndWait(5).\n\nUntil instances of all corresponding columns are\nappropriately configured, the value of the\ncorresponding instance of the snmpTargetAddrRowStatus\ncolumn is 'notReady'.\n\nIn particular, a newly created row cannot be made\nactive until the corresponding instances of\nsnmpTargetAddrTDomain, snmpTargetAddrTAddress, and\nsnmpTargetAddrParams have all been set.\n\nThe following objects may not be modified while the\nvalue of this object is active(1):\n - snmpTargetAddrTDomain\n - snmpTargetAddrTAddress\nAn attempt to set these objects while the value of\nsnmpTargetAddrRowStatus is active(1) will result in\nan inconsistentValue error.") snmpTargetParamsTable = MibTable((1, 3, 6, 1, 6, 3, 12, 1, 3)) if mibBuilder.loadTexts: snmpTargetParamsTable.setDescription("A table of SNMP target information to be used\nin the generation of SNMP messages.") snmpTargetParamsEntry = MibTableRow((1, 3, 6, 1, 6, 3, 12, 1, 3, 1)).setIndexNames((1, "SNMP-TARGET-MIB", "snmpTargetParamsName")) if mibBuilder.loadTexts: snmpTargetParamsEntry.setDescription("A set of SNMP target information.\n\n\n\nEntries in the snmpTargetParamsTable are created and\ndeleted using the snmpTargetParamsRowStatus object.") snmpTargetParamsName = MibTableColumn((1, 3, 6, 1, 6, 3, 12, 1, 3, 1, 1), SnmpAdminString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, 32))).setMaxAccess("noaccess") if mibBuilder.loadTexts: snmpTargetParamsName.setDescription("The locally arbitrary, but unique identifier associated\nwith this snmpTargetParamsEntry.") snmpTargetParamsMPModel = MibTableColumn((1, 3, 6, 1, 6, 3, 12, 1, 3, 1, 2), SnmpMessageProcessingModel()).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpTargetParamsMPModel.setDescription("The Message Processing Model to be used when generating\nSNMP messages using this entry.") snmpTargetParamsSecurityModel = MibTableColumn((1, 3, 6, 1, 6, 3, 12, 1, 3, 1, 3), SnmpSecurityModel().subtype(subtypeSpec=constraint.ValueRangeConstraint(1, 2147483647L))).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpTargetParamsSecurityModel.setDescription("The Security Model to be used when generating SNMP\nmessages using this entry. An implementation may\nchoose to return an inconsistentValue error if an\nattempt is made to set this variable to a value\nfor a security model which the implementation does\nnot support.") snmpTargetParamsSecurityName = MibTableColumn((1, 3, 6, 1, 6, 3, 12, 1, 3, 1, 4), SnmpAdminString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpTargetParamsSecurityName.setDescription("The securityName which identifies the Principal on\nwhose behalf SNMP messages will be generated using\nthis entry.") snmpTargetParamsSecurityLevel = MibTableColumn((1, 3, 6, 1, 6, 3, 12, 1, 3, 1, 5), SnmpSecurityLevel()).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpTargetParamsSecurityLevel.setDescription("The Level of Security to be used when generating\nSNMP messages using this entry.") snmpTargetParamsStorageType = MibTableColumn((1, 3, 6, 1, 6, 3, 12, 1, 3, 1, 6), StorageType().clone('nonVolatile')).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpTargetParamsStorageType.setDescription("The storage type for this conceptual row.\nConceptual rows having the value 'permanent' need not\nallow write-access to any columnar objects in the row.") snmpTargetParamsRowStatus = MibTableColumn((1, 3, 6, 1, 6, 3, 12, 1, 3, 1, 7), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpTargetParamsRowStatus.setDescription("The status of this conceptual row.\n\nTo create a row in this table, a manager must\nset this object to either createAndGo(4) or\ncreateAndWait(5).\n\nUntil instances of all corresponding columns are\nappropriately configured, the value of the\ncorresponding instance of the snmpTargetParamsRowStatus\ncolumn is 'notReady'.\n\nIn particular, a newly created row cannot be made\nactive until the corresponding\nsnmpTargetParamsMPModel,\nsnmpTargetParamsSecurityModel,\n\n\n\nsnmpTargetParamsSecurityName,\nand snmpTargetParamsSecurityLevel have all been set.\n\nThe following objects may not be modified while the\nvalue of this object is active(1):\n - snmpTargetParamsMPModel\n - snmpTargetParamsSecurityModel\n - snmpTargetParamsSecurityName\n - snmpTargetParamsSecurityLevel\nAn attempt to set these objects while the value of\nsnmpTargetParamsRowStatus is active(1) will result in\nan inconsistentValue error.") snmpUnavailableContexts = MibScalar((1, 3, 6, 1, 6, 3, 12, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpUnavailableContexts.setDescription("The total number of packets received by the SNMP\nengine which were dropped because the context\ncontained in the message was unavailable.") snmpUnknownContexts = MibScalar((1, 3, 6, 1, 6, 3, 12, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: snmpUnknownContexts.setDescription("The total number of packets received by the SNMP\nengine which were dropped because the context\ncontained in the message was unknown.") snmpTargetConformance = MibIdentifier((1, 3, 6, 1, 6, 3, 12, 3)) snmpTargetCompliances = MibIdentifier((1, 3, 6, 1, 6, 3, 12, 3, 1)) snmpTargetGroups = MibIdentifier((1, 3, 6, 1, 6, 3, 12, 3, 2)) # Augmentions # Groups snmpTargetResponseGroup = ObjectGroup((1, 3, 6, 1, 6, 3, 12, 3, 2, 2)).setObjects(("SNMP-TARGET-MIB", "snmpTargetAddrRetryCount"), ("SNMP-TARGET-MIB", "snmpTargetAddrTimeout"), ) snmpTargetCommandResponderGroup = ObjectGroup((1, 3, 6, 1, 6, 3, 12, 3, 2, 3)).setObjects(("SNMP-TARGET-MIB", "snmpUnavailableContexts"), ("SNMP-TARGET-MIB", "snmpUnknownContexts"), ) snmpTargetBasicGroup = ObjectGroup((1, 3, 6, 1, 6, 3, 12, 3, 2, 1)).setObjects(("SNMP-TARGET-MIB", "snmpTargetAddrTDomain"), ("SNMP-TARGET-MIB", "snmpTargetAddrParams"), ("SNMP-TARGET-MIB", "snmpTargetParamsRowStatus"), ("SNMP-TARGET-MIB", "snmpTargetParamsMPModel"), ("SNMP-TARGET-MIB", "snmpTargetAddrStorageType"), ("SNMP-TARGET-MIB", "snmpTargetParamsSecurityName"), ("SNMP-TARGET-MIB", "snmpTargetAddrRowStatus"), ("SNMP-TARGET-MIB", "snmpTargetAddrTAddress"), ("SNMP-TARGET-MIB", "snmpTargetParamsStorageType"), ("SNMP-TARGET-MIB", "snmpTargetAddrTagList"), ("SNMP-TARGET-MIB", "snmpTargetSpinLock"), ("SNMP-TARGET-MIB", "snmpTargetParamsSecurityLevel"), ("SNMP-TARGET-MIB", "snmpTargetParamsSecurityModel"), ) # Exports # Module identity mibBuilder.exportSymbols("SNMP-TARGET-MIB", PYSNMP_MODULE_ID=snmpTargetMIB) # Types mibBuilder.exportSymbols("SNMP-TARGET-MIB", SnmpTagList=SnmpTagList, SnmpTagValue=SnmpTagValue) # Objects mibBuilder.exportSymbols("SNMP-TARGET-MIB", snmpTargetMIB=snmpTargetMIB, snmpTargetObjects=snmpTargetObjects, snmpTargetSpinLock=snmpTargetSpinLock, snmpTargetAddrTable=snmpTargetAddrTable, snmpTargetAddrEntry=snmpTargetAddrEntry, snmpTargetAddrName=snmpTargetAddrName, snmpTargetAddrTDomain=snmpTargetAddrTDomain, snmpTargetAddrTAddress=snmpTargetAddrTAddress, snmpTargetAddrTimeout=snmpTargetAddrTimeout, snmpTargetAddrRetryCount=snmpTargetAddrRetryCount, snmpTargetAddrTagList=snmpTargetAddrTagList, snmpTargetAddrParams=snmpTargetAddrParams, snmpTargetAddrStorageType=snmpTargetAddrStorageType, snmpTargetAddrRowStatus=snmpTargetAddrRowStatus, snmpTargetParamsTable=snmpTargetParamsTable, snmpTargetParamsEntry=snmpTargetParamsEntry, snmpTargetParamsName=snmpTargetParamsName, snmpTargetParamsMPModel=snmpTargetParamsMPModel, snmpTargetParamsSecurityModel=snmpTargetParamsSecurityModel, snmpTargetParamsSecurityName=snmpTargetParamsSecurityName, snmpTargetParamsSecurityLevel=snmpTargetParamsSecurityLevel, snmpTargetParamsStorageType=snmpTargetParamsStorageType, snmpTargetParamsRowStatus=snmpTargetParamsRowStatus, snmpUnavailableContexts=snmpUnavailableContexts, snmpUnknownContexts=snmpUnknownContexts, snmpTargetConformance=snmpTargetConformance, snmpTargetCompliances=snmpTargetCompliances, snmpTargetGroups=snmpTargetGroups) # Groups mibBuilder.exportSymbols("SNMP-TARGET-MIB", snmpTargetResponseGroup=snmpTargetResponseGroup, snmpTargetCommandResponderGroup=snmpTargetCommandResponderGroup, snmpTargetBasicGroup=snmpTargetBasicGroup) PK†£=loƒMa a pysnmp/smi/mibs/RFC1155-SMI.pyc;ò ª ˜Jc@sdklZlZdklZeiddddƒ\ZZZ eidddd d ƒ\Z Z Z Z d e fd „ƒYZd e fd„ƒYZde fd„ƒYZdefd„ƒYZdefd„ƒYZde fd„ƒYZd e fd„ƒYZ e ddddfƒZe dddddfƒZe dddddfƒZe dddddfƒZe dddddfƒZe ddddddfƒZeidd ed ededededed e ƒeiddeded ed!ed"ed#eƒd$S(%(s constraintsnamedval(sNetworkAddresssASN1sIntegersObjectIdentifiers OctetStrings SNMPv2-SMIsBitss Integer32s MibIdentifiers TimeTickssCountercBs!tZeieiddƒZRS(Nilÿÿ(s__name__s __module__s Integer32s subtypeSpecs constraintsValueRangeConstraint(((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/RFC1155-SMI.pysCounterssGaugecBs!tZeieiddƒZRS(Nilÿÿ(s__name__s __module__s Integer32s subtypeSpecs constraintsValueRangeConstraint(((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/RFC1155-SMI.pysGaugess IpAddresscBs'tZeieiddƒZdZRS(Ni(s__name__s __module__s OctetStrings subtypeSpecs constraintsValueSizeConstraints fixedLength(((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/RFC1155-SMI.pys IpAddressssNetworkAddresscBstZRS(N(s__name__s __module__(((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/RFC1155-SMI.pysNetworkAddressss ObjectNamecBstZRS(N(s__name__s __module__(((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/RFC1155-SMI.pys ObjectName"ssOpaquecBstZRS(N(s__name__s __module__(((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/RFC1155-SMI.pysOpaque%scBs!tZeieiddƒZRS(Nilÿÿ(s__name__s __module__s Integer32s subtypeSpecs constraintsValueRangeConstraint(((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/RFC1155-SMI.pys TimeTicks(siiiiis RFC1155-SMIsinternets directorysmgmts experimentalsprivates enterprisesN(s pyasn1.types constraintsnamedvalspysnmp.proto.rfc1155sNetworkAddresss mibBuilders importSymbolssIntegersObjectIdentifiers OctetStringsBitss Integer32s MibIdentifiers TimeTickssCountersGauges IpAddresss ObjectNamesOpaquesinternets directorysmgmts experimentalsprivates enterprisess exportSymbols(sNetworkAddresssOpaques TimeTickssmgmtsprivatesBitss IpAddresssinternetsObjectIdentifiersnamedvals OctetStringsCounters enterprisessIntegers Integer32s ObjectNames constraints MibIdentifiers directorysGauges experimental((s9build/bdist.linux-i686/egg/pysnmp/smi/mibs/RFC1155-SMI.pys?s$ !'7PKà©z:±*ªr>r>(pysnmp/smi/mibs/SNMP-NOTIFICATION-MIB.py# PySNMP SMI module. Autogenerated from smidump -f python SNMP-NOTIFICATION-MIB # by libsmi2pysnmp-0.0.9-alpha at Thu Mar 26 20:58:12 2009, # Python version (2, 4, 4, 'final', 0) # Imported just in case new ASN.1 types would be created from pyasn1.type import constraint, namedval # Imports ( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") ( SnmpAdminString, ) = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") ( SnmpTagValue, snmpTargetBasicGroup, snmpTargetBasicGroup, snmpTargetBasicGroup, snmpTargetParamsMPModel, snmpTargetParamsName, snmpTargetParamsRowStatus, snmpTargetParamsSecurityLevel, snmpTargetParamsSecurityModel, snmpTargetParamsSecurityName, snmpTargetParamsStorageType, snmpTargetResponseGroup, ) = mibBuilder.importSymbols("SNMP-TARGET-MIB", "SnmpTagValue", "snmpTargetBasicGroup", "snmpTargetBasicGroup", "snmpTargetBasicGroup", "snmpTargetParamsMPModel", "snmpTargetParamsName", "snmpTargetParamsRowStatus", "snmpTargetParamsSecurityLevel", "snmpTargetParamsSecurityModel", "snmpTargetParamsSecurityName", "snmpTargetParamsStorageType", "snmpTargetResponseGroup") ( ModuleCompliance, ObjectGroup, ) = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup") ( Bits, Integer32, ModuleIdentity, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, snmpModules, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "Integer32", "ModuleIdentity", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "snmpModules") ( RowStatus, StorageType, ) = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "StorageType") # Objects snmpNotificationMIB = ModuleIdentity((1, 3, 6, 1, 6, 3, 13)).setRevisions(("2002-10-14 00:00","1998-08-04 00:00","1997-07-14 00:00",)) if mibBuilder.loadTexts: snmpNotificationMIB.setOrganization("IETF SNMPv3 Working Group") if mibBuilder.loadTexts: snmpNotificationMIB.setContactInfo("WG-email: snmpv3@lists.tislabs.com\nSubscribe: majordomo@lists.tislabs.com\n In message body: subscribe snmpv3\n\nCo-Chair: Russ Mundy\n Network Associates Laboratories\nPostal: 15204 Omega Drive, Suite 300\n Rockville, MD 20850-4601\n USA\nEMail: mundy@tislabs.com\nPhone: +1 301-947-7107\n\nCo-Chair: David Harrington\n Enterasys Networks\nPostal: 35 Industrial Way\n P. O. Box 5004\n Rochester, New Hampshire 03866-5005\n USA\nEMail: dbh@enterasys.com\nPhone: +1 603-337-2614\n\nCo-editor: David B. Levi\n Nortel Networks\nPostal: 3505 Kesterwood Drive\n Knoxville, Tennessee 37918\nEMail: dlevi@nortelnetworks.com\nPhone: +1 865 686 0432\n\nCo-editor: Paul Meyer\n Secure Computing Corporation\nPostal: 2675 Long Lake Road\n Roseville, Minnesota 55113\nEMail: paul_meyer@securecomputing.com\nPhone: +1 651 628 1592\n\nCo-editor: Bob Stewart\n Retired") if mibBuilder.loadTexts: snmpNotificationMIB.setDescription("This MIB module defines MIB objects which provide\nmechanisms to remotely configure the parameters\nused by an SNMP entity for the generation of\nnotifications.\n\nCopyright (C) The Internet Society (2002). This\nversion of this MIB module is part of RFC 3413;\nsee the RFC itself for full legal notices.") snmpNotifyObjects = MibIdentifier((1, 3, 6, 1, 6, 3, 13, 1)) snmpNotifyTable = MibTable((1, 3, 6, 1, 6, 3, 13, 1, 1)) if mibBuilder.loadTexts: snmpNotifyTable.setDescription("This table is used to select management targets which should\nreceive notifications, as well as the type of notification\nwhich should be sent to each selected management target.") snmpNotifyEntry = MibTableRow((1, 3, 6, 1, 6, 3, 13, 1, 1, 1)).setIndexNames((1, "SNMP-NOTIFICATION-MIB", "snmpNotifyName")) if mibBuilder.loadTexts: snmpNotifyEntry.setDescription("An entry in this table selects a set of management targets\nwhich should receive notifications, as well as the type of\n\n\n\nnotification which should be sent to each selected\nmanagement target.\n\nEntries in the snmpNotifyTable are created and\ndeleted using the snmpNotifyRowStatus object.") snmpNotifyName = MibTableColumn((1, 3, 6, 1, 6, 3, 13, 1, 1, 1, 1), SnmpAdminString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, 32))).setMaxAccess("noaccess") if mibBuilder.loadTexts: snmpNotifyName.setDescription("The locally arbitrary, but unique identifier associated\nwith this snmpNotifyEntry.") snmpNotifyTag = MibTableColumn((1, 3, 6, 1, 6, 3, 13, 1, 1, 1, 2), SnmpTagValue().clone('')).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpNotifyTag.setDescription("This object contains a single tag value which is used\nto select entries in the snmpTargetAddrTable. Any entry\nin the snmpTargetAddrTable which contains a tag value\nwhich is equal to the value of an instance of this\nobject is selected. If this object contains a value\nof zero length, no entries are selected.") snmpNotifyType = MibTableColumn((1, 3, 6, 1, 6, 3, 13, 1, 1, 1, 3), Integer().subtype(subtypeSpec=constraint.SingleValueConstraint(2,1,)).subtype(namedValues=namedval.NamedValues(("trap", 1), ("inform", 2), )).clone(1)).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpNotifyType.setDescription("This object determines the type of notification to\n\n\n\nbe generated for entries in the snmpTargetAddrTable\nselected by the corresponding instance of\nsnmpNotifyTag. This value is only used when\ngenerating notifications, and is ignored when\nusing the snmpTargetAddrTable for other purposes.\n\nIf the value of this object is trap(1), then any\nmessages generated for selected rows will contain\nUnconfirmed-Class PDUs.\n\nIf the value of this object is inform(2), then any\nmessages generated for selected rows will contain\nConfirmed-Class PDUs.\n\nNote that if an SNMP entity only supports\ngeneration of Unconfirmed-Class PDUs (and not\nConfirmed-Class PDUs), then this object may be\nread-only.") snmpNotifyStorageType = MibTableColumn((1, 3, 6, 1, 6, 3, 13, 1, 1, 1, 4), StorageType().clone('nonVolatile')).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpNotifyStorageType.setDescription("The storage type for this conceptual row.\nConceptual rows having the value 'permanent' need not\nallow write-access to any columnar objects in the row.") snmpNotifyRowStatus = MibTableColumn((1, 3, 6, 1, 6, 3, 13, 1, 1, 1, 5), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpNotifyRowStatus.setDescription("The status of this conceptual row.\n\nTo create a row in this table, a manager must\nset this object to either createAndGo(4) or\ncreateAndWait(5).") snmpNotifyFilterProfileTable = MibTable((1, 3, 6, 1, 6, 3, 13, 1, 2)) if mibBuilder.loadTexts: snmpNotifyFilterProfileTable.setDescription("This table is used to associate a notification filter\nprofile with a particular set of target parameters.") snmpNotifyFilterProfileEntry = MibTableRow((1, 3, 6, 1, 6, 3, 13, 1, 2, 1)).setIndexNames((1, "SNMP-TARGET-MIB", "snmpTargetParamsName")) if mibBuilder.loadTexts: snmpNotifyFilterProfileEntry.setDescription("An entry in this table indicates the name of the filter\nprofile to be used when generating notifications using\nthe corresponding entry in the snmpTargetParamsTable.\n\nEntries in the snmpNotifyFilterProfileTable are created\nand deleted using the snmpNotifyFilterProfileRowStatus\nobject.") snmpNotifyFilterProfileName = MibTableColumn((1, 3, 6, 1, 6, 3, 13, 1, 2, 1, 1), SnmpAdminString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, 32))).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpNotifyFilterProfileName.setDescription("The name of the filter profile to be used when generating\nnotifications using the corresponding entry in the\nsnmpTargetAddrTable.") snmpNotifyFilterProfileStorType = MibTableColumn((1, 3, 6, 1, 6, 3, 13, 1, 2, 1, 2), StorageType().clone('nonVolatile')).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpNotifyFilterProfileStorType.setDescription("The storage type for this conceptual row.\nConceptual rows having the value 'permanent' need not\nallow write-access to any columnar objects in the row.") snmpNotifyFilterProfileRowStatus = MibTableColumn((1, 3, 6, 1, 6, 3, 13, 1, 2, 1, 3), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpNotifyFilterProfileRowStatus.setDescription("The status of this conceptual row.\n\nTo create a row in this table, a manager must\nset this object to either createAndGo(4) or\ncreateAndWait(5).\n\nUntil instances of all corresponding columns are\nappropriately configured, the value of the\ncorresponding instance of the\nsnmpNotifyFilterProfileRowStatus column is 'notReady'.\n\nIn particular, a newly created row cannot be made\nactive until the corresponding instance of\nsnmpNotifyFilterProfileName has been set.") snmpNotifyFilterTable = MibTable((1, 3, 6, 1, 6, 3, 13, 1, 3)) if mibBuilder.loadTexts: snmpNotifyFilterTable.setDescription("The table of filter profiles. Filter profiles are used\nto determine whether particular management targets should\nreceive particular notifications.\n\nWhen a notification is generated, it must be compared\nwith the filters associated with each management target\nwhich is configured to receive notifications, in order to\ndetermine whether it may be sent to each such management\ntarget.\n\nA more complete discussion of notification filtering\ncan be found in section 6. of [SNMP-APPL].") snmpNotifyFilterEntry = MibTableRow((1, 3, 6, 1, 6, 3, 13, 1, 3, 1)).setIndexNames((0, "SNMP-NOTIFICATION-MIB", "snmpNotifyFilterProfileName"), (1, "SNMP-NOTIFICATION-MIB", "snmpNotifyFilterSubtree")) if mibBuilder.loadTexts: snmpNotifyFilterEntry.setDescription("An element of a filter profile.\n\nEntries in the snmpNotifyFilterTable are created and\ndeleted using the snmpNotifyFilterRowStatus object.") snmpNotifyFilterSubtree = MibTableColumn((1, 3, 6, 1, 6, 3, 13, 1, 3, 1, 1), ObjectIdentifier()).setMaxAccess("noaccess") if mibBuilder.loadTexts: snmpNotifyFilterSubtree.setDescription("The MIB subtree which, when combined with the corresponding\ninstance of snmpNotifyFilterMask, defines a family of\nsubtrees which are included in or excluded from the\nfilter profile.") snmpNotifyFilterMask = MibTableColumn((1, 3, 6, 1, 6, 3, 13, 1, 3, 1, 2), OctetString().subtype(subtypeSpec=constraint.ValueSizeConstraint(0, 16)).clone('')).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpNotifyFilterMask.setDescription("The bit mask which, in combination with the corresponding\ninstance of snmpNotifyFilterSubtree, defines a family of\nsubtrees which are included in or excluded from the\nfilter profile.\n\nEach bit of this bit mask corresponds to a\nsub-identifier of snmpNotifyFilterSubtree, with the\nmost significant bit of the i-th octet of this octet\nstring value (extended if necessary, see below)\ncorresponding to the (8*i - 7)-th sub-identifier, and\nthe least significant bit of the i-th octet of this\noctet string corresponding to the (8*i)-th\nsub-identifier, where i is in the range 1 through 16.\n\nEach bit of this bit mask specifies whether or not\nthe corresponding sub-identifiers must match when\ndetermining if an OBJECT IDENTIFIER matches this\nfamily of filter subtrees; a '1' indicates that an\nexact match must occur; a '0' indicates 'wild card',\ni.e., any sub-identifier value matches.\n\n\n\nThus, the OBJECT IDENTIFIER X of an object instance\nis contained in a family of filter subtrees if, for\neach sub-identifier of the value of\nsnmpNotifyFilterSubtree, either:\n\n the i-th bit of snmpNotifyFilterMask is 0, or\n\n the i-th sub-identifier of X is equal to the i-th\n sub-identifier of the value of\n snmpNotifyFilterSubtree.\n\nIf the value of this bit mask is M bits long and\nthere are more than M sub-identifiers in the\ncorresponding instance of snmpNotifyFilterSubtree,\nthen the bit mask is extended with 1's to be the\nrequired length.\n\nNote that when the value of this object is the\nzero-length string, this extension rule results in\na mask of all-1's being used (i.e., no 'wild card'),\nand the family of filter subtrees is the one\nsubtree uniquely identified by the corresponding\ninstance of snmpNotifyFilterSubtree.") snmpNotifyFilterType = MibTableColumn((1, 3, 6, 1, 6, 3, 13, 1, 3, 1, 3), Integer().subtype(subtypeSpec=constraint.SingleValueConstraint(1,2,)).subtype(namedValues=namedval.NamedValues(("included", 1), ("excluded", 2), )).clone(1)).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpNotifyFilterType.setDescription("This object indicates whether the family of filter subtrees\ndefined by this entry are included in or excluded from a\nfilter. A more detailed discussion of the use of this\nobject can be found in section 6. of [SNMP-APPL].") snmpNotifyFilterStorageType = MibTableColumn((1, 3, 6, 1, 6, 3, 13, 1, 3, 1, 4), StorageType().clone('nonVolatile')).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpNotifyFilterStorageType.setDescription("The storage type for this conceptual row.\nConceptual rows having the value 'permanent' need not\n\n\n\nallow write-access to any columnar objects in the row.") snmpNotifyFilterRowStatus = MibTableColumn((1, 3, 6, 1, 6, 3, 13, 1, 3, 1, 5), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpNotifyFilterRowStatus.setDescription("The status of this conceptual row.\n\nTo create a row in this table, a manager must\nset this object to either createAndGo(4) or\ncreateAndWait(5).") snmpNotifyConformance = MibIdentifier((1, 3, 6, 1, 6, 3, 13, 3)) snmpNotifyCompliances = MibIdentifier((1, 3, 6, 1, 6, 3, 13, 3, 1)) snmpNotifyGroups = MibIdentifier((1, 3, 6, 1, 6, 3, 13, 3, 2)) # Augmentions # Groups snmpNotifyFilterGroup = ObjectGroup((1, 3, 6, 1, 6, 3, 13, 3, 2, 2)).setObjects(("SNMP-NOTIFICATION-MIB", "snmpNotifyFilterRowStatus"), ("SNMP-NOTIFICATION-MIB", "snmpNotifyFilterProfileStorType"), ("SNMP-NOTIFICATION-MIB", "snmpNotifyFilterProfileName"), ("SNMP-NOTIFICATION-MIB", "snmpNotifyFilterType"), ("SNMP-NOTIFICATION-MIB", "snmpNotifyFilterStorageType"), ("SNMP-NOTIFICATION-MIB", "snmpNotifyFilterMask"), ("SNMP-NOTIFICATION-MIB", "snmpNotifyFilterProfileRowStatus"), ) snmpNotifyGroup = ObjectGroup((1, 3, 6, 1, 6, 3, 13, 3, 2, 1)).setObjects(("SNMP-NOTIFICATION-MIB", "snmpNotifyTag"), ("SNMP-NOTIFICATION-MIB", "snmpNotifyRowStatus"), ("SNMP-NOTIFICATION-MIB", "snmpNotifyStorageType"), ("SNMP-NOTIFICATION-MIB", "snmpNotifyType"), ) # Exports # Module identity mibBuilder.exportSymbols("SNMP-NOTIFICATION-MIB", PYSNMP_MODULE_ID=snmpNotificationMIB) # Objects mibBuilder.exportSymbols("SNMP-NOTIFICATION-MIB", snmpNotificationMIB=snmpNotificationMIB, snmpNotifyObjects=snmpNotifyObjects, snmpNotifyTable=snmpNotifyTable, snmpNotifyEntry=snmpNotifyEntry, snmpNotifyName=snmpNotifyName, snmpNotifyTag=snmpNotifyTag, snmpNotifyType=snmpNotifyType, snmpNotifyStorageType=snmpNotifyStorageType, snmpNotifyRowStatus=snmpNotifyRowStatus, snmpNotifyFilterProfileTable=snmpNotifyFilterProfileTable, snmpNotifyFilterProfileEntry=snmpNotifyFilterProfileEntry, snmpNotifyFilterProfileName=snmpNotifyFilterProfileName, snmpNotifyFilterProfileStorType=snmpNotifyFilterProfileStorType, snmpNotifyFilterProfileRowStatus=snmpNotifyFilterProfileRowStatus, snmpNotifyFilterTable=snmpNotifyFilterTable, snmpNotifyFilterEntry=snmpNotifyFilterEntry, snmpNotifyFilterSubtree=snmpNotifyFilterSubtree, snmpNotifyFilterMask=snmpNotifyFilterMask, snmpNotifyFilterType=snmpNotifyFilterType, snmpNotifyFilterStorageType=snmpNotifyFilterStorageType, snmpNotifyFilterRowStatus=snmpNotifyFilterRowStatus, snmpNotifyConformance=snmpNotifyConformance, snmpNotifyCompliances=snmpNotifyCompliances, snmpNotifyGroups=snmpNotifyGroups) # Groups mibBuilder.exportSymbols("SNMP-NOTIFICATION-MIB", snmpNotifyFilterGroup=snmpNotifyFilterGroup, snmpNotifyGroup=snmpNotifyGroup) PK†£=¥›' 00&pysnmp/smi/mibs/SNMP-COMMUNITY-MIB.pyc;ò %ÆËIc,@s¦ dklZlZeiddddƒ\ZZZeidddƒ\ZZ eidd d ƒ\Z Z eid d d ƒ\Z Z eidddddddddddddƒ \ ZZZZZZZZZZZZeidddƒ\ZZeddddddd fƒid!d"fƒZeioeid#ƒneioeid$ƒneioei d%ƒneddddddd dfƒZ!eddddddd ddf ƒZ"eioe"i d&ƒneddddddd dddf ƒi#dd'd(fƒZ$eioe$i d)ƒneddddddd ddddf eƒi%d*ei&dd+ƒƒƒi'd,ƒZ(eioe(i d-ƒneddddddd dddd.f eƒƒi'd/ƒZ)eioe)i d0ƒneddddddd ddddf eƒi%d*ei&dd+ƒƒƒi'd/ƒZ*eioe*i d1ƒneddddddd dddd2f e ƒƒi'd/ƒZ+eioe+i d3ƒneddddddd dddd4f eƒi%d*ei&d5d+ƒƒi,d6ƒƒi'd/ƒZ-eioe-i d7ƒneddddddd ddddf e ƒi,d6ƒƒi'd/ƒZ.eioe.i d8ƒneddddddd dddd9f eƒƒi'd/ƒZ/eioe/i d:ƒneddddddd dddd;f eƒƒi'd/ƒZ0eioe0i d<ƒneddddddd dd.f ƒZ1eioe1i d=ƒneddddddd dd.df ƒZ2eioe2i d>ƒneddddddd dd.ddf eƒi%d*ei&d5d?ƒƒi,d6ƒƒi'd/ƒZ3eioe3i d@ƒneddddddd dd.dd.f eƒi%d*ei4ei5d5d5ƒei5dAdBƒƒƒi,dAƒƒi'd/ƒZ6eioe6i dCƒneddddddd ddf eƒƒi'dDƒZ7eioe7i dEƒneddddddd dd2f eƒƒi'dDƒZ8eioe8i dFƒneddddddd d.fƒZ9eddddddd d.df ƒZ:eddddddd d.d.f ƒZ;eidd ƒ\Z e i<d'dGfƒe=e2i#e i>ƒƒe ddddddd d.d.df ƒi?d'dHfd'dIfƒZ@e ddddddd d.d.df ƒi?d'dJfd'dKfd'dLfd'dMfd'dNfd'dOfd'dPfd'dQfd'dRfƒ ZAeiBd'dSeƒeiBd'dTedUe!dVe"dWe$d(e(dPe)dOe*dLe+dNe-dRe.dJe/dMe0dXe1dGe2dKe3dQe6dHe7dIe8dYe9dZe:d[e;ƒeiBd'd\e@d]eAƒd^S(_(s constraintsnamedvalsASN1sIntegersObjectIdentifiers OctetStringsSNMP-FRAMEWORK-MIBsSnmpAdminStrings SnmpEngineIDsSNMP-TARGET-MIBs SnmpTagValuessnmpTargetAddrEntrys SNMPv2-CONFsModuleCompliances ObjectGroups SNMPv2-SMIsBitss Integer32s IpAddresssModuleIdentitys MibIdentifiers MibScalarsMibTables MibTableRowsMibTableColumns TimeTickss snmpModuless SNMPv2-TCs RowStatuss StorageTypeiiiis2000-03-06 00:00s1999-05-13 00:00sSNMPv3 Working GroupsFWG-email: snmpv3@lists.tislabs.com Subscribe: majordomo@lists.tislabs.com In msg body: subscribe snmpv3 Chair: Russ Mundy TIS Labs at Network Associates Postal: 3060 Washington Rd Glenwood MD 21738 USA Email: mundy@tislabs.com Phone: +1-301-854-6889 Co-editor: Rob Frye CoSine Communications Postal: 1200 Bridge Parkway Redwood City, CA 94065 USA E-mail: rfrye@cosinecom.com Phone: +1 703 725 1130 Co-editor: David B. Levi Nortel Networks Postal: 3505 Kesterwood Drive Knoxville, TN 37918 E-mail: dlevi@nortelnetworks.com Phone: +1 423 686 0432 Co-editor: Shawn A. Routhier Integrated Systems Inc. Postal: 333 North Ave 4th Floor Wakefield, MA 01880 E-mail: sar@epilogue.com Phone: +1 781 245 0804 Co-editor: Bert Wijnen Lucent Technologies Postal: Schagen 33 3461 GL Linschoten Netherlands Email: bwijnen@lucent.com Phone: +31-348-407-775s`This MIB module defines objects to help support coexistence between SNMPv1, SNMPv2c, and SNMPv3.scThe table of community strings configured in the SNMP engine's Local Configuration Datastore (LCD).sSNMP-COMMUNITY-MIBssnmpCommunityIndexs0Information about a particular community string.s subtypeSpeci snoaccesss.The unique index value of a row in this table.is readcreatesNThe community string for which a row in this table represents a configuration.syA human readable string representing the corresponding value of snmpCommunityName in a Security Model independent format.isThe contextEngineID indicating the location of the context in which management information is accessed when using the community string specified by the corresponding instance of snmpCommunityName. The default value is the snmpEngineID of the entity in which this object is instantiated.iiss•The context in which management information is accessed when using the community string specified by the corresponding instance of snmpCommunityName.sxThis object specifies a set of transport endpoints from which a command responder application will accept management requests. If a management request containing this community is received on a transport endpoint other than the transport endpoints identified by this object, the request is deemed unauthentic. The transports identified by this object are specified in the snmpTargetAddrTable. Entries in that table whose snmpTargetAddrTagList contains this tag value are identified. If the value of this object has zero-length, transport endpoints are not checked when authenticating messages containing this community string.is°The storage type for this conceptual row in the snmpCommunityTable. Conceptual rows having the value 'permanent' need not allow write-access to any columnar object in the row.isµThe status of this conceptual row in the snmpCommunityTable. An entry in this table is not qualified for activation until instances of all corresponding columns have been initialized, either through default values, or through Set operations. The snmpCommunityName and snmpCommunitySecurityName objects must be explicitly set. There is no restriction on setting columns in this table when the value of snmpCommunityStatus is active(1).s*The table of mask and mms values associated with the snmpTargetAddrTable. The snmpTargetAddrExtTable augments the snmpTargetAddrTable with a transport address mask value and a maximum message size value. The transport address mask allows entries in the snmpTargetAddrTable to define a set of addresses instead of just a single address. The maximum message size value allows the maximum message size of another SNMP entity to be configured for use in SNMPv1 (and SNMPv2c) transactions, where the message format does not specify a maximum message size.s2Information about a particular mask and mms value.iÿsÈThe mask value associated with an entry in the snmpTargetAddrTable. The value of this object must have the same length as the corresponding instance of snmpTargetAddrTAddress, or must have length 0. An attempt to set it to any other value will result in an inconsistentValue error. The value of this object allows an entry in the snmpTargetAddrTable to specify multiple addresses. The mask value is used to select which bits of a transport address must match bits of the corresponding instance of snmpTargetAddrTAddress, in order for the transport address to match a particular entry in the snmpTargetAddrTable. Bits which are 1 in the mask value indicate bits in the transport address which must match bits in the snmpTargetAddrTAddress value. Bits which are 0 in the mask indicate bits in the transport address which need not match. If the length of the mask is 0, the mask should be treated as if all its bits were 1 and its length were equal to the length of the corresponding value of snmpTargetAddrTable. This object may not be modified while the value of the corresponding instance of snmpTargetAddrRowStatus is active(1). An attempt to set this object in this case will result in an inconsistentValue error.iälÿÿsSThe maximum message size value associated with an entry in the snmpTargetAddrTable.s notifyonlysThe value of the agent-addr field of a Trap PDU which is forwarded by a proxy forwarder application using an SNMP version other than SNMPv1. The value of this object SHOULD contain the value of the agent-addr field from the original Trap PDU as generated by an SNMPv1 agent.sZThe value of the community string field of an SNMPv1 message containing a Trap PDU which is forwarded by a a proxy forwarder application using an SNMP version other than SNMPv1. The value of this object SHOULD contain the value of the community string field from the original SNMPv1 message containing a Trap PDU as generated by an SNMPv1 agent.ssnmpTargetAddrExtEntryssnmpTrapAddressssnmpTrapCommunityssnmpCommunityStorageTypessnmpTargetAddrTMaskssnmpCommunityContextEngineIDssnmpCommunityStatusssnmpCommunityContextNamessnmpCommunitySecurityNamessnmpCommunityNamessnmpTargetAddrMMSssnmpCommunityTransportTagsPYSNMP_MODULE_IDssnmpCommunityMIBssnmpCommunityMIBObjectsssnmpCommunityTablessnmpCommunityEntryssnmpTargetAddrExtTablessnmpCommunityMIBConformancessnmpCommunityMIBCompliancesssnmpCommunityMIBGroupsssnmpProxyTrapForwardGroupssnmpCommunityGroupN(Cs pyasn1.types constraintsnamedvals mibBuilders importSymbolssIntegersObjectIdentifiers OctetStringsSnmpAdminStrings SnmpEngineIDs SnmpTagValuessnmpTargetAddrEntrysModuleCompliances ObjectGroupsBitss Integer32s IpAddresssModuleIdentitys MibIdentifiers MibScalarsMibTables MibTableRowsMibTableColumns TimeTickss snmpModuless RowStatuss StorageTypes setRevisionsssnmpCommunityMIBs loadTextsssetOrganizationssetContactInfossetDescriptionssnmpCommunityMIBObjectsssnmpCommunityTables setIndexNamesssnmpCommunityEntryssubtypesValueSizeConstraints setMaxAccessssnmpCommunityIndexssnmpCommunityNamessnmpCommunitySecurityNamessnmpCommunityContextEngineIDsclonessnmpCommunityContextNamessnmpCommunityTransportTagssnmpCommunityStorageTypessnmpCommunityStatusssnmpTargetAddrExtTablessnmpTargetAddrExtEntryssnmpTargetAddrTMasksConstraintsUnionsValueRangeConstraintssnmpTargetAddrMMSssnmpTrapAddressssnmpTrapCommunityssnmpCommunityMIBConformancessnmpCommunityMIBCompliancesssnmpCommunityMIBGroupssregisterAugmentionssapplys getIndexNamess setObjectsssnmpProxyTrapForwardGroupssnmpCommunityGroups exportSymbols(/sSnmpAdminStrings MibScalarssnmpTrapAddresss TimeTicksssnmpCommunityContextEngineIDssnmpCommunityTablesModuleIdentitys SnmpEngineIDssnmpCommunityGroups snmpModulesssnmpCommunityMIBssnmpTargetAddrExtTables IpAddresss ObjectGroupssnmpCommunityStorageTypesMibTableColumnssnmpCommunitySecurityNamesModuleCompliancesMibTablessnmpCommunityStatusssnmpTargetAddrEntrysBitss RowStatusssnmpTrapCommunitysObjectIdentifiersnamedvals SnmpTagValues OctetStrings MibTableRowssnmpCommunityMIBConformancessnmpCommunityMIBGroupsssnmpProxyTrapForwardGroupsIntegerssnmpCommunityMIBObjectsssnmpCommunityTransportTags Integer32ssnmpCommunityMIBCompliancess constraints StorageTypessnmpCommunityEntryssnmpCommunityContextNamessnmpCommunityIndexs MibIdentifierssnmpTargetAddrTMaskssnmpCommunityNamessnmpTargetAddrMMSssnmpTargetAddrExtEntry((s@build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-COMMUNITY-MIB.pys?s’!W0   $' < T < T < ] E < < ' * ] u 6 6 $''B‹PK¥žl9$Ç,@@)pysnmp/smi/mibs/instances/__SNMPv2-MIB.pyfrom sys import version from time import time from pysnmp import majorVersionId ( MibScalarInstance, TimeTicks) = mibBuilder.importSymbols( 'SNMPv2-SMI', 'MibScalarInstance', 'TimeTicks' ) ( sysDescr, sysObjectID, sysUpTime, sysContact, sysName, sysLocation, sysServices, sysORLastChange, snmpInPkts, snmpOutPkts, snmpInBadVersions, snmpInBadCommunityNames, snmpInBadCommunityUses, snmpInASNParseErrs, snmpInTooBigs, snmpInNoSuchNames, snmpInBadValues, snmpInReadOnlys, snmpInGenErrs, snmpInTotalReqVars, snmpInTotalSetVars, snmpInGetRequests, snmpInGetNexts, snmpInSetRequests, snmpInGetResponses, snmpInTraps, snmpOutTooBigs, snmpOutNoSuchNames, snmpOutBadValues, snmpOutGenErrs, snmpOutSetRequests, snmpOutGetResponses, snmpOutTraps, snmpEnableAuthenTraps, snmpSilentDrops, snmpProxyDrops, snmpTrapOID, coldStart, snmpSetSerialNo ) = mibBuilder.importSymbols( 'SNMPv2-MIB', 'sysDescr', 'sysObjectID', 'sysUpTime', 'sysContact', 'sysName', 'sysLocation', 'sysServices', 'sysORLastChange', 'snmpInPkts', 'snmpOutPkts', 'snmpInBadVersions', 'snmpInBadCommunityNames', 'snmpInBadCommunityUses', 'snmpInASNParseErrs', 'snmpInTooBigs', 'snmpInNoSuchNames', 'snmpInBadValues', 'snmpInReadOnlys', 'snmpInGenErrs', 'snmpInTotalReqVars', 'snmpInTotalSetVars', 'snmpInGetRequests', 'snmpInGetNexts', 'snmpInSetRequests', 'snmpInGetResponses', 'snmpInTraps', 'snmpOutTooBigs', 'snmpOutNoSuchNames', 'snmpOutBadValues', 'snmpOutGenErrs', 'snmpOutSetRequests', 'snmpOutGetResponses', 'snmpOutTraps', 'snmpEnableAuthenTraps', 'snmpSilentDrops', 'snmpProxyDrops', 'snmpTrapOID', 'coldStart', 'snmpSetSerialNo' ) __sysDescr = MibScalarInstance(sysDescr.name, (0,), sysDescr.syntax.clone("PySNMP engine version %s, Python %s" % (majorVersionId, version))) __sysObjectID = MibScalarInstance(sysObjectID.name, (0,), sysObjectID.syntax.clone((1,3,6,1,4,1,20408))) class SysUpTime(TimeTicks): createdAt = time() def clone(self, **kwargs): if kwargs.get('value') is None: kwargs['value'] = int((time()-self.createdAt)*100) return apply(TimeTicks.clone, [self], kwargs) __sysUpTime = MibScalarInstance(sysUpTime.name, (0,), SysUpTime(0)) __sysContact = MibScalarInstance(sysContact.name, (0,), sysContact.syntax.clone('')) __sysName = MibScalarInstance(sysName.name, (0,), sysName.syntax.clone('')) __sysLocation = MibScalarInstance(sysLocation.name, (0,), sysLocation.syntax.clone('')) __sysServices = MibScalarInstance(sysServices.name, (0,), sysServices.syntax.clone(0)) __sysORLastChange = MibScalarInstance(sysORLastChange.name, (0,), sysORLastChange.syntax.clone(0)) __snmpInPkts = MibScalarInstance(snmpInPkts.name, (0,), snmpInPkts.syntax.clone(0)) __snmpOutPkts = MibScalarInstance(snmpOutPkts.name, (0,), snmpOutPkts.syntax.clone(0)) __snmpInBadVersions = MibScalarInstance(snmpInBadVersions.name, (0,), snmpInBadVersions.syntax.clone(0)) __snmpInBadCommunityNames = MibScalarInstance(snmpInBadCommunityNames.name, (0,), snmpInBadCommunityNames.syntax.clone(0)) __snmpInBadCommunityUses = MibScalarInstance(snmpInBadCommunityUses.name, (0,), snmpInBadCommunityUses.syntax.clone(0)) __snmpInASNParseErrs = MibScalarInstance(snmpInASNParseErrs.name, (0,), snmpInASNParseErrs.syntax.clone(0)) __snmpInTooBigs = MibScalarInstance(snmpInTooBigs.name, (0,), snmpInTooBigs.syntax.clone(0)) __snmpInNoSuchNames = MibScalarInstance(snmpInNoSuchNames.name, (0,), snmpInNoSuchNames.syntax.clone(0)) __snmpInBadValues = MibScalarInstance(snmpInBadValues.name, (0,), snmpInBadValues.syntax.clone(0)) __snmpInReadOnlys = MibScalarInstance(snmpInReadOnlys.name, (0,), snmpInReadOnlys.syntax.clone(0)) __snmpInGenErrs = MibScalarInstance(snmpInGenErrs.name, (0,), snmpInGenErrs.syntax.clone(0)) __snmpInTotalReqVars = MibScalarInstance(snmpInTotalReqVars.name, (0,), snmpInTotalReqVars.syntax.clone(0)) __snmpInTotalSetVars = MibScalarInstance(snmpInTotalSetVars.name, (0,), snmpInTotalSetVars.syntax.clone(0)) __snmpInGetRequests = MibScalarInstance(snmpInGetRequests.name, (0,), snmpInGetRequests.syntax.clone(0)) __snmpInGetNexts = MibScalarInstance(snmpInGetNexts.name, (0,), snmpInGetNexts.syntax.clone(0)) __snmpInSetRequests = MibScalarInstance(snmpInSetRequests.name, (0,), snmpInSetRequests.syntax.clone(0)) __snmpInGetResponses = MibScalarInstance(snmpInGetResponses.name, (0,), snmpInGetResponses.syntax.clone(0)) __snmpInTraps = MibScalarInstance(snmpInTraps.name, (0,), snmpInTraps.syntax.clone(0)) __snmpOutTooBigs = MibScalarInstance(snmpOutTooBigs.name, (0,), snmpOutTooBigs.syntax.clone(0)) __snmpOutNoSuchNames = MibScalarInstance(snmpOutNoSuchNames.name, (0,), snmpOutNoSuchNames.syntax.clone(0)) __snmpOutBadValues = MibScalarInstance(snmpOutBadValues.name, (0,), snmpOutBadValues.syntax.clone(0)) __snmpOutGenErrs = MibScalarInstance(snmpOutGenErrs.name, (0,), snmpOutGenErrs.syntax.clone(0)) __snmpOutSetRequests = MibScalarInstance(snmpOutSetRequests.name, (0,), snmpOutSetRequests.syntax.clone(0)) __snmpOutGetResponses = MibScalarInstance(snmpOutGetResponses.name, (0,), snmpOutGetResponses.syntax.clone(0)) __snmpOutTraps = MibScalarInstance(snmpOutTraps.name, (0,), snmpOutTraps.syntax.clone(0)) __snmpEnableAuthenTraps = MibScalarInstance(snmpEnableAuthenTraps.name, (0,), snmpEnableAuthenTraps.syntax.clone(1)) __snmpSilentDrops = MibScalarInstance(snmpSilentDrops.name, (0,), snmpSilentDrops.syntax.clone(0)) __snmpProxyDrops = MibScalarInstance(snmpProxyDrops.name, (0,), snmpProxyDrops.syntax.clone(0)) __snmpTrapOID = MibScalarInstance(snmpTrapOID.name, (0,), snmpTrapOID.syntax.clone(coldStart.name)) __snmpSetSerialNo = MibScalarInstance(snmpSetSerialNo.name, (0,), snmpSetSerialNo.syntax.clone(0)) mibBuilder.exportSymbols( "__SNMPv2-MIB", sysDescr = __sysDescr, sysObjectID = __sysObjectID, sysUpTime = __sysUpTime, sysContact = __sysContact, sysName = __sysName, sysLocation = __sysLocation, sysServices = __sysServices, sysORLastChange = __sysORLastChange, snmpInPkts = __snmpInPkts, snmpOutPkts = __snmpOutPkts, snmpInBadVersions = __snmpInBadVersions, snmpInBadCommunityNames = __snmpInBadCommunityNames, snmpInBadCommunityUses = __snmpInBadCommunityUses, snmpInASNParseErrs = __snmpInASNParseErrs, snmpInTooBigs = __snmpInTooBigs, snmpInNoSuchNames = __snmpInNoSuchNames, snmpInBadValues = __snmpInBadValues, snmpInReadOnlys = __snmpInReadOnlys, snmpInGenErrs = __snmpInGenErrs, snmpInTotalReqVars = __snmpInTotalReqVars, snmpInTotalSetVars = __snmpInTotalSetVars, snmpInGetRequests = __snmpInGetRequests, snmpInGetNexts = __snmpInGetNexts, snmpInSetRequests = __snmpInSetRequests, snmpInGetResponses = __snmpInGetResponses, snmpInTraps = __snmpInTraps, snmpOutTooBigs = __snmpOutTooBigs, snmpOutNoSuchNames = __snmpOutNoSuchNames, snmpOutBadValues = __snmpOutBadValues, snmpOutGenErrs = __snmpOutGenErrs, snmpOutSetRequests = __snmpOutSetRequests, snmpOutGetResponses = __snmpOutGetResponses, snmpOutTraps = __snmpOutTraps, snmpEnableAuthenTraps = __snmpEnableAuthenTraps, snmpSilentDrops = __snmpSilentDrops, snmpProxyDrops = __snmpProxyDrops, snmpTrapOID = __snmpTrapOID, snmpSetSerialNo = __snmpSetSerialNo ) PKR Ø4|bÆff5pysnmp/smi/mibs/instances/__SNMP-USER-BASED-SM-MIB.py( MibScalarInstance, ) = mibBuilder.importSymbols( 'SNMPv2-SMI', 'MibScalarInstance' ) ( usmStatsUnsupportedSecLevels, usmStatsNotInTimeWindows, usmStatsUnknownUserNames, usmStatsUnknownEngineIDs, usmStatsWrongDigests, usmStatsDecryptionErrors, usmUserSpinLock ) = mibBuilder.importSymbols( 'SNMP-USER-BASED-SM-MIB', 'usmStatsUnsupportedSecLevels', 'usmStatsNotInTimeWindows', 'usmStatsUnknownUserNames', 'usmStatsUnknownEngineIDs', 'usmStatsWrongDigests', 'usmStatsDecryptionErrors', 'usmUserSpinLock' ) __usmStatsUnsupportedSecLevels = MibScalarInstance(usmStatsUnsupportedSecLevels.name, (0,), usmStatsUnsupportedSecLevels.syntax.clone(0)) __usmStatsNotInTimeWindows = MibScalarInstance(usmStatsNotInTimeWindows.name, (0,), usmStatsNotInTimeWindows.syntax.clone(0)) __usmStatsUnknownUserNames = MibScalarInstance(usmStatsUnknownUserNames.name, (0,), usmStatsUnknownUserNames.syntax.clone(0)) __usmStatsUnknownEngineIDs = MibScalarInstance(usmStatsUnknownEngineIDs.name, (0,), usmStatsUnknownEngineIDs.syntax.clone(0)) __usmStatsWrongDigests = MibScalarInstance(usmStatsWrongDigests.name, (0,), usmStatsWrongDigests.syntax.clone(0)) __usmStatsDecryptionErrors = MibScalarInstance(usmStatsDecryptionErrors.name, (0,), usmStatsDecryptionErrors.syntax.clone(0)) __usmUserSpinLock = MibScalarInstance(usmUserSpinLock.name, (0,), usmUserSpinLock.syntax.clone(0)) mibBuilder.exportSymbols( '__SNMP-USER-BASED-SM-MIB', usmStatsUnsupportedSecLevels = __usmStatsUnsupportedSecLevels, usmStatsNotInTimeWindows = __usmStatsNotInTimeWindows, usmStatsUnknownUserNames = __usmStatsUnknownUserNames, usmStatsUnknownEngineIDs = __usmStatsUnknownEngineIDs, usmStatsWrongDigests = __usmStatsWrongDigests, usmStatsDecryptionErrors = __usmStatsDecryptionErrors, usmUserSpinLock = __usmUserSpinLock ) PK†£=-C÷ÇÇ,pysnmp/smi/mibs/instances/__SNMP-MPD-MIB.pyc;ò ­ZœDc@sÅeiddƒ\Zeiddddƒ\ZZZeeidfeiidƒƒZ eeidfeiidƒƒZ eeidfeiidƒƒZ ei dde de de ƒdS( s SNMPv2-SMIsMibScalarInstances SNMP-MPD-MIBssnmpUnknownSecurityModelsssnmpInvalidMsgsssnmpUnknownPDUHandlersis__SNMP-MPD-MIBN( s mibBuilders importSymbolssMibScalarInstancessnmpUnknownSecurityModelsssnmpInvalidMsgsssnmpUnknownPDUHandlerssnamessyntaxsclones__snmpUnknownSecurityModelss__snmpInvalidMsgss__snmpUnknownPDUHandlerss exportSymbols(ssnmpUnknownSecurityModelss__snmpInvalidMsgssMibScalarInstances__snmpUnknownSecurityModelsssnmpInvalidMsgsssnmpUnknownPDUHandlerss__snmpUnknownPDUHandlers((sFbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/instances/__SNMP-MPD-MIB.pys?s   $$$ PKR Ø4ÐæCwjj+pysnmp/smi/mibs/instances/__SNMP-MPD-MIB.py( MibScalarInstance, ) = mibBuilder.importSymbols( 'SNMPv2-SMI', 'MibScalarInstance' ) ( snmpUnknownSecurityModels, snmpInvalidMsgs, snmpUnknownPDUHandlers ) = mibBuilder.importSymbols( 'SNMP-MPD-MIB', 'snmpUnknownSecurityModels', 'snmpInvalidMsgs', 'snmpUnknownPDUHandlers', ) __snmpUnknownSecurityModels = MibScalarInstance(snmpUnknownSecurityModels.name, (0,), snmpUnknownSecurityModels.syntax.clone(0)) __snmpInvalidMsgs = MibScalarInstance(snmpInvalidMsgs.name, (0,), snmpInvalidMsgs.syntax.clone(0)) __snmpUnknownPDUHandlers = MibScalarInstance(snmpUnknownPDUHandlers.name, (0,), snmpUnknownPDUHandlers.syntax.clone(0)) mibBuilder.exportSymbols( '__SNMP-MPD-MIB', snmpUnknownSecurityModels = __snmpUnknownSecurityModels, snmpInvalidMsgs = __snmpInvalidMsgs, snmpUnknownPDUHandlers = __snmpUnknownPDUHandlers ) PK†£=¡á‹6ëë.pysnmp/smi/mibs/instances/__PYSNMP-USM-MIB.pyc;ò ­ZœDc@sƒeiddƒ\Zeidddƒ\ZZeeidfeiƒZeeidfeiƒZei ddedeƒdS(s SNMPv2-SMIsMibScalarInstancesPYSNMP-USM-MIBspysnmpUsmDiscoverablespysnmpUsmDiscoveryis__PYSNMP-USM-MIBN( s mibBuilders importSymbolssMibScalarInstancespysnmpUsmDiscoverablespysnmpUsmDiscoverysnamessyntaxs__pysnmpUsmDiscoverables__pysnmpUsmDiscoverys exportSymbols(spysnmpUsmDiscoverys__pysnmpUsmDiscoverys__pysnmpUsmDiscoverablesMibScalarInstancespysnmpUsmDiscoverable((sHbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/instances/__PYSNMP-USM-MIB.pys?s    PKd[3%pysnmp/smi/mibs/instances/__init__.pyPK†£=Ö ¨86pysnmp/smi/mibs/instances/__SNMP-USER-BASED-SM-MIB.pyc;ò ­ZœDc@s…eiddƒ\Zeidddddddd ƒ\ZZZZZZZ eei d fei i d ƒƒZ eei d fei i d ƒƒZeei d fei i d ƒƒZeei d fei i d ƒƒZeei d fei i d ƒƒZeei d fei i d ƒƒZee i d fe i i d ƒƒZeid de dededededed eƒd S( s SNMPv2-SMIsMibScalarInstancesSNMP-USER-BASED-SM-MIBsusmStatsUnsupportedSecLevelssusmStatsNotInTimeWindowssusmStatsUnknownUserNamessusmStatsUnknownEngineIDssusmStatsWrongDigestssusmStatsDecryptionErrorssusmUserSpinLockis__SNMP-USER-BASED-SM-MIBN(s mibBuilders importSymbolssMibScalarInstancesusmStatsUnsupportedSecLevelssusmStatsNotInTimeWindowssusmStatsUnknownUserNamessusmStatsUnknownEngineIDssusmStatsWrongDigestssusmStatsDecryptionErrorssusmUserSpinLocksnamessyntaxsclones__usmStatsUnsupportedSecLevelss__usmStatsNotInTimeWindowss__usmStatsUnknownUserNamess__usmStatsUnknownEngineIDss__usmStatsWrongDigestss__usmStatsDecryptionErrorss__usmUserSpinLocks exportSymbols(susmStatsUnknownEngineIDssusmStatsNotInTimeWindowssusmStatsUnknownUserNamess__usmStatsUnknownEngineIDss__usmStatsNotInTimeWindowssusmStatsUnsupportedSecLevelssusmStatsDecryptionErrorss__usmStatsWrongDigestssusmUserSpinLocks__usmStatsUnsupportedSecLevelssMibScalarInstances__usmStatsDecryptionErrorss__usmUserSpinLocksusmStatsWrongDigestss__usmStatsUnknownUserNames((sPbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/instances/__SNMP-USER-BASED-SM-MIB.pys?s0   $$$$$$$ PK†£=°¨Ø_II7pysnmp/smi/mibs/instances/__SNMP-VIEW-BASED-ACM-MIB.pyc;ò ­ZœDc@s\eiddƒ\Zeiddƒ\ZeeidfeiƒZeiddeƒdS(s SNMPv2-SMIsMibScalarInstancesSNMP-VIEW-BASED-ACM-MIBsvacmViewSpinLockis__SNMP-VIEW-BASED-ACM-MIBN(s mibBuilders importSymbolssMibScalarInstancesvacmViewSpinLocksnamessyntaxs__vacmViewSpinLocks exportSymbols(svacmViewSpinLocksMibScalarInstances__vacmViewSpinLock((sQbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/instances/__SNMP-VIEW-BASED-ACM-MIB.pys?s     PK†£=̇;mm2pysnmp/smi/mibs/instances/__SNMP-FRAMEWORK-MIB.pyc;ò XÁÒEc @sdkZeiddƒ\Zeidddddƒ\ZZZZeeidfei ƒZ eeidfei i d ƒƒZ eeidfei i e eiƒƒƒƒZeeidfei i d ƒƒZeid de de dedeƒdS( Ns SNMPv2-SMIsMibScalarInstancesSNMP-FRAMEWORK-MIBs snmpEngineIDssnmpEngineBootsssnmpEngineTimessnmpEngineMaxMessageSizeiiis__SNMP-FRAMEWORK-MIB(stimes mibBuilders importSymbolssMibScalarInstances snmpEngineIDssnmpEngineBootsssnmpEngineTimessnmpEngineMaxMessageSizesnamessyntaxs__snmpEngineIDsclones__snmpEngineBootssints__snmpEngineTimes__snmpEngineMaxMessageSizes exportSymbols( ssnmpEngineMaxMessageSizessnmpEngineTimes__snmpEngineBootss snmpEngineIDssnmpEngineBootssMibScalarInstances__snmpEngineIDstimes__snmpEngineMaxMessageSizes__snmpEngineTime((sLbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/instances/__SNMP-FRAMEWORK-MIB.pys?s    $0$ PKjWN6,Ë~€îî1pysnmp/smi/mibs/instances/__SNMP-FRAMEWORK-MIB.pyimport time ( MibScalarInstance, ) = mibBuilder.importSymbols( 'SNMPv2-SMI', 'MibScalarInstance' ) ( snmpEngineID, snmpEngineBoots, snmpEngineTime, snmpEngineMaxMessageSize ) = mibBuilder.importSymbols( 'SNMP-FRAMEWORK-MIB', 'snmpEngineID', 'snmpEngineBoots', 'snmpEngineTime', 'snmpEngineMaxMessageSize' ) __snmpEngineID = MibScalarInstance(snmpEngineID.name, (0,), snmpEngineID.syntax) __snmpEngineBoots = MibScalarInstance(snmpEngineBoots.name, (0,), snmpEngineBoots.syntax.clone(1)) __snmpEngineTime = MibScalarInstance(snmpEngineTime.name, (0,), snmpEngineTime.syntax.clone(int(time.time()))) __snmpEngineMaxMessageSize = MibScalarInstance(snmpEngineMaxMessageSize.name, (0,), snmpEngineMaxMessageSize.syntax.clone(4096)) mibBuilder.exportSymbols( '__SNMP-FRAMEWORK-MIB', snmpEngineID = __snmpEngineID, snmpEngineBoots = __snmpEngineBoots, snmpEngineTime = __snmpEngineTime, snmpEngineMaxMessageSize = __snmpEngineMaxMessageSize ) PKR Ø4e9ưƒƒ.pysnmp/smi/mibs/instances/__SNMP-TARGET-MIB.py( MibScalarInstance, ) = mibBuilder.importSymbols( 'SNMPv2-SMI', 'MibScalarInstance' ) ( snmpTargetSpinLock, snmpUnavailableContexts, snmpUnknownContexts ) = mibBuilder.importSymbols( 'SNMP-TARGET-MIB', 'snmpTargetSpinLock', 'snmpUnavailableContexts', 'snmpUnknownContexts' ) __snmpTargetSpinLock = MibScalarInstance(snmpTargetSpinLock.name, (0,), snmpTargetSpinLock.syntax.clone(0)) __snmpUnavailableContexts = MibScalarInstance(snmpUnavailableContexts.name, (0,), snmpUnavailableContexts.syntax.clone(0)) __snmpUnknownContexts = MibScalarInstance(snmpUnknownContexts.name, (0,), snmpUnknownContexts.syntax.clone(0)) mibBuilder.exportSymbols( '__SNMP-TARGET-MIB', snmpTargetSpinLock = __snmpTargetSpinLock, snmpUnavailableContexts = __snmpUnavailableContexts, snmpUnknownContexts = __snmpUnknownContexts ) PKR Ø4M›6nn-pysnmp/smi/mibs/instances/__PYSNMP-USM-MIB.py( MibScalarInstance, ) = mibBuilder.importSymbols( 'SNMPv2-SMI', 'MibScalarInstance' ) ( pysnmpUsmDiscoverable, pysnmpUsmDiscovery ) = mibBuilder.importSymbols( 'PYSNMP-USM-MIB', 'pysnmpUsmDiscoverable', 'pysnmpUsmDiscovery' ) __pysnmpUsmDiscoverable = MibScalarInstance(pysnmpUsmDiscoverable.name, (0,), pysnmpUsmDiscoverable.syntax) __pysnmpUsmDiscovery = MibScalarInstance(pysnmpUsmDiscovery.name, (0,), pysnmpUsmDiscovery.syntax) mibBuilder.exportSymbols( "__PYSNMP-USM-MIB", pysnmpUsmDiscoverable = __pysnmpUsmDiscoverable, pysnmpUsmDiscovery = __pysnmpUsmDiscovery ) PKR Ø4§)…^œœ6pysnmp/smi/mibs/instances/__SNMP-VIEW-BASED-ACM-MIB.py( MibScalarInstance, ) = mibBuilder.importSymbols( 'SNMPv2-SMI', 'MibScalarInstance' ) ( vacmViewSpinLock, ) = mibBuilder.importSymbols( 'SNMP-VIEW-BASED-ACM-MIB', 'vacmViewSpinLock' ) __vacmViewSpinLock = MibScalarInstance(vacmViewSpinLock.name, (0,), vacmViewSpinLock.syntax) mibBuilder.exportSymbols( "__SNMP-VIEW-BASED-ACM-MIB", vacmViewSpinLock = __vacmViewSpinLock ) PK†£=÷ DYçç*pysnmp/smi/mibs/instances/__SNMPv2-MIB.pyc;ò ö IcN@sºdklZdklZdklZeidddƒ\ZZeidddd d d d d ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-ƒ(\'Z Z Z Z Z ZZZZZZZZZZZZZZZZZZZ Z!Z"Z#Z$Z%Z&Z'Z(Z)Z*Z+Z,Z-Z.Z/ee i0d.fe i1i2d/eefƒƒZ3ee i0d.fe i1i2d0d1d2d0d3d0d4fƒƒZ4d5efd6„ƒYZ5ee i0d.fe5d.ƒƒZ6ee i0d.fe i1i2d7ƒƒZ7ee i0d.fe i1i2d7ƒƒZ8eei0d.fei1i2d7ƒƒZ9eei0d.fei1i2d.ƒƒZ:eei0d.fei1i2d.ƒƒZ;eei0d.fei1i2d.ƒƒZ<eei0d.fei1i2d.ƒƒZ=eei0d.fei1i2d.ƒƒZ>eei0d.fei1i2d.ƒƒZ?eei0d.fei1i2d.ƒƒZ@eei0d.fei1i2d.ƒƒZAeei0d.fei1i2d.ƒƒZBeei0d.fei1i2d.ƒƒZCeei0d.fei1i2d.ƒƒZDeei0d.fei1i2d.ƒƒZEeei0d.fei1i2d.ƒƒZFeei0d.fei1i2d.ƒƒZGeei0d.fei1i2d.ƒƒZHeei0d.fei1i2d.ƒƒZIeei0d.fei1i2d.ƒƒZJee i0d.fe i1i2d.ƒƒZKee!i0d.fe!i1i2d.ƒƒZLee"i0d.fe"i1i2d.ƒƒZMee#i0d.fe#i1i2d.ƒƒZNee$i0d.fe$i1i2d.ƒƒZOee%i0d.fe%i1i2d.ƒƒZPee&i0d.fe&i1i2d.ƒƒZQee'i0d.fe'i1i2d.ƒƒZRee(i0d.fe(i1i2d.ƒƒZSee)i0d.fe)i1i2d.ƒƒZTee*i0d.fe*i1i2d0ƒƒZUee+i0d.fe+i1i2d.ƒƒZVee,i0d.fe,i1i2d.ƒƒZWee-i0d.fe-i1i2e.i0ƒƒZXee/i0d.fe/i1i2d.ƒƒZYeiZd8de3de4d e6d e7d e8d e9d e:de;de<de=de>de?de@deAdeBdeCdeDdeEdeFdeGdeHdeIdeJdeKdeLd eMd!eNd"eOd#ePd$eQd%eRd&eSd'eTd(eUd)eVd*eWd+eXd-eYƒ&d9S(:(sversion(stime(smajorVersionIds SNMPv2-SMIsMibScalarInstances TimeTickss SNMPv2-MIBssysDescrs sysObjectIDs sysUpTimes sysContactssysNames sysLocations sysServicesssysORLastChanges snmpInPktss snmpOutPktsssnmpInBadVersionsssnmpInBadCommunityNamesssnmpInBadCommunityUsesssnmpInASNParseErrss snmpInTooBigsssnmpInNoSuchNamesssnmpInBadValuesssnmpInReadOnlyss snmpInGenErrsssnmpInTotalReqVarsssnmpInTotalSetVarsssnmpInGetRequestsssnmpInGetNextsssnmpInSetRequestsssnmpInGetResponsess snmpInTrapsssnmpOutTooBigsssnmpOutNoSuchNamesssnmpOutBadValuesssnmpOutGenErrsssnmpOutSetRequestsssnmpOutGetResponsess snmpOutTrapsssnmpEnableAuthenTrapsssnmpSilentDropsssnmpProxyDropss snmpTrapOIDs coldStartssnmpSetSerialNois#PySNMP engine version %s, Python %siiiii¸Os SysUpTimecBstZeƒZd„ZRS(NcKsR|idƒtjo"ttƒ|idƒ|d|i|d|i|<|i|djo|i|=ndS(Nii(sselfs"_AbstractTransportDispatcher__jobssjobId(sselfsjobId((s1build/bdist.linux-i686/egg/pysnmp/carrier/base.pys jobFinishedcscCs|iodSndSdS(Nii(sselfs"_AbstractTransportDispatcher__jobs(sself((s1build/bdist.linux-i686/egg/pysnmp/carrier/base.pysjobsArePendinghs f0.0cCstidƒ‚dS(NsMethod not implemented(serrors CarrierError(sselfstimeout((s1build/bdist.linux-i686/egg/pysnmp/carrier/base.pys runDispatchernscCsPx5|iiƒD]$}|i|iƒ|i|ƒqW|iƒ|iƒdS(N(sselfs(_AbstractTransportDispatcher__transportsskeysstDomainscloseTransportsunregisterTransportsunregisterRecvCbFunsunregisterTimerCbFun(sselfstDomain((s1build/bdist.linux-i686/egg/pysnmp/carrier/base.pyscloseDispatcherqs  (s__name__s __module__s__init__s_cbFunsregisterRecvCbFunsunregisterRecvCbFunsregisterTimerCbFunsNonesunregisterTimerCbFunsregisterTransportsunregisterTransports getTransports sendMessageshandleTimerTicks jobStarteds jobFinishedsjobsArePendings runDispatcherscloseDispatcher(((s1build/bdist.linux-i686/egg/pysnmp/carrier/base.pysAbstractTransportDispatchers               N(s__doc__spysnmp.carrierserrors TimerCallablesAbstractTransportDispatcher(s TimerCallablesAbstractTransportDispatcherserror((s1build/bdist.linux-i686/egg/pysnmp/carrier/base.pys?s PKoÎ2ºÊ´FFpysnmp/carrier/error.pyfrom pysnmp import error class CarrierError(error.PySnmpError): pass PK†£=;…e……pysnmp/carrier/__init__.pyc;ò n¨®Bc@sdS(N((((s5build/bdist.linux-i686/egg/pysnmp/carrier/__init__.pys?sPKÀ†”build/bdist.linux-i686/egg/pysnmp/carrier/asynsock/__init__.pys?sPK7¹A<‘vŠ pysnmp/carrier/asynsock/base.py"""Defines standard API to asyncore-based transport""" try: from sys import version_info except ImportError: version_info = ( 0, 0 ) # a really early version import socket, sys import asyncore from pysnmp.carrier import error class AbstractSocketTransport(asyncore.dispatcher): sockFamily = sockType = None retryCount = 0; retryInterval = 0 def __init__(self, sock=None, sockMap=None): if sock is None: if self.sockFamily is None: raise error.CarrierError( 'Address family %s not supported' % self.__class__.__name__ ) if self.sockType is None: raise error.CarrierError( 'Socket type %s not supported' % self.__class__.__name__ ) try: sock = socket.socket(self.sockFamily, self.sockType) except socket.error, why: raise error.CarrierError('socket() failed: %s' % why) if sockMap is None: # The socket map is managed by the AsynsockDispatcher on # which this transport is registered, so this is a fake # socket map to avoid registering with deafult asyncore map. sockMap = {} # Old asyncore doesn't allow socket_map param in constructor if version_info < (2, 0): # Taken from dispatcher.__init__() self.socket = sock self.add_channel(sockMap) self.socket.setblocking(0) self.connected = 1 else: asyncore.dispatcher.__init__(self, sock, sockMap) # Old asyncore doesn't allow socket_map param if version_info < (2, 0): def add_channel (self, sockMap=None): if sockMap is None: sockMap = asyncore.socket_map sockMap[self] = self def del_channel (self, sockMap=None): if sockMap is None: sockMap = asyncore.socket_map if sockMap.has_key(self): del sockMap[self] def registerSocket(self, sockMap=None): self.add_channel(sockMap) def unregisterSocket(self, sockMap=None): self.del_channel(sockMap) # Public API def openClientMode(self, iface=None): raise error.CarrierError('Method not implemented') def openServerMode(self, iface=None): raise error.CarrierError('Method not implemented') def sendMessage(self, outgoingMessage, transportAddress): raise error.CarrierError('Method not implemented') def registerCbFun(self, cbFun): self._cbFun = cbFun def unregisterCbFun(self): self._cbFun = None def closeTransport(self): self.unregisterCbFun() self.close() # asyncore API def handle_close(self): raise error.CarrierError( 'Transport unexpectedly closed' ) def handle_error(self): raise PK{”<Ñl\#ææ#pysnmp/carrier/asynsock/dispatch.pytry: from sys import version_info except ImportError: version_info = ( 0, 0 ) # a really early version from time import time from select import select from asyncore import socket_map from pysnmp.carrier.base import AbstractTransportDispatcher # Old asyncore doesn't allow socket_map param at poll if version_info < (2, 0): def poll(timeout, socket_map): if not socket_map: return sockets = socket_map.keys() r = filter(lambda x: x.readable(), sockets) w = filter(lambda x: x.writable(), sockets) (r,w,e) = select(r, w, [], timeout) for x in r: try: x.handle_read_event() except: x.handle_error() for x in w: try: x.handle_write_event() except: x.handle_error() else: from asyncore import poll class AsynsockDispatcher(AbstractTransportDispatcher): """Implements I/O over asynchronous sockets""" def __init__(self): self.__sockMap = {} # use own map for MT safety self.timeout = 0.5 AbstractTransportDispatcher.__init__(self) def getSocketMap(self): return self.__sockMap def setSocketMap(self, sockMap=socket_map): self.__sockMap = sockMap def registerTransport(self, tDomain, t): AbstractTransportDispatcher.registerTransport(self, tDomain, t) t.registerSocket(self.__sockMap) def unregisterTransport(self, tDomain): self.getTransport(tDomain).unregisterSocket(self.__sockMap) AbstractTransportDispatcher.unregisterTransport(self, tDomain) def transportsAreWorking(self): for transport in self.__sockMap.values(): if transport.writable(): return 1 return 0 def runDispatcher(self, timeout=0.0): while self.jobsArePending() or self.transportsAreWorking(): poll(timeout and timeout or self.timeout, self.__sockMap) self.handleTimerTick(time()) PK†£=Ôü=$pysnmp/carrier/asynsock/dispatch.pyc;ò ÂÍKc@s®ydklZWnej oddfZnXdklZdklZdklZdklZeddfjo d„Z ndkl Z d efd „ƒYZ d S( (s version_infoi(stime(sselect(s socket_map(sAbstractTransportDispatchericCsÈ| odSn|iƒ}td„|ƒ}td„|ƒ}t||g|ƒ\}}}x0|D](}y|i ƒWqe|i ƒqeXqeWx0|D](}y|i ƒWq˜|i ƒq˜Xq˜WdS(NcCs |iƒS(N(sxsreadable(sx((s>build/bdist.linux-i686/egg/pysnmp/carrier/asynsock/dispatch.pysscCs |iƒS(N(sxswritable(sx((s>build/bdist.linux-i686/egg/pysnmp/carrier/asynsock/dispatch.pyss( s socket_mapskeysssocketssfiltersrswsselectstimeoutsesxshandle_read_events handle_errorshandle_write_event(stimeouts socket_mapsesrswsxssockets((s>build/bdist.linux-i686/egg/pysnmp/carrier/asynsock/dispatch.pyspoll s$ (spollsAsynsockDispatchercBsStZdZd„Zd„Zed„Zd„Zd„Zd„Z dd„Z RS( s(Implements I/O over asynchronous socketscCs#h|_d|_ti|ƒdS(Nf0.5(sselfs_AsynsockDispatcher__sockMapstimeoutsAbstractTransportDispatchers__init__(sself((s>build/bdist.linux-i686/egg/pysnmp/carrier/asynsock/dispatch.pys__init__$s  cCs |iSdS(N(sselfs_AsynsockDispatcher__sockMap(sself((s>build/bdist.linux-i686/egg/pysnmp/carrier/asynsock/dispatch.pys getSocketMap)scCs ||_dS(N(ssockMapsselfs_AsynsockDispatcher__sockMap(sselfssockMap((s>build/bdist.linux-i686/egg/pysnmp/carrier/asynsock/dispatch.pys setSocketMap*scCs'ti|||ƒ|i|iƒdS(N(sAbstractTransportDispatchersregisterTransportsselfstDomainstsregisterSockets_AsynsockDispatcher__sockMap(sselfstDomainst((s>build/bdist.linux-i686/egg/pysnmp/carrier/asynsock/dispatch.pysregisterTransport,scCs-|i|ƒi|iƒti||ƒdS(N(sselfs getTransportstDomainsunregisterSockets_AsynsockDispatcher__sockMapsAbstractTransportDispatchersunregisterTransport(sselfstDomain((s>build/bdist.linux-i686/egg/pysnmp/carrier/asynsock/dispatch.pysunregisterTransport0scCs7x,|iiƒD]}|iƒodSqqWdSdS(Nii(sselfs_AsynsockDispatcher__sockMapsvaluess transportswritable(sselfs transport((s>build/bdist.linux-i686/egg/pysnmp/carrier/asynsock/dispatch.pystransportsAreWorking4s   f0.0cCsWxP|iƒp |iƒo5t|o|p|i|iƒ|itƒƒqWdS(N(sselfsjobsArePendingstransportsAreWorkingspollstimeouts_AsynsockDispatcher__sockMapshandleTimerTickstime(sselfstimeout((s>build/bdist.linux-i686/egg/pysnmp/carrier/asynsock/dispatch.pys runDispatcher:s!( s__name__s __module__s__doc__s__init__s getSocketMaps socket_maps setSocketMapsregisterTransportsunregisterTransportstransportsAreWorkings runDispatcher(((s>build/bdist.linux-i686/egg/pysnmp/carrier/asynsock/dispatch.pysAsynsockDispatcher"s       N( ssyss version_infos ImportErrorstimesselectsasyncores socket_mapspysnmp.carrier.basesAbstractTransportDispatcherspollsAsynsockDispatcher(s version_infosselectstimesAsynsockDispatcherspollsAbstractTransportDispatchers socket_map((s>build/bdist.linux-i686/egg/pysnmp/carrier/asynsock/dispatch.pys?s      PK÷©-< „޾ii%pysnmp/carrier/asynsock/dgram/udp6.py"""Implements asyncore-based UDP6 transport domain""" try: from socket import AF_INET6 except: AF_INET6 = None from pysnmp.carrier.asynsock.dgram.base import DgramSocketTransport domainName = snmpUDP6Domain = (1, 3, 6, 1, 2, 1, 100, 1, 2) class Udp6SocketTransport(DgramSocketTransport): sockFamily = AF_INET6 Udp6Transport = Udp6SocketTransport PK,¤²:V,,>>%pysnmp/carrier/asynsock/dgram/unix.py"""Implements asyncore-based UNIX transport domain""" from os import remove from socket import AF_UNIX from pysnmp.carrier.asynsock.dgram.base import DgramSocketTransport domainName = snmpLocalDomain = (1, 3, 6, 1, 2, 1, 100, 1, 13) class UnixSocketTransport(DgramSocketTransport): sockFamily = AF_UNIX def closeTransport(self): DgramSocketTransport.closeTransport(self) try: remove(self._iface) except: pass UnixTransport = UnixSocketTransport # Compatibility stub UnixDgramSocketTransport = UnixSocketTransport PK®Šl1)pysnmp/carrier/asynsock/dgram/__init__.pyPK†£=nH,”ÒÒ&pysnmp/carrier/asynsock/dgram/base.pyc;ò †ŒLKc@sÎdZdkZdkZdklZdklZdklZhei d<ei d<ei d<ei d<ei d<eid # Author: Filippo Giunchedi # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License Version 2 # as published by the Free Software Foundation # # Description: twisted DatagramProtocol UDP transport # class AbstractTwistedTransport: """Base Twisted Transport, to be used with TwistedDispatcher""" def __init__(self): self._writeQ = [] # AbstractTwistedTransport API def registerCbFun(self, cbFun): self._cbFun = cbFun def unregisterCbFun(self): self._cbFun = None def closeTransport(self): self.unregisterCbFun() PKâ¾ÿ:»Å¾¯çç"pysnmp/carrier/twisted/dispatch.py# # Copyright (C) 2008 Truelite Srl # Author: Filippo Giunchedi # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License Version 2 # as published by the Free Software Foundation # # Description: Transport dispatcher based on twisted.internet.reactor # from time import time from twisted.internet import reactor, task from pysnmp.carrier.base import AbstractTransportDispatcher from pysnmp.carrier import error class TwistedDispatcher(AbstractTransportDispatcher): """TransportDispatcher based on twisted.internet.reactor""" def __init__(self, *args, **kwargs): AbstractTransportDispatcher.__init__(self) self.__transportCount = 0 self.timeout = kwargs.get('timeout', 1.0) self.loopingcall = task.LoopingCall(self.handleTimeout) def handleTimeout(self): self.handleTimerTick(time()) def runDispatcher(self, timeout=0.0): if not reactor.running: try: reactor.run() except Exception, why: raise error.CarrierError(why) # jobstarted/jobfinished might be okay as-is def registerTransport(self, tDomain, transport): if not self.loopingcall.running and self.timeout > 0: self.loopingcall.start(self.timeout, now = False) AbstractTransportDispatcher.registerTransport( self, tDomain, transport ) self.__transportCount = self.__transportCount + 1 def unregisterTransport(self, tDomain): t = AbstractTransportDispatcher.getTransport(self, tDomain) if t is not None: AbstractTransportDispatcher.unregisterTransport(self, tDomain) t.closeTransport() self.__transportCount = self.__transportCount - 1 # The last transport has been removed, stop the timeout if self.__transportCount > 0 and self.loopingcall.running: self.loopingcall.stop() PK†£=e''ÏÍ Í #pysnmp/carrier/twisted/dispatch.pyc;ò LsJc@sTdklZdklZlZdklZdklZdefd„ƒYZdS((stime(sreactorstask(sAbstractTransportDispatcher(serrorsTwistedDispatchercBs>tZdZd„Zd„Zdd„Zd„Zd„ZRS(s5TransportDispatcher based on twisted.internet.reactorcOsDti|ƒd|_|iddƒ|_ti|i ƒ|_ dS(Nistimeoutf1.0( sAbstractTransportDispatchers__init__sselfs"_TwistedDispatcher__transportCountskwargssgetstimeoutstasks LoopingCalls handleTimeouts loopingcall(sselfsargsskwargs((s=build/bdist.linux-i686/egg/pysnmp/carrier/twisted/dispatch.pys__init__s  cCs|itƒƒdS(N(sselfshandleTimerTickstime(sself((s=build/bdist.linux-i686/egg/pysnmp/carrier/twisted/dispatch.pys handleTimeoutsf0.0cCsHti o9ytiƒWqDtj o}ti|ƒ‚qDXndS(N(sreactorsrunningsruns Exceptionswhyserrors CarrierError(sselfstimeoutswhy((s=build/bdist.linux-i686/egg/pysnmp/carrier/twisted/dispatch.pys runDispatchers  cCsb|ii o |idjo|ii|idtƒnti|||ƒ|i d|_ dS(Nisnowi( sselfs loopingcallsrunningstimeoutsstartsFalsesAbstractTransportDispatchersregisterTransportstDomains transports"_TwistedDispatcher__transportCount(sselfstDomains transport((s=build/bdist.linux-i686/egg/pysnmp/carrier/twisted/dispatch.pysregisterTransport$scCsti||ƒ}|tj o.ti||ƒ|iƒ|id|_n|idjo |i i o|i i ƒndS(Nii( sAbstractTransportDispatchers getTransportsselfstDomainstsNonesunregisterTransportscloseTransports"_TwistedDispatcher__transportCounts loopingcallsrunningsstop(sselfstDomainst((s=build/bdist.linux-i686/egg/pysnmp/carrier/twisted/dispatch.pysunregisterTransport,s  (s__name__s __module__s__doc__s__init__s handleTimeouts runDispatchersregisterTransportsunregisterTransport(((s=build/bdist.linux-i686/egg/pysnmp/carrier/twisted/dispatch.pysTwistedDispatchers    N( stimestwisted.internetsreactorstaskspysnmp.carrier.basesAbstractTransportDispatcherspysnmp.carrierserrorsTwistedDispatcher(stasksreactorstimesTwistedDispatcherserrorsAbstractTransportDispatcher((s=build/bdist.linux-i686/egg/pysnmp/carrier/twisted/dispatch.pys? s   PKâ¾ÿ:Š ˆ°;;$pysnmp/carrier/twisted/dgram/unix.py"""Implements twisted-based UNIX domain socket transport""" from twisted.internet import reactor from pysnmp.carrier.twisted.dgram.base import DgramTwistedTransport from pysnmp.carrier import error domainName = snmpLocalDomain = (1, 3, 6, 1, 2, 1, 100, 1, 13) class UnixTwistedTransport(DgramTwistedTransport): # AbstractTwistedTransport API def openClientMode(self, iface=''): try: self._lport = reactor.connectUNIXDatagram(iface, self) except Exception, why: raise error.CarrierError(why) return self def openServerMode(self, iface=None): try: self._lport = reactor.listenUNIXDatagram(iface, self) except Exception, why: raise error.CarrierError(why) return self UnixTransport = UnixTwistedTransportPKâ¾ÿ:(pysnmp/carrier/twisted/dgram/__init__.pyPK†£=kŽÛî î %pysnmp/carrier/twisted/dgram/base.pyc;ò LsJc@sqdZdklZdklZdklZdklZdkl Z dk l Z deefd„ƒYZ d S( s0Implements twisted-based generic DGRAM transport(stime(sDatagramProtocol(sreactor(sAbstractTwistedTransport(serror(sdebugsDgramTwistedTransportcBs2tZdZd„Zd„Zd„Zd„ZRS(sBBase Twisted datagram Transport, to be used with TwistedDispatchercCsC|itjotidƒ‚ntid|i|||ƒdS(NsUnable to call cbFuni( sselfs_cbFunsNoneserrors CarrierErrorsreactors callLatersaddresssdatagram(sselfsdatagramsaddress((s?build/bdist.linux-i686/egg/pysnmp/carrier/twisted/dgram/base.pysdatagramReceivedscCs¿titi@o tidƒxš|io|iidƒ\}}titi@otid|t|ƒfƒy|i i ||ƒWq!t j o}t id|fƒ‚q!Xq!WdS(NsstartProtocol: invokedis5startProtocol: transportAddress %s outgoingMessage %ssTwisted exception: %s(sdebugsloggersflagIOsselfs_writeQspopsoutgoingMessagestransportAddresssreprs transportswrites Exceptionswhyserrors CarrierError(sselfstransportAddresssoutgoingMessageswhy((s?build/bdist.linux-i686/egg/pysnmp/carrier/twisted/dgram/base.pys startProtocols .cCs,titi@o tidƒ|iƒdS(NsstopProtocol: invoked(sdebugsloggersflagIOsselfscloseTransport(sself((s?build/bdist.linux-i686/egg/pysnmp/carrier/twisted/dgram/base.pys stopProtocol scCs»titi@o7tid|itjodpd|t|ƒfƒ|itjo|i i ||fƒnFy|ii ||ƒWn+t j o}tid|fƒ‚nXdS(Ns8startProtocol: %s transportAddress %s outgoingMessage %ssqueuingssendingsTwisted exception: %s(sdebugsloggersflagIOsselfs transportsNonestransportAddresssreprsoutgoingMessages_writeQsappendswrites Exceptionswhyserrors CarrierError(sselfsoutgoingMessagestransportAddressswhy((s?build/bdist.linux-i686/egg/pysnmp/carrier/twisted/dgram/base.pys sendMessage$sH(s__name__s __module__s__doc__sdatagramReceiveds startProtocols stopProtocols sendMessage(((s?build/bdist.linux-i686/egg/pysnmp/carrier/twisted/dgram/base.pysDgramTwistedTransport s   N( s__doc__stimestwisted.internet.protocolsDatagramProtocolstwisted.internetsreactorspysnmp.carrier.twisted.basesAbstractTwistedTransportspysnmp.carrierserrorspysnmpsdebugsDgramTwistedTransport(sreactorsDgramTwistedTransportstimesDatagramProtocolserrorsdebugsAbstractTwistedTransport((s?build/bdist.linux-i686/egg/pysnmp/carrier/twisted/dgram/base.pys?s      PKâ¾ÿ:ò±´E#pysnmp/carrier/twisted/dgram/udp.py"""Implements twisted-based UDP transport""" from twisted.internet import reactor from pysnmp.carrier.twisted.dgram.base import DgramTwistedTransport from pysnmp.carrier import error domainName = snmpUDPDomain = (1, 3, 6, 1, 6, 1, 1) class UdpTwistedTransport(DgramTwistedTransport): # AbstractTwistedTransport API def openClientMode(self, iface=''): try: self._lport = reactor.listenUDP(0, self, iface) except Exception, why: raise error.CarrierError(why) return self def openServerMode(self, iface=None): try: self._lport = reactor.listenUDP(iface[1], self, iface[0]) except Exception, why: raise error.CarrierError(why) return self UdpTransport = UdpTwistedTransportPK†£=«÷…´ÐÐ$pysnmp/carrier/twisted/dgram/udp.pyc;ò LsJc@sldZdklZdklZdklZdddddddfZZdefd„ƒYZ e Z d S( s&Implements twisted-based UDP transport(sreactor(sDgramTwistedTransport(serroriiisUdpTwistedTransportcBs tZdd„Zed„ZRS(NscCsKytid||ƒ|_Wn$tj o}ti|ƒ‚nX|SdS(Ni( sreactors listenUDPsselfsifaces_lports Exceptionswhyserrors CarrierError(sselfsifaceswhy((s>build/bdist.linux-i686/egg/pysnmp/carrier/twisted/dgram/udp.pysopenClientMode s cCsSy$ti|d||dƒ|_Wn$tj o}ti|ƒ‚nX|SdS(Nii( sreactors listenUDPsifacesselfs_lports Exceptionswhyserrors CarrierError(sselfsifaceswhy((s>build/bdist.linux-i686/egg/pysnmp/carrier/twisted/dgram/udp.pysopenServerModes $(s__name__s __module__sopenClientModesNonesopenServerMode(((s>build/bdist.linux-i686/egg/pysnmp/carrier/twisted/dgram/udp.pysUdpTwistedTransports N( s__doc__stwisted.internetsreactors!pysnmp.carrier.twisted.dgram.basesDgramTwistedTransportspysnmp.carrierserrors domainNames snmpUDPDomainsUdpTwistedTransports UdpTransport(sUdpTwistedTransports UdpTransportsreactors domainNamesDgramTwistedTransportserrors snmpUDPDomain((s>build/bdist.linux-i686/egg/pysnmp/carrier/twisted/dgram/udp.pys?s    PK†£=ØAÌÙ““)pysnmp/carrier/twisted/dgram/__init__.pyc;ò LsJc@sdS(N((((sCbuild/bdist.linux-i686/egg/pysnmp/carrier/twisted/dgram/__init__.pys?sPKâ¾ÿ:¢ ÑVV$pysnmp/carrier/twisted/dgram/base.py"""Implements twisted-based generic DGRAM transport""" from time import time from twisted.internet.protocol import DatagramProtocol from twisted.internet import reactor from pysnmp.carrier.twisted.base import AbstractTwistedTransport from pysnmp.carrier import error from pysnmp import debug class DgramTwistedTransport(DatagramProtocol, AbstractTwistedTransport): """Base Twisted datagram Transport, to be used with TwistedDispatcher""" # Twisted Datagram API def datagramReceived(self, datagram, address): if self._cbFun is None: raise error.CarrierError('Unable to call cbFun') else: # Callback fun is called through callLater() in attempt # to make Twisted timed calls work under high load. reactor.callLater(0, self._cbFun, self, address, datagram) def startProtocol(self): debug.logger & debug.flagIO and debug.logger('startProtocol: invoked') while self._writeQ: outgoingMessage, transportAddress = self._writeQ.pop(0) debug.logger & debug.flagIO and debug.logger('startProtocol: transportAddress %s outgoingMessage %s' % (transportAddress, repr(outgoingMessage))) try: self.transport.write(outgoingMessage, transportAddress) except Exception, why: raise error.CarrierError('Twisted exception: %s' % (why,)) def stopProtocol(self): debug.logger & debug.flagIO and debug.logger('stopProtocol: invoked') self.closeTransport() def sendMessage(self, outgoingMessage, transportAddress): debug.logger & debug.flagIO and debug.logger('startProtocol: %s transportAddress %s outgoingMessage %s' % ((self.transport is None and "queuing" or "sending"), transportAddress, repr(outgoingMessage))) if self.transport is None: self._writeQ.append((outgoingMessage, transportAddress)) else: try: self.transport.write(outgoingMessage, transportAddress) except Exception, why: raise error.CarrierError('Twisted exception: %s' % (why,)) PK†£=‡¦Ùxøø%pysnmp/carrier/twisted/dgram/unix.pyc;ò LsJc @srdZdklZdklZdklZddddddddd f ZZd efd „ƒYZ e Z d S( s5Implements twisted-based UNIX domain socket transport(sreactor(sDgramTwistedTransport(serroriiiiidi sUnixTwistedTransportcBs tZdd„Zed„ZRS(NscCsHyti||ƒ|_Wn$tj o}ti|ƒ‚nX|SdS(N( sreactorsconnectUNIXDatagramsifacesselfs_lports Exceptionswhyserrors CarrierError(sselfsifaceswhy((s?build/bdist.linux-i686/egg/pysnmp/carrier/twisted/dgram/unix.pysopenClientMode s cCsHyti||ƒ|_Wn$tj o}ti|ƒ‚nX|SdS(N( sreactorslistenUNIXDatagramsifacesselfs_lports Exceptionswhyserrors CarrierError(sselfsifaceswhy((s?build/bdist.linux-i686/egg/pysnmp/carrier/twisted/dgram/unix.pysopenServerModes (s__name__s __module__sopenClientModesNonesopenServerMode(((s?build/bdist.linux-i686/egg/pysnmp/carrier/twisted/dgram/unix.pysUnixTwistedTransports N( s__doc__stwisted.internetsreactors!pysnmp.carrier.twisted.dgram.basesDgramTwistedTransportspysnmp.carrierserrors domainNamessnmpLocalDomainsUnixTwistedTransports UnixTransport(sreactors domainNamesDgramTwistedTransportserrors UnixTransportssnmpLocalDomainsUnixTwistedTransport((s?build/bdist.linux-i686/egg/pysnmp/carrier/twisted/dgram/unix.pys?s    %PK9jÎ2pysnmp/entity/__init__.pyPK†£=Ï™ÚP¯¯pysnmp/entity/engine.pyc;ò ŽDöLc@s„dklZdklZlZdklZdklZl Z dk l Z dk l Z lZdklZdfd„ƒYZd S( (sMsgAndPduDispatcher(sSnmpV1MessageProcessingModelsSnmpV2cMessageProcessingModel(sSnmpV3MessageProcessingModel(sSnmpV1SecurityModelsSnmpV2cSecurityModel(sSnmpUSMSecurityModel(srfc3415svoid(serrors SnmpEnginecBs>tZeded„Zd„Zd„Zd„Zd„ZRS(NiãÿcCs‹|tjotƒ|_n ||_htitƒ<titƒ<titƒ<|_ht i t ƒ<t i t ƒ<t i t ƒ<|_ htit<tit<|_t|_|iitjotidƒ‚n|iiiiddƒ\}|ii|ƒ|_|iiiiddƒ\}|id|_|tj o7|iiiiddƒ\}|ii|ƒ|_ndS(Ns&MIB instrumentation does not yet exists__SNMP-FRAMEWORK-MIBssnmpEngineMaxMessageSizessnmpEngineBootsis snmpEngineID(s msgAndPduDspsNonesMsgAndPduDispatchersselfsSnmpV1MessageProcessingModelsmessageProcessingModelIDsSnmpV2cMessageProcessingModelsSnmpV3MessageProcessingModelsmessageProcessingSubsystemssSnmpV1SecurityModelssecurityModelIDsSnmpV2cSecurityModelsSnmpUSMSecurityModelssecurityModelssvoids accessModelIDsrfc3415saccessControlModelstransportDispatchersmibInstrumControllerserrors PySnmpErrors mibBuilders importSymbolsssnmpEngineMaxMessageSizessyntaxsclonesmaxMessageSizessnmpEngineBootss snmpEngineIDsorigSnmpEngineID(sselfs snmpEngineIDsmaxMessageSizes msgAndPduDspsorigSnmpEngineIDssnmpEngineMaxMessageSizessnmpEngineBoots((s2build/bdist.linux-i686/egg/pysnmp/entity/engine.pys__init__ s   66!  cCs|ii||||ƒdS(N(sselfs msgAndPduDspsreceiveMessagestransportDomainstransportAddressswholeMsg(sselfstransportDispatcherstransportDomainstransportAddressswholeMsg((s2build/bdist.linux-i686/egg/pysnmp/entity/engine.pys__receiveMessageCbFun5scCsk|ii||ƒx'|iiƒD]}|i||ƒq#Wx'|iiƒD]}|i||ƒqMWdS(N( sselfs msgAndPduDspsreceiveTimerTickstimeNowsmessageProcessingSubsystemssvaluess mpHandlerssecurityModelss smHandler(sselfstimeNows mpHandlers smHandler((s2build/bdist.linux-i686/egg/pysnmp/entity/engine.pys__receiveTimerTickCbFun@scCsP|itj otidƒ‚n|i|iƒ|i|iƒ||_dS(Ns'Transport dispatcher already registered( sselfstransportDispatchersNoneserrors PySnmpErrorsregisterRecvCbFuns _SnmpEngine__receiveMessageCbFunsregisterTimerCbFuns"_SnmpEngine__receiveTimerTickCbFun(sselfstransportDispatcher((s2build/bdist.linux-i686/egg/pysnmp/entity/engine.pysregisterTransportDispatcherGs cCsJ|itjotidƒ‚n|iiƒ|iiƒt|_dS(Ns#Transport dispatcher not registered(sselfstransportDispatchersNoneserrors PySnmpErrorsunregisterRecvCbFunsunregisterTimerCbFun(sself((s2build/bdist.linux-i686/egg/pysnmp/entity/engine.pysunregisterTransportDispatcherTs   (s__name__s __module__sNones__init__s _SnmpEngine__receiveMessageCbFuns"_SnmpEngine__receiveTimerTickCbFunsregisterTransportDispatchersunregisterTransportDispatcher(((s2build/bdist.linux-i686/egg/pysnmp/entity/engine.pys SnmpEngine s (  N(spysnmp.proto.rfc3412sMsgAndPduDispatcherspysnmp.proto.mpmod.rfc2576sSnmpV1MessageProcessingModelsSnmpV2cMessageProcessingModelspysnmp.proto.mpmod.rfc3412sSnmpV3MessageProcessingModelspysnmp.proto.secmod.rfc2576sSnmpV1SecurityModelsSnmpV2cSecurityModelspysnmp.proto.secmod.rfc3414sSnmpUSMSecurityModelspysnmp.proto.acmodsrfc3415svoidspysnmpserrors SnmpEngine( sSnmpV1MessageProcessingModelsSnmpV1SecurityModelsvoidserrorsSnmpV2cSecurityModels SnmpEnginesSnmpV2cMessageProcessingModelsSnmpV3MessageProcessingModelsMsgAndPduDispatchersSnmpUSMSecurityModelsrfc3415((s2build/bdist.linux-i686/egg/pysnmp/entity/engine.pys?s    PK'2=›‡ !:e:epysnmp/entity/config.py# Initial SNMP engine configuration functions. During further operation, # SNMP engine might be configured remotely (through SNMP). import string from pysnmp.carrier.asynsock import dispatch from pysnmp.carrier.asynsock.dgram import udp, udp6 try: from pysnmp.carrier.asynsock.dgram import unix snmpLocalDomain = unix.snmpLocalDomain except ImportError: # UNIX-specific -- may not be always available pass from pysnmp.proto import rfc3412 from pysnmp.proto.secmod.rfc3414 import localkey from pysnmp.entity import engine from pysnmp.proto.secmod.rfc3414.auth import hmacmd5, hmacsha, noauth from pysnmp.proto.secmod.rfc3414.priv import des, nopriv from pysnmp.proto.secmod.rfc3826.priv import aes from pysnmp.smi.error import NotWritableError from pysnmp import error # A shortcut to popular constants # Transports snmpUDPDomain = udp.snmpUDPDomain snmpUDP6Domain = udp6.snmpUDP6Domain # Auth protocol usmHMACMD5AuthProtocol = hmacmd5.HmacMd5.serviceID usmHMACSHAAuthProtocol = hmacsha.HmacSha.serviceID usmNoAuthProtocol = noauth.NoAuth.serviceID # Privacy protocol usmDESPrivProtocol = des.Des.serviceID usmAesCfb128Protocol = aes.Aes.serviceID usmNoPrivProtocol = nopriv.NoPriv.serviceID def __cookV1SystemInfo(snmpEngine, securityName): snmpEngineID, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-FRAMEWORK-MIB', 'snmpEngineID') snmpCommunityEntry, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('SNMP-COMMUNITY-MIB', 'snmpCommunityEntry') tblIdx = snmpCommunityEntry.getInstIdFromIndices(securityName) return snmpCommunityEntry, tblIdx, snmpEngineID def addV1System(snmpEngine, securityName, communityName, contextEngineId=None, contextName=None, transportTag=None): snmpCommunityEntry, tblIdx, snmpEngineID = __cookV1SystemInfo( snmpEngine, securityName ) if contextEngineId is None: contextEngineId = snmpEngineID.syntax if contextName is None: contextName = '' snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((snmpCommunityEntry.name + (8,) + tblIdx, 'destroy'),) ) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((snmpCommunityEntry.name + (8,) + tblIdx, 'createAndGo'), (snmpCommunityEntry.name + (2,) + tblIdx, communityName), (snmpCommunityEntry.name + (3,) + tblIdx, securityName), (snmpCommunityEntry.name + (4,) + tblIdx, contextEngineId), (snmpCommunityEntry.name + (5,) + tblIdx, contextName), (snmpCommunityEntry.name + (6,) + tblIdx, transportTag), (snmpCommunityEntry.name + (7,) + tblIdx, 'nonVolatile')) ) def delV1System(snmpEngine, securityName): snmpCommunityEntry, tblIdx, snmpEngineID = __cookV1SystemInfo( snmpEngine, securityName ) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((snmpCommunityEntry.name + (8,) + tblIdx, 'destroy'),) ) def __cookV3UserInfo(snmpEngine, securityName, contextEngineId): if contextEngineId is None: snmpEngineID, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-FRAMEWORK-MIB', 'snmpEngineID') snmpEngineID = snmpEngineID.syntax else: snmpEngineID = contextEngineId usmUserEntry, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('SNMP-USER-BASED-SM-MIB', 'usmUserEntry') tblIdx1 = usmUserEntry.getInstIdFromIndices( snmpEngineID, securityName ) pysnmpUsmSecretEntry, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('PYSNMP-USM-MIB', 'pysnmpUsmSecretEntry') tblIdx2 = pysnmpUsmSecretEntry.getInstIdFromIndices(securityName) return snmpEngineID, usmUserEntry, tblIdx1, pysnmpUsmSecretEntry, tblIdx2 def addV3User(snmpEngine, securityName, authProtocol=usmNoAuthProtocol, authKey=None, privProtocol=usmNoPrivProtocol, privKey=None, contextEngineId=None): ( snmpEngineID, usmUserEntry, tblIdx1, pysnmpUsmSecretEntry, tblIdx2 ) = __cookV3UserInfo( snmpEngine, securityName, contextEngineId ) # Load augmenting table before creating new row in base one pysnmpUsmKeyEntry, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('PYSNMP-USM-MIB', 'pysnmpUsmKeyEntry') # Load clone-from (may not be needed) zeroDotZero, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('SNMPv2-SMI', 'zeroDotZero') snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((usmUserEntry.name + (13,) + tblIdx1, 'destroy'),) ) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((usmUserEntry.name + (13,) + tblIdx1, 'createAndGo'), (usmUserEntry.name + (3,) + tblIdx1, securityName), (usmUserEntry.name + (4,) + tblIdx1, zeroDotZero.name), (usmUserEntry.name + (5,) + tblIdx1, authProtocol), (usmUserEntry.name + (8,) + tblIdx1, privProtocol)) ) # Localize keys if authProtocol == usmHMACMD5AuthProtocol: hashedAuthPassphrase = localkey.hashPassphraseMD5( authKey and authKey or '' ) localAuthKey = localkey.localizeKeyMD5( hashedAuthPassphrase, snmpEngineID ) elif authProtocol == usmHMACSHAAuthProtocol: hashedAuthPassphrase = localkey.hashPassphraseSHA( authKey and authKey or '' ) localAuthKey = localkey.localizeKeySHA( hashedAuthPassphrase, snmpEngineID ) elif authProtocol == usmNoAuthProtocol: hashedAuthPassphrase = localAuthKey = None else: raise error.PySnmpError('Unknown auth protocol %s' % (authProtocol,)) if privProtocol == usmDESPrivProtocol or \ privProtocol == usmAesCfb128Protocol: if authProtocol == usmHMACMD5AuthProtocol: hashedPrivPassphrase = localkey.hashPassphraseMD5( privKey and privKey or '' ) localPrivKey = localkey.localizeKeyMD5( hashedPrivPassphrase, snmpEngineID ) elif authProtocol == usmHMACSHAAuthProtocol: hashedPrivPassphrase = localkey.hashPassphraseSHA( privKey and privKey or '' ) localPrivKey = localkey.localizeKeySHA( hashedPrivPassphrase, snmpEngineID ) else: raise error.PySnmpError( 'Unknown auth protocol %s' % (authProtocol,) ) elif privProtocol == usmNoPrivProtocol: hashedPrivPassphrase = localPrivKey = None else: raise error.PySnmpError( 'Unknown priv protocol %s' % (privProtocol,) ) # Commit localized keys snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((pysnmpUsmKeyEntry.name + (1,) + tblIdx1, localAuthKey), (pysnmpUsmKeyEntry.name + (2,) + tblIdx1, localPrivKey), (pysnmpUsmKeyEntry.name + (3,) + tblIdx1, hashedAuthPassphrase), (pysnmpUsmKeyEntry.name + (4,) + tblIdx1, hashedPrivPassphrase)) ) # Commit passphrases snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((pysnmpUsmSecretEntry.name + (4,) + tblIdx2, 'destroy'),) ) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((pysnmpUsmSecretEntry.name + (4,) + tblIdx2, 'createAndGo'), (pysnmpUsmSecretEntry.name + (2,) + tblIdx2, authKey), (pysnmpUsmSecretEntry.name + (3,) + tblIdx2, privKey),) ) def delV3User(snmpEngine, securityName, contextEngineId=None): ( snmpEngineID, usmUserEntry, tblIdx1, pysnmpUsmSecretEntry, tblIdx2 ) = __cookV3UserInfo( snmpEngine, securityName, contextEngineId ) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((usmUserEntry.name + (13,) + tblIdx1, 'destroy'),) ) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((pysnmpUsmSecretEntry.name + (4,) + tblIdx2, 'destroy'),) ) def __cookTargetParamsInfo(snmpEngine, name): snmpTargetParamsEntry, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('SNMP-TARGET-MIB', 'snmpTargetParamsEntry') tblIdx = snmpTargetParamsEntry.getInstIdFromIndices(name) return snmpTargetParamsEntry, tblIdx def addTargetParams( snmpEngine, name, securityName, securityLevel, mpModel=3 # 0 == SNMPv1, 1 == SNMPv2c, 3 == SNMPv3 ): if mpModel == 0: securityModel = 1 elif mpModel == 1 or mpModel == 2: securityModel = 2 elif mpModel == 3: securityModel = 3 else: raise error.PySnmpError('Unknown MP model %s' % mpModel) snmpTargetParamsEntry, tblIdx = __cookTargetParamsInfo(snmpEngine, name) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((snmpTargetParamsEntry.name + (7,) + tblIdx, 'destroy'),) ) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((snmpTargetParamsEntry.name + (7,) + tblIdx, 'createAndGo'), (snmpTargetParamsEntry.name + (1,) + tblIdx, name), (snmpTargetParamsEntry.name + (2,) + tblIdx, mpModel), (snmpTargetParamsEntry.name + (3,) + tblIdx, securityModel), (snmpTargetParamsEntry.name + (4,) + tblIdx, securityName), (snmpTargetParamsEntry.name + (5,) + tblIdx, securityLevel)) ) def delTargetParams(snmpEngine, name): snmpTargetParamsEntry, tblIdx = __cookTargetParamsInfo( snmpEngine, name ) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((snmpTargetParamsEntry.name + (7,) + tblIdx, 'destroy'),) ) def __cookTargetAddrInfo(snmpEngine, addrName): snmpTargetAddrEntry, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('SNMP-TARGET-MIB', 'snmpTargetAddrEntry') tblIdx = snmpTargetAddrEntry.getInstIdFromIndices(addrName) return snmpTargetAddrEntry, tblIdx def addTargetAddr( snmpEngine, addrName, transportDomain, transportAddress, params, timeout=None, retryCount=None, tagList='' ): snmpTargetAddrEntry, tblIdx = __cookTargetAddrInfo( snmpEngine, addrName ) if transportDomain[:len(snmpUDPDomain)] == snmpUDPDomain: SnmpUDPAddress, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('SNMPv2-TM', 'SnmpUDPAddress') transportAddress = SnmpUDPAddress(transportAddress) elif transportDomain[:len(snmpUDP6Domain)] == snmpUDP6Domain: TransportAddressIPv6, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('TRANSPORT-ADDRESS-MIB', 'TransportAddressIPv6') transportAddress = TransportAddressIPv6(transportAddress) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((snmpTargetAddrEntry.name + (9,) + tblIdx, 'destroy'),) ) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((snmpTargetAddrEntry.name + (9,) + tblIdx, 'createAndGo'), (snmpTargetAddrEntry.name + (1,) + tblIdx, addrName), (snmpTargetAddrEntry.name + (2,) + tblIdx, transportDomain), (snmpTargetAddrEntry.name + (3,) + tblIdx, transportAddress), (snmpTargetAddrEntry.name + (4,) + tblIdx, timeout), (snmpTargetAddrEntry.name + (5,) + tblIdx, retryCount), # XXX (snmpTargetAddrEntry.name + (6,) + tblIdx,'%s %s'%(addrName,tagList)), (snmpTargetAddrEntry.name + (7,) + tblIdx, params),) ) def delTargetAddr(snmpEngine, addrName): snmpTargetAddrEntry, tblIdx = __cookTargetAddrInfo( snmpEngine, addrName ) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((snmpTargetAddrEntry.name + (9,) + tblIdx, 'destroy'),) ) def addSocketTransport(snmpEngine, transportDomain, transport): """Add transport object to socket dispatcher of snmpEngine""" if not snmpEngine.transportDispatcher: snmpEngine.registerTransportDispatcher(dispatch.AsynsockDispatcher()) snmpEngine.transportDispatcher.registerTransport( transportDomain, transport ) def delSocketTransport(snmpEngine, transportDomain): """Unregister transport object at socket dispatcher of snmpEngine""" if not snmpEngine.transportDispatcher: return snmpEngine.transportDispatcher.unregisterTransport( transportDomain ) snmpEngine.unregisterTransportDispatcher() # VACM shortcuts def addContext(snmpEngine, contextName): vacmContextEntry, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols( 'SNMP-VIEW-BASED-ACM-MIB', 'vacmContextEntry' ) tblIdx = vacmContextEntry.getInstIdFromIndices(contextName) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((vacmContextEntry.name + (1,) + tblIdx, contextName),) ) def __cookVacmGroupInfo(snmpEngine, securityModel, securityName): vacmSecurityToGroupEntry, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols( 'SNMP-VIEW-BASED-ACM-MIB', 'vacmSecurityToGroupEntry' ) tblIdx = vacmSecurityToGroupEntry.getInstIdFromIndices( securityModel, securityName ) return vacmSecurityToGroupEntry, tblIdx def addVacmGroup(snmpEngine, groupName, securityModel, securityName): vacmSecurityToGroupEntry, tblIdx = __cookVacmGroupInfo( snmpEngine, securityModel, securityName ) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((vacmSecurityToGroupEntry.name + (5,) + tblIdx, 'destroy'),) ) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((vacmSecurityToGroupEntry.name + (5,) + tblIdx, 'createAndGo'), (vacmSecurityToGroupEntry.name + (1,) + tblIdx, securityModel), (vacmSecurityToGroupEntry.name + (2,) + tblIdx, securityName), (vacmSecurityToGroupEntry.name + (3,) + tblIdx, groupName),) ) def delVacmGroup(snmpEngine, securityModel, securityName): vacmSecurityToGroupEntry, tblIdx = __cookVacmGroupInfo( snmpEngine, securityModel, securityName ) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((vacmSecurityToGroupEntry.name + (5,) + tblIdx, 'destroy'),) ) def __cookVacmAccessInfo(snmpEngine, groupName, contextName, securityModel, securityLevel): vacmAccessEntry, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols( 'SNMP-VIEW-BASED-ACM-MIB', 'vacmAccessEntry' ) tblIdx = vacmAccessEntry.getInstIdFromIndices( groupName, contextName, securityModel, securityLevel ) return vacmAccessEntry, tblIdx def addVacmAccess(snmpEngine, groupName, contextName, securityModel, securityLevel, prefix, readView, writeView, notifyView): vacmAccessEntry, tblIdx = __cookVacmAccessInfo( snmpEngine, groupName, contextName, securityModel, securityLevel ) addContext(snmpEngine, contextName) # this is leaky snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((vacmAccessEntry.name + (9,) + tblIdx, 'destroy'),) ) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((vacmAccessEntry.name + (9,) + tblIdx, 'createAndGo'), (vacmAccessEntry.name + (1,) + tblIdx, contextName), (vacmAccessEntry.name + (2,) + tblIdx, securityModel), (vacmAccessEntry.name + (3,) + tblIdx, securityLevel), (vacmAccessEntry.name + (4,) + tblIdx, prefix), (vacmAccessEntry.name + (5,) + tblIdx, readView), (vacmAccessEntry.name + (6,) + tblIdx, writeView), (vacmAccessEntry.name + (7,) + tblIdx, notifyView),) ) def delVacmAccess(snmpEngine, groupName, contextName, securityModel, securityLevel): vacmAccessEntry, tblIdx = __cookVacmAccessInfo( snmpEngine, groupName, contextName, securityModel, securityLevel ) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((vacmAccessEntry.name + (9,) + tblIdx, 'destroy'),) ) def __cookVacmViewInfo(snmpEngine, viewName, subTree): vacmViewTreeFamilyEntry, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols( 'SNMP-VIEW-BASED-ACM-MIB', 'vacmViewTreeFamilyEntry' ) tblIdx = vacmViewTreeFamilyEntry.getInstIdFromIndices( viewName, subTree ) return vacmViewTreeFamilyEntry, tblIdx def addVacmView(snmpEngine, viewName, viewType, subTree, mask): vacmViewTreeFamilyEntry, tblIdx = __cookVacmViewInfo( snmpEngine, viewName, subTree ) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((vacmViewTreeFamilyEntry.name + (6,) + tblIdx, 'destroy'),) ) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((vacmViewTreeFamilyEntry.name + (6,) + tblIdx, 'createAndGo'), (vacmViewTreeFamilyEntry.name + (1,) + tblIdx, viewName), (vacmViewTreeFamilyEntry.name + (2,) + tblIdx, subTree), (vacmViewTreeFamilyEntry.name + (3,) + tblIdx, mask), (vacmViewTreeFamilyEntry.name + (4,) + tblIdx, viewType),) ) def delVacmView(snmpEngine, viewName, subTree): vacmViewTreeFamilyEntry, tblIdx = __cookVacmViewInfo( snmpEngine, viewName, subTree ) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((vacmViewTreeFamilyEntry.name + (6,) + tblIdx, 'destroy'),) ) # VACM simplicity wrappers def __cookVacmUserInfo(snmpEngine, securityModel, securityName, securityLevel): groupName = 'v-%s-%d' % (hash(securityName), securityModel) SnmpSecurityLevel, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpSecurityLevel') securityLevel = SnmpSecurityLevel(securityLevel) return ( groupName, securityLevel, 'r' + groupName, 'w' + groupName, 'n' + groupName ) def addVacmUser(snmpEngine, securityModel, securityName, securityLevel, readSubTree=(), writeSubTree=(), notifySubTree=(), contextName=''): ( groupName, securityLevel, readView, writeView, notifyView ) = __cookVacmUserInfo( snmpEngine, securityModel, securityName, securityLevel, ) addVacmGroup( snmpEngine, groupName, securityModel, securityName ) addVacmAccess( snmpEngine, groupName, contextName, securityModel, securityLevel, 1, readView, writeView, notifyView ) if readSubTree: addVacmView( snmpEngine, readView, "included", readSubTree, '', ) if writeSubTree: addVacmView( snmpEngine, writeView, "included", writeSubTree, '', ) if notifySubTree: addVacmView( snmpEngine, notifyView, "included", notifySubTree, '', ) def delVacmUser(snmpEngine, securityModel, securityName, securityLevel, readSubTree=(), writeSubTree=(), notifySubTree=()): ( groupName, securityLevel, readView, writeView, notifyView ) = __cookVacmUserInfo( snmpEngine, securityModel, securityName, securityLevel, ) delVacmGroup( snmpEngine, securityModel, securityName ) delVacmAccess( snmpEngine, groupName, '', securityModel, securityLevel ) if readSubTree: delVacmView( snmpEngine, readView, readSubTree ) if writeSubTree: delVacmView( snmpEngine, writeView, writeSubTree ) if notifySubTree: delVacmView( snmpEngine, notifyView, notifySubTree ) # Obsolete shortcuts for add/delVacmUser() wrappers def addRoUser(snmpEngine, securityModel, securityName, securityLevel, subTree): addVacmUser( snmpEngine, securityModel, securityName, securityLevel, subTree ) def delRoUser(snmpEngine, securityModel, securityName, securityLevel, subTree): delVacmUser( snmpEngine, securityModel, securityName, securityLevel, subTree ) def addRwUser(snmpEngine, securityModel, securityName, securityLevel, subTree): addVacmUser( snmpEngine, securityModel, securityName, securityLevel, subTree, subTree ) def delRwUser(snmpEngine, securityModel, securityName, securityLevel, subTree): delVacmUser( snmpEngine, securityModel, securityName, securityLevel, subTree, subTree ) def addTrapUser(snmpEngine,securityModel,securityName,securityLevel,subTree): addVacmUser( snmpEngine, securityModel, securityName, securityLevel, (), (), subTree, ) def delTrapUser(snmpEngine,securityModel,securityName,securityLevel,subTree): delVacmUser( snmpEngine, securityModel, securityName, securityLevel, (), (), subTree, ) # Notification target setup def __cookNotificationTargetInfo(snmpEngine, notificationName, paramsName, filterSubtree=None): snmpNotifyEntry, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('SNMP-NOTIFICATION-MIB', 'snmpNotifyEntry') tblIdx1 = snmpNotifyEntry.getInstIdFromIndices( notificationName ) snmpNotifyFilterProfileEntry, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('SNMP-NOTIFICATION-MIB', 'snmpNotifyFilterProfileEntry') tblIdx2 = snmpNotifyFilterProfileEntry.getInstIdFromIndices( paramsName ) profileName = '%s-filter' % hash(notificationName) if filterSubtree: snmpNotifyFilterEntry, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('SNMP-NOTIFICATION-MIB', 'snmpNotifyFilterEntry') tblIdx3 = snmpNotifyFilterEntry.getInstIdFromIndices( profileName, filterSubtree ) else: snmpNotifyFilterEntry = tblIdx3 = None return ( snmpNotifyEntry, tblIdx1, snmpNotifyFilterProfileEntry, tblIdx2, profileName, snmpNotifyFilterEntry, tblIdx3 ) def addNotificationTarget(snmpEngine, notificationName, paramsName, transportTag, notifyType=None, filterSubtree=None, filterMask=None, filterType=None): ( snmpNotifyEntry, tblIdx1, snmpNotifyFilterProfileEntry, tblIdx2, profileName, snmpNotifyFilterEntry, tblIdx3 ) = __cookNotificationTargetInfo( snmpEngine, notificationName, paramsName, filterSubtree ) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((snmpNotifyEntry.name + (5,) + tblIdx1, 'destroy'),) ) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((snmpNotifyEntry.name + (5,) + tblIdx1, 'createAndGo'), (snmpNotifyEntry.name + (2,) + tblIdx1, transportTag), (snmpNotifyEntry.name + (3,) + tblIdx1, notifyType),) ) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((snmpNotifyFilterProfileEntry.name + (3,) + tblIdx2, 'destroy'),) ) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((snmpNotifyFilterProfileEntry.name + (3,) + tblIdx2, 'createAndGo'), (snmpNotifyFilterProfileEntry.name + (1,) + tblIdx2, profileName),) ) if not snmpNotifyFilterEntry: return snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((snmpNotifyFilterEntry.name + (5,) + tblIdx3, 'destroy'),) ) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((snmpNotifyFilterEntry.name + (5,) + tblIdx3, 'createAndGo'), (snmpNotifyFilterEntry.name + (1,) + tblIdx3, filterSubtree), (snmpNotifyFilterEntry.name + (2,) + tblIdx3, filterMask), (snmpNotifyFilterEntry.name + (3,) + tblIdx3, filterType),) ) def delNotificationTarget(snmpEngine, notificationName, paramsName, filterSubtree=None): ( snmpNotifyEntry, tblIdx1, snmpNotifyFilterProfileEntry, tblIdx2, profileName, snmpNotifyFilterEntry, tblIdx3 ) = __cookNotificationTargetInfo( snmpEngine, notificationName, paramsName, filterSubtree ) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((snmpNotifyEntry.name + (5,) + tblIdx1, 'destroy'),) ) snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((snmpNotifyFilterProfileEntry.name + (3,) + tblIdx2, 'destroy'),) ) if not snmpNotifyFilterEntry: return snmpEngine.msgAndPduDsp.mibInstrumController.writeVars( ((snmpNotifyFilterEntry.name + (5,) + tblIdx3, 'destroy'),) ) # rfc3415: A.1 def setInitialVacmParameters(snmpEngine): # rfc3415: A.1.1 --> initial-semi-security-configuration # rfc3415: A.1.2 addContext(snmpEngine, "") # rfc3415: A.1.3 addVacmGroup(snmpEngine, "initial", 3, "initial") # rfc3415: A.1.4 addVacmAccess(snmpEngine, "initial", "", 3, "noAuthNoPriv", "exact", "restricted", None, "restricted") addVacmAccess(snmpEngine, "initial", "", 3, "authNoPriv", "exact", "internet", "internet", "internet") addVacmAccess(snmpEngine, "initial", "", 3, "authPriv", "exact", "internet", "internet", "internet") # rfc3415: A.1.5 (semi-secure) addVacmView(snmpEngine, "internet", "included", (1,3,6,1),"") addVacmView(snmpEngine, "restricted", "included", (1,3,6,1,2,1,1),"") addVacmView(snmpEngine, "restricted", "included", (1,3,6,1,2,1,11),"") addVacmView(snmpEngine, "restricted", "included", (1,3,6,1,6,3,10,2,1),"") addVacmView(snmpEngine, "restricted", "included", (1,3,6,1,6,3,11,2,1),"") addVacmView(snmpEngine, "restricted", "included", (1,3,6,1,6,3,15,1,1),"") PK†£=Ì'„„pysnmp/entity/__init__.pyc;ò ¾ ®Bc@sdS(N((((s4build/bdist.linux-i686/egg/pysnmp/entity/__init__.pys?sPKK~=3Ä0½ššpysnmp/entity/engine.py# SNMP engine from pysnmp.proto.rfc3412 import MsgAndPduDispatcher from pysnmp.proto.mpmod.rfc2576 import SnmpV1MessageProcessingModel, \ SnmpV2cMessageProcessingModel from pysnmp.proto.mpmod.rfc3412 import SnmpV3MessageProcessingModel from pysnmp.proto.secmod.rfc2576 import SnmpV1SecurityModel, \ SnmpV2cSecurityModel from pysnmp.proto.secmod.rfc3414 import SnmpUSMSecurityModel from pysnmp.proto.acmod import rfc3415, void from pysnmp import error class SnmpEngine: def __init__(self, snmpEngineID=None, maxMessageSize=65507, msgAndPduDsp=None): if msgAndPduDsp is None: self.msgAndPduDsp = MsgAndPduDispatcher() else: self.msgAndPduDsp = msgAndPduDsp self.messageProcessingSubsystems = { SnmpV1MessageProcessingModel.messageProcessingModelID: SnmpV1MessageProcessingModel(), SnmpV2cMessageProcessingModel.messageProcessingModelID: SnmpV2cMessageProcessingModel(), SnmpV3MessageProcessingModel.messageProcessingModelID: SnmpV3MessageProcessingModel() } self.securityModels = { SnmpV1SecurityModel.securityModelID: SnmpV1SecurityModel(), SnmpV2cSecurityModel.securityModelID: SnmpV2cSecurityModel(), SnmpUSMSecurityModel.securityModelID: SnmpUSMSecurityModel() } self.accessControlModel = { void.accessModelID: void, rfc3415.accessModelID: rfc3415 } self.transportDispatcher = None if self.msgAndPduDsp.mibInstrumController is None: raise error.PySnmpError( 'MIB instrumentation does not yet exist' ) snmpEngineMaxMessageSize, = self.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-FRAMEWORK-MIB', 'snmpEngineMaxMessageSize') snmpEngineMaxMessageSize.syntax = snmpEngineMaxMessageSize.syntax.clone(maxMessageSize) snmpEngineBoots, = self.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-FRAMEWORK-MIB', 'snmpEngineBoots') snmpEngineBoots.syntax = snmpEngineBoots.syntax + 1 if snmpEngineID is not None: origSnmpEngineID, = self.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-FRAMEWORK-MIB', 'snmpEngineID') origSnmpEngineID.syntax = origSnmpEngineID.syntax.clone(snmpEngineID) # Transport dispatcher bindings def __receiveMessageCbFun( self, transportDispatcher, transportDomain, transportAddress, wholeMsg ): self.msgAndPduDsp.receiveMessage( self, transportDomain, transportAddress, wholeMsg ) def __receiveTimerTickCbFun(self, timeNow): self.msgAndPduDsp.receiveTimerTick(self, timeNow) for mpHandler in self.messageProcessingSubsystems.values(): mpHandler.receiveTimerTick(self, timeNow) for smHandler in self.securityModels.values(): smHandler.receiveTimerTick(self, timeNow) def registerTransportDispatcher(self, transportDispatcher): if self.transportDispatcher is not None: raise error.PySnmpError( 'Transport dispatcher already registered' ) transportDispatcher.registerRecvCbFun( self.__receiveMessageCbFun ) transportDispatcher.registerTimerCbFun( self.__receiveTimerTickCbFun ) self.transportDispatcher = transportDispatcher def unregisterTransportDispatcher(self): if self.transportDispatcher is None: raise error.PySnmpError( 'Transport dispatcher not registered' ) self.transportDispatcher.unregisterRecvCbFun() self.transportDispatcher.unregisterTimerCbFun() self.transportDispatcher = None PK†£=i$„8ŸoŸopysnmp/entity/config.pyc;ò «Î“Lc@sÌdkZdklZdklZlZydklZeiZWnej onXdk l Z dk l Z dk lZdklZlZlZdklZlZd klZd klZd klZeiZeiZeiiZ ei!iZ"ei#iZ$ei%iZ&ei'iZ(ei)iZ*d „Z+e,e,e,d „Z-d„Z.d„Z/e$e,e*e,e,d„Z0e,d„Z1d„Z2dd„Z3d„Z4d„Z5e,e,dd„Z6d„Z7d„Z8d„Z9d„Z:d„Z;d„Z<d„Z=d „Z>d!„Z?d"„Z@d#„ZAd$„ZBd%„ZCd&„ZDfffdd'„ZEfffd(„ZFd)„ZGd*„ZHd+„ZId,„ZJd-„ZKd.„ZLe,d/„ZMe,e,e,e,d0„ZNe,d1„ZOd2„ZPdS(3N(sdispatch(sudpsudp6(sunix(srfc3412(slocalkey(sengine(shmacmd5shmacshasnoauth(sdessnopriv(saes(sNotWritableError(serrorcCs\|iiiiddƒ\}|iiiiddƒ\}|i|ƒ}|||fSdS(Ns__SNMP-FRAMEWORK-MIBs snmpEngineIDsSNMP-COMMUNITY-MIBssnmpCommunityEntry( s snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolss snmpEngineIDssnmpCommunityEntrysgetInstIdFromIndicess securityNamestblIdx(s snmpEngines securityNames snmpEngineIDstblIdxssnmpCommunityEntry((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys__cookV1SystemInfo$sc Cs+t||ƒ\}}}|tjo |i}n|tjo d}n|i i i |i df|dffƒ|i i i |i df|df|i df||f|i df||f|i df||f|i df||f|i d f||f|i d f|d ffƒdS( Nsisdestroys createAndGoiiiiiis nonVolatile(s__cookV1SystemInfos snmpEngines securityNamessnmpCommunityEntrystblIdxs snmpEngineIDscontextEngineIdsNonessyntaxs contextNames msgAndPduDspsmibInstrumControllers writeVarssnames communityNames transportTag( s snmpEngines securityNames communityNamescontextEngineIds contextNames transportTagssnmpCommunityEntrystblIdxs snmpEngineID((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys addV1System+s    *cCsFt||ƒ\}}}|iii|i df|dffƒdS(Nisdestroy( s__cookV1SystemInfos snmpEngines securityNamessnmpCommunityEntrystblIdxs snmpEngineIDs msgAndPduDspsmibInstrumControllers writeVarssname(s snmpEngines securityNamessnmpCommunityEntrys snmpEngineIDstblIdx((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys delV1SystemDscCs²|tjo+|iiiiddƒ\}|i}n|}|iiiiddƒ\}|i ||ƒ}|iiiiddƒ\}|i |ƒ}|||||fSdS(Ns__SNMP-FRAMEWORK-MIBs snmpEngineIDsSNMP-USER-BASED-SM-MIBs usmUserEntrysPYSNMP-USM-MIBspysnmpUsmSecretEntry(scontextEngineIdsNones snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolss snmpEngineIDssyntaxs usmUserEntrysgetInstIdFromIndicess securityNamestblIdx1spysnmpUsmSecretEntrystblIdx2(s snmpEngines securityNamescontextEngineIds usmUserEntrystblIdx2s snmpEngineIDstblIdx1spysnmpUsmSecretEntry((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys__cookV3UserInfoLs  cCs›t|||ƒ\}} }}}|i i i i ddƒ\}|i i i i ddƒ\} |i i i| idf|dffƒ|i i i| idf|df| idf||f| id f|| if| id f||f| id f||ffƒ|tjo3ti|o|pd ƒ} ti| |ƒ} nr|tjo3ti|o|pd ƒ} ti| |ƒ} n2|tjot} } nti d |fƒ‚|t!jp |t"još|tjo3ti|o|pd ƒ} ti| |ƒ}q¦|tjo3ti|o|pd ƒ} ti| |ƒ}q¦ti d |fƒ‚n2|t&jot} }nti d|fƒ‚|i i i|idf|| f|idf||f|idf|| f|id f|| ffƒ|i i i|id f|dffƒ|i i i|id f|df|idf||f|idf||ffƒdS(NsPYSNMP-USM-MIBspysnmpUsmKeyEntrys SNMPv2-SMIs zeroDotZeroi sdestroys createAndGoiiiissUnknown auth protocol %ssUnknown priv protocol %sii('s__cookV3UserInfos snmpEngines securityNamescontextEngineIds snmpEngineIDs usmUserEntrystblIdx1spysnmpUsmSecretEntrystblIdx2s msgAndPduDspsmibInstrumControllers mibBuilders importSymbolsspysnmpUsmKeyEntrys zeroDotZeros writeVarssnames authProtocols privProtocolsusmHMACMD5AuthProtocolslocalkeyshashPassphraseMD5sauthKeyshashedAuthPassphraseslocalizeKeyMD5s localAuthKeysusmHMACSHAAuthProtocolshashPassphraseSHAslocalizeKeySHAsusmNoAuthProtocolsNoneserrors PySnmpErrorsusmDESPrivProtocolsusmAesCfb128ProtocolsprivKeyshashedPrivPassphrases localPrivKeysusmNoPrivProtocol(s snmpEngines securityNames authProtocolsauthKeys privProtocolsprivKeyscontextEngineIdstblIdx2stblIdx1s localAuthKeyshashedAuthPassphraseshashedPrivPassphrases usmUserEntrys zeroDotZeros localPrivKeys snmpEngineIDspysnmpUsmSecretEntryspysnmpUsmKeyEntry((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys addV3User]s8!*‰      o *cCsyt|||ƒ\}}}}}|i i i |i df|dffƒ|i i i |i df|dffƒdS(Ni sdestroyi( s__cookV3UserInfos snmpEngines securityNamescontextEngineIds snmpEngineIDs usmUserEntrystblIdx1spysnmpUsmSecretEntrystblIdx2s msgAndPduDspsmibInstrumControllers writeVarssname(s snmpEngines securityNamescontextEngineIds usmUserEntrystblIdx2s snmpEngineIDstblIdx1spysnmpUsmSecretEntry((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys delV3User¹s!*cCs;|iiiiddƒ\}|i|ƒ}||fSdS(NsSNMP-TARGET-MIBssnmpTargetParamsEntry( s snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolsssnmpTargetParamsEntrysgetInstIdFromIndicessnamestblIdx(s snmpEnginesnamestblIdxssnmpTargetParamsEntry((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys__cookTargetParamsInfoÅsicCsE|djo d}nO|djp |djo d}n+|djo d}ntid|ƒ‚t||ƒ\}}|i i i |idf|dffƒ|i i i |idf|df|idf||f|idf||f|idf||f|id f||f|id f||ffƒdS( NiiiisUnknown MP model %sisdestroys createAndGoii(smpModels securityModelserrors PySnmpErrors__cookTargetParamsInfos snmpEnginesnamessnmpTargetParamsEntrystblIdxs msgAndPduDspsmibInstrumControllers writeVarss securityNames securityLevel(s snmpEnginesnames securityNames securityLevelsmpModelssnmpTargetParamsEntrystblIdxs securityModel((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pysaddTargetParamsÊs     *cCsCt||ƒ\}}|iii|idf|dffƒdS(Nisdestroy(s__cookTargetParamsInfos snmpEnginesnamessnmpTargetParamsEntrystblIdxs msgAndPduDspsmibInstrumControllers writeVars(s snmpEnginesnamestblIdxssnmpTargetParamsEntry((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pysdelTargetParamsèscCs;|iiiiddƒ\}|i|ƒ}||fSdS(NsSNMP-TARGET-MIBssnmpTargetAddrEntry( s snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolsssnmpTargetAddrEntrysgetInstIdFromIndicessaddrNamestblIdx(s snmpEnginesaddrNamessnmpTargetAddrEntrystblIdx((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys__cookTargetAddrInfoðssc Cs¢t||ƒ\} } |ttƒ tjo.|ii i i ddƒ\} | |ƒ}nF|ttƒ tjo.|ii i i ddƒ\}||ƒ}n|ii i| idf| dffƒ|ii i| idf| df| idf| |f| id f| |f| id f| |f| id f| |f| id f| |f| id f| d||ff| idf| |ffƒdS(Ns SNMPv2-TMsSnmpUDPAddresssTRANSPORT-ADDRESS-MIBsTransportAddressIPv6i sdestroys createAndGoiiiiiis%s %si(s__cookTargetAddrInfos snmpEnginesaddrNamessnmpTargetAddrEntrystblIdxstransportDomainslens snmpUDPDomains msgAndPduDspsmibInstrumControllers mibBuilders importSymbolssSnmpUDPAddressstransportAddressssnmpUDP6DomainsTransportAddressIPv6s writeVarssnamestimeouts retryCountstagListsparams( s snmpEnginesaddrNamestransportDomainstransportAddresssparamsstimeouts retryCountstagListsTransportAddressIPv6stblIdxsSnmpUDPAddressssnmpTargetAddrEntry((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys addTargetAddrõs *cCsCt||ƒ\}}|iii|idf|dffƒdS(Ni sdestroy( s__cookTargetAddrInfos snmpEnginesaddrNamessnmpTargetAddrEntrystblIdxs msgAndPduDspsmibInstrumControllers writeVarssname(s snmpEnginesaddrNamessnmpTargetAddrEntrystblIdx((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys delTargetAddrscCs9|i o|itiƒƒn|ii||ƒdS(s7Add transport object to socket dispatcher of snmpEngineN(s snmpEnginestransportDispatchersregisterTransportDispatchersdispatchsAsynsockDispatchersregisterTransportstransportDomains transport(s snmpEnginestransportDomains transport((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pysaddSocketTransport!s cCs1|i odSn|ii|ƒ|iƒdS(s>Unregister transport object at socket dispatcher of snmpEngineN(s snmpEnginestransportDispatchersunregisterTransportstransportDomainsunregisterTransportDispatcher(s snmpEnginestransportDomain((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pysdelSocketTransport)s  cCs[|iiiiddƒ\}|i|ƒ}|iii |i df||ffƒdS(NsSNMP-VIEW-BASED-ACM-MIBsvacmContextEntryi( s snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolssvacmContextEntrysgetInstIdFromIndicess contextNamestblIdxs writeVarssname(s snmpEngines contextNamesvacmContextEntrystblIdx((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys addContext4scCs>|iiiiddƒ\}|i||ƒ}||fSdS(NsSNMP-VIEW-BASED-ACM-MIBsvacmSecurityToGroupEntry( s snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolssvacmSecurityToGroupEntrysgetInstIdFromIndicess securityModels securityNamestblIdx(s snmpEngines securityModels securityNamestblIdxsvacmSecurityToGroupEntry((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys__cookVacmGroupInfo=scCsµt|||ƒ\}}|iii|i df|dffƒ|iii|i df|df|i df||f|i df||f|i df||ffƒdS(Nisdestroys createAndGoiii( s__cookVacmGroupInfos snmpEngines securityModels securityNamesvacmSecurityToGroupEntrystblIdxs msgAndPduDspsmibInstrumControllers writeVarssnames groupName(s snmpEngines groupNames securityModels securityNamestblIdxsvacmSecurityToGroupEntry((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys addVacmGroupFs*cCsFt|||ƒ\}}|iii|i df|dffƒdS(Nisdestroy( s__cookVacmGroupInfos snmpEngines securityModels securityNamesvacmSecurityToGroupEntrystblIdxs msgAndPduDspsmibInstrumControllers writeVarssname(s snmpEngines securityModels securityNamesvacmSecurityToGroupEntrystblIdx((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys delVacmGroupTscCsD|iiiiddƒ\}|i||||ƒ}||fSdS(NsSNMP-VIEW-BASED-ACM-MIBsvacmAccessEntry( s snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolssvacmAccessEntrysgetInstIdFromIndicess groupNames contextNames securityModels securityLevelstblIdx(s snmpEngines groupNames contextNames securityModels securityLevelsvacmAccessEntrystblIdx((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys__cookVacmAccessInfo\sc Cs$t|||||ƒ\} } t||ƒ|i i i | i df| dffƒ|i i i | i df| df| i df| |f| i df| |f| i df| |f| i df| |f| i df| |f| i d f| |f| i d f| |ffƒdS( Ni sdestroys createAndGoiiiiiii(s__cookVacmAccessInfos snmpEngines groupNames contextNames securityModels securityLevelsvacmAccessEntrystblIdxs addContexts msgAndPduDspsmibInstrumControllers writeVarssnamesprefixsreadViews writeViews notifyView( s snmpEngines groupNames contextNames securityModels securityLevelsprefixsreadViews writeViews notifyViewsvacmAccessEntrystblIdx((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys addVacmAccessfs *cCsLt|||||ƒ\}}|ii i |i df|dffƒdS(Ni sdestroy( s__cookVacmAccessInfos snmpEngines groupNames contextNames securityModels securityLevelsvacmAccessEntrystblIdxs msgAndPduDspsmibInstrumControllers writeVarssname(s snmpEngines groupNames contextNames securityModels securityLevelsvacmAccessEntrystblIdx((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys delVacmAccess|scCs>|iiiiddƒ\}|i||ƒ}||fSdS(NsSNMP-VIEW-BASED-ACM-MIBsvacmViewTreeFamilyEntry( s snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolssvacmViewTreeFamilyEntrysgetInstIdFromIndicessviewNamessubTreestblIdx(s snmpEnginesviewNamessubTreestblIdxsvacmViewTreeFamilyEntry((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys__cookVacmViewInfo…scCsÌt|||ƒ\}}|iii|i df|dffƒ|iii|i df|df|i df||f|i df||f|i df||f|i df||ffƒdS(Nisdestroys createAndGoiiii( s__cookVacmViewInfos snmpEnginesviewNamessubTreesvacmViewTreeFamilyEntrystblIdxs msgAndPduDspsmibInstrumControllers writeVarssnamesmasksviewType(s snmpEnginesviewNamesviewTypessubTreesmasksvacmViewTreeFamilyEntrystblIdx((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys addVacmViewŽs*cCsFt|||ƒ\}}|iii|i df|dffƒdS(Nisdestroy( s__cookVacmViewInfos snmpEnginesviewNamessubTreesvacmViewTreeFamilyEntrystblIdxs msgAndPduDspsmibInstrumControllers writeVarssname(s snmpEnginesviewNamessubTreesvacmViewTreeFamilyEntrystblIdx((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys delVacmViewscCscdt|ƒ|f}|iiiiddƒ\}||ƒ}||d|d|d|fSdS(Nsv-%s-%dsSNMP-FRAMEWORK-MIBsSnmpSecurityLevelsrswsn( shashs securityNames securityModels groupNames snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolssSnmpSecurityLevels securityLevel(s snmpEngines securityModels securityNames securityLevels groupNamesSnmpSecurityLevel((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys__cookVacmUserInfo§s c CsÀt||||ƒ\} }} } }t || ||ƒt || |||d| | |ƒ |ot || d|dƒn|ot || d|dƒn|ot ||d|dƒndS(Nisincludeds(s__cookVacmUserInfos snmpEngines securityModels securityNames securityLevels groupNamesreadViews writeViews notifyViews addVacmGroups addVacmAccesss contextNames readSubTrees addVacmViews writeSubTrees notifySubTree( s snmpEngines securityModels securityNames securityLevels readSubTrees writeSubTrees notifySubTrees contextNames notifyViews writeViews groupNamesreadView((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys addVacmUser®s$ c CsŸt||||ƒ\} }} }}t |||ƒt || d||ƒ|ot || |ƒn|ot |||ƒn|ot |||ƒndS(Ns(s__cookVacmUserInfos snmpEngines securityModels securityNames securityLevels groupNamesreadViews writeViews notifyViews delVacmGroups delVacmAccesss readSubTrees delVacmViews writeSubTrees notifySubTree( s snmpEngines securityModels securityNames securityLevels readSubTrees writeSubTrees notifySubTrees notifyViews writeViews groupNamesreadView((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys delVacmUserÉs$cCst|||||ƒdS(N(s addVacmUsers snmpEngines securityModels securityNames securityLevelssubTree(s snmpEngines securityModels securityNames securityLevelssubTree((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys addRoUseräscCst|||||ƒdS(N(s delVacmUsers snmpEngines securityModels securityNames securityLevelssubTree(s snmpEngines securityModels securityNames securityLevelssubTree((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys delRoUseréscCst||||||ƒdS(N(s addVacmUsers snmpEngines securityModels securityNames securityLevelssubTree(s snmpEngines securityModels securityNames securityLevelssubTree((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys addRwUserîscCst||||||ƒdS(N(s delVacmUsers snmpEngines securityModels securityNames securityLevelssubTree(s snmpEngines securityModels securityNames securityLevelssubTree((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys delRwUserôscCs t||||ff|ƒdS(N(s addVacmUsers snmpEngines securityModels securityNames securityLevelssubTree(s snmpEngines securityModels securityNames securityLevelssubTree((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys addTrapUserúscCs t||||ff|ƒdS(N(s delVacmUsers snmpEngines securityModels securityNames securityLevelssubTree(s snmpEngines securityModels securityNames securityLevelssubTree((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys delTrapUsersc CsÌ|iiiiddƒ\}|i|ƒ}|iiiiddƒ\}|i|ƒ}dt |ƒ} |o4|iiiiddƒ\} | i| |ƒ}n t} }||||| | |fSdS(NsSNMP-NOTIFICATION-MIBssnmpNotifyEntryssnmpNotifyFilterProfileEntrys %s-filterssnmpNotifyFilterEntry(s snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolsssnmpNotifyEntrysgetInstIdFromIndicessnotificationNamestblIdx1ssnmpNotifyFilterProfileEntrys paramsNamestblIdx2shashs profileNames filterSubtreessnmpNotifyFilterEntrystblIdx3sNone( s snmpEnginesnotificationNames paramsNames filterSubtreessnmpNotifyEntryssnmpNotifyFilterProfileEntrystblIdx2stblIdx3stblIdx1s profileNamessnmpNotifyFilterEntry((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys__cookNotificationTargetInfos cCsÄt||||ƒ\} } } } }} }|i i i| idf| dffƒ|i i i| idf| df| idf| |f| idf| |ffƒ|i i i| idf| dffƒ|i i i| idf| df| idf| |ffƒ| odSn|i i i| idf|dffƒ|i i i| idf|df| idf||f| idf||f| idf||ffƒdS(Nisdestroys createAndGoiii(s__cookNotificationTargetInfos snmpEnginesnotificationNames paramsNames filterSubtreessnmpNotifyEntrystblIdx1ssnmpNotifyFilterProfileEntrystblIdx2s profileNamessnmpNotifyFilterEntrystblIdx3s msgAndPduDspsmibInstrumControllers writeVarssnames transportTags notifyTypes filterMasks filterType(s snmpEnginesnotificationNames paramsNames transportTags notifyTypes filterSubtrees filterMasks filterTypestblIdx3ssnmpNotifyFilterProfileEntryssnmpNotifyEntryssnmpNotifyFilterEntrystblIdx2stblIdx1s profileName((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pysaddNotificationTarget"s**X*A*c Cs¼t||||ƒ\}}}}} } }|i i i|idf|dffƒ|i i i|idf|dffƒ| odSn|i i i| idf|dffƒdS(Nisdestroyi(s__cookNotificationTargetInfos snmpEnginesnotificationNames paramsNames filterSubtreessnmpNotifyEntrystblIdx1ssnmpNotifyFilterProfileEntrystblIdx2s profileNamessnmpNotifyFilterEntrystblIdx3s msgAndPduDspsmibInstrumControllers writeVarssname( s snmpEnginesnotificationNames paramsNames filterSubtreessnmpNotifyEntryssnmpNotifyFilterProfileEntrystblIdx2stblIdx3stblIdx1s profileNamessnmpNotifyFilterEntry((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pysdelNotificationTargetIs ***c Cs•t|dƒt|dddƒt|ddddddtdƒ t|ddddddddƒ t|dddd ddddƒ t|dd d dd d fdƒt|dd d dd d d d d fdƒt|dd d dd d d d dfdƒt|dd d dd d d ddd d f dƒt|dd d dd d d ddd d f dƒt|dd d dd d d ddd d f dƒdS(Nssinitialis noAuthNoPrivsexacts restricteds authNoPrivsinternetsauthPrivsincludediiii i i(s addContexts snmpEngines addVacmGroups addVacmAccesssNones addVacmView(s snmpEngine((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pyssetInitialVacmParametersas    "++11(Qsstringspysnmp.carrier.asynsocksdispatchspysnmp.carrier.asynsock.dgramsudpsudp6sunixssnmpLocalDomains ImportErrors pysnmp.protosrfc3412spysnmp.proto.secmod.rfc3414slocalkeys pysnmp.entitysengines pysnmp.proto.secmod.rfc3414.authshmacmd5shmacshasnoauths pysnmp.proto.secmod.rfc3414.privsdessnoprivs pysnmp.proto.secmod.rfc3826.privsaesspysnmp.smi.errorsNotWritableErrorspysnmpserrors snmpUDPDomainssnmpUDP6DomainsHmacMd5s serviceIDsusmHMACMD5AuthProtocolsHmacShasusmHMACSHAAuthProtocolsNoAuthsusmNoAuthProtocolsDessusmDESPrivProtocolsAessusmAesCfb128ProtocolsNoPrivsusmNoPrivProtocols__cookV1SystemInfosNones addV1Systems delV1Systems__cookV3UserInfos addV3Users delV3Users__cookTargetParamsInfosaddTargetParamssdelTargetParamss__cookTargetAddrInfos addTargetAddrs delTargetAddrsaddSocketTransportsdelSocketTransports addContexts__cookVacmGroupInfos addVacmGroups delVacmGroups__cookVacmAccessInfos addVacmAccesss delVacmAccesss__cookVacmViewInfos addVacmViews delVacmViews__cookVacmUserInfos addVacmUsers delVacmUsers addRoUsers delRoUsers addRwUsers delRwUsers addTrapUsers delTrapUsers__cookNotificationTargetInfosaddNotificationTargetsdelNotificationTargetssetInitialVacmParameters(>s__cookV1SystemInfosaddNotificationTargetsusmNoAuthProtocols addV3UserssnmpUDP6Domains addRwUsers addV1Systems addVacmGroupsusmNoPrivProtocolsdispatchshmacmd5s delVacmGroupsunixssetInitialVacmParameterss delTargetAddrsnoauths__cookV3UserInfosnoprivslocalkeysaddSocketTransports delRoUsersdelSocketTransportsusmHMACMD5AuthProtocolsdelNotificationTargets addVacmUsers addTrapUsersudp6s delVacmViews snmpUDPDomains__cookNotificationTargetInfosaddTargetParamss addTargetAddrsenginesudps delV1Systemsstringshmacshas delTrapUsers delV3Users__cookVacmViewInfosrfc3412ssnmpLocalDomainsNotWritableErrors__cookTargetAddrInfosdelTargetParamssusmDESPrivProtocols delVacmAccesss addContexts__cookTargetParamsInfosaessusmAesCfb128Protocols__cookVacmGroupInfos__cookVacmUserInfos addVacmAccesssusmHMACSHAAuthProtocolsdess addVacmViews delVacmUserserrors addRoUsers delRwUsers__cookVacmAccessInfo((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys?sx                     \    $              ' PK†£=\•=ëë pysnmp/entity/rfc3413/ntforg.pyc;ò {öLc@s°dkZydklZWnej oddfZnXdklZdklZdkl Z dk l Z dk l Z dk lZe id ƒZd fd „ƒYZdS( N(s version_infoi(sconfig(srfc2576(sv2c(serror(snextid(sdebugiÿÿÿsNotificationOriginatorcBs>tZdZd„Zd„Zd„Zeeedd„ZRS(NicCsh|_||_dS(N(sselfs$_NotificationOriginator__pendingReqss snmpContexts _NotificationOriginator__context(sselfs snmpContext((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/ntforg.pys__init__s c Csã| \} }|i| \}}}}}}}}}}}}}}|i| =|iit|ƒƒ| o_titi@otid| | fƒ||joJtiti@otid| |fƒ|i|| d| |ƒdSn|ii||||||||||||it|ƒdt i ƒ| |ffƒ } |ii!t|ƒƒtiti@otid| |||fƒ|||||||||||||d| f|i| ƒ qe|i;i<|| ||||||i i=||||i?t@|ƒd tAiAƒ||ffƒ } titi@otid | |fƒ| ||||||i i=|||||dtEƒf|iF| <|iGiHtI|ƒƒ| SqeWdS( Ns+sendNoification: notifyTag %s notifyType %ss __SNMPv2-MIBs sysUpTimes snmpTrapOIDiisnotifyiiids-sendNoification: sendPduHandle %s, timeout %d(JsconfigsgetNotificationInfos snmpEnginesnotificationTargets notifyTags notifyTypesdebugsloggersflagAppsselfs _NotificationOriginator__contexts getMibInstrums contextNamescontextMibInstrumCtlsgetTargetNamesstargetAddrNames getTargetAddrstransportDomainstransportAddressstimeouts retryCountsparamssgetTargetParamssmessageProcessingModels securityModels securityNames securityLevelsvarBindss mibBuilders importSymbolss sysUpTimesappendsnamessyntaxsclones snmpTrapOidsnotificationNamesadditionalVarBindss version_infoslistsextendsvarNamesvarValsaccessControlModelsacmIDsisAccessAllowedserrorsSmiErrorsv2cs SNMPv2TrapPDUspdusInformRequestPDUs RuntimeErrorsapiPDUs setDefaultss setVarBindssrfc2576sv2ToV1s pduVersions msgAndPduDspssendPduscontextEngineIdsNonesprocessResponsePdusfloatstimescbFunscbCtxs sendPduHandles getNextHandles$_NotificationOriginator__pendingReqsstransportDispatchers jobStartedsid(sselfs snmpEnginesnotificationTargetsnotificationNamesadditionalVarBindsscbFunscbCtxs contextNamestransportAddresss sendPduHandlesvarNamestransportDomainsvarValstargetAddrNames notifyTags snmpTrapOidsvarBindss securityModelsmessageProcessingModels notifyTypesparamss pduVersions sysUpTimescontextMibInstrumCtls securityLevelspdus securityNamestimeouts retryCount((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/ntforg.pyssendNotificationvs‚ (! &             /(@(s__name__s __module__sacmIDs__init__sprocessResponsePdus_handleResponsesNonessendNotification(((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/ntforg.pysNotificationOriginators   Y (stimessyss version_infos ImportErrorspysnmp.entity.rfc3413sconfigspysnmp.proto.proxysrfc2576spysnmp.proto.apisv2cs pysnmp.smiserrorspysnmpsnextidsdebugsIntegers getNextHandlesNotificationOriginator( sv2cs version_infoserrors getNextHandlesNotificationOriginatorsrfc2576stimesdebugsnextidsconfig((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/ntforg.pys?s       PKQjÎ2!pysnmp/entity/rfc3413/__init__.pyPK†£=¹‹ù1?I?I pysnmp/entity/rfc3413/cmdgen.pyc;ò ÒÛMc@sòdkZdkZdklZlZlZdklZdkl Z dk l Z l Z l Z dklZe idƒZd„Zdfd „ƒYZd efd „ƒYZd efd „ƒYZdefd„ƒYZdefd„ƒYZdS(N(srfc1157srfc1905sapi(sconfig(srfc2576(serrorsnextidsdebug(suniviÿÿÿcCs2|djo d}nd}|ti|fSdS(Nii(s snmpVersions pduVersionsapis protoModules(s snmpVersions pduVersion((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdgen.pysgetVersionSpecifics s  sCommandGeneratorBasecBsDtZeidƒZd„Zd„Zeedd„Zd„Z RS(NscCs h|_dS(N(sselfs"_CommandGeneratorBase__pendingReqs(sself((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdgen.pys__init__sc CsÏ| \} }|i| \}}}}}}}}}}}}}}|i| =|iit|ƒƒ| o×titi@otid| | fƒ||joMtiti@otid| |fƒ| || dddf|ƒdSn|i||||||||||||||d||i| |ffƒdSn||jpL||jp?||jp2|o ||jp|o ||jp ||joCtiti@otid| ƒ| |dddf|ƒdSnt"i#|}|i%i&| ƒ|i%i&|ƒjoCtiti@otid| ƒ| |dddf|ƒdSn|djo&t(i)| |ƒ} t"i#t"i*}n|i+||||||||||||||| || |fƒdS( Ns:processResponsePdu: sendPduHandle %s, statusInformation %ss=processResponsePdu: sendPduHandle %s, retry count %d exceededserrorIndicationiisDprocessResponsePdu: sendPduHandle %s, request/response data mismatchs badResponsesEprocessResponsePdu: sendPduHandle %s, request-id/response-id mismatch(,scbFunscbCtxsselfs"_CommandGeneratorBase__pendingReqss sendPduHandlesorigTransportDomainsorigTransportAddresssorigMessageProcessingModelsorigSecurityModelsorigSecurityNamesorigSecurityLevelsorigContextEngineIdsorigContextNamesorigPduVersionsorigPdus origTimeoutsorigRetryCounts origRetriessorigSendRequestHandles snmpEnginestransportDispatchers jobFinishedsidsstatusInformationsdebugsloggersflagApps_sendPdusprocessResponsePdusmessageProcessingModels securityModelscontextEngineIds contextNames pduVersionsapis protoModulesspModsapiPDUs getRequestIDsPDUsrfc2576sv1ToV2sprotoVersion2cs_handleResponse(sselfs snmpEnginesmessageProcessingModels securityModels securityNames securityLevelscontextEngineIds contextNames pduVersionsPDUsstatusInformations sendPduHandles.24scbFunscbCtxsorigMessageProcessingModelsorigPduspModsorigSecurityLevelsorigSecurityNamesorigPduVersionsorigContextEngineIds origRetriessorigSendRequestHandlesorigContextNamesorigRetryCountsorigTransportDomains origTimeoutsorigSecurityModelsorigTransportAddress((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdgen.pysprocessResponsePdusr 7 ( ( \" %"  cCstidƒ‚dS(NsMethod not implemented(serrors PySnmpError(sselfs snmpEnginesaddrNamesvarBindsscbFunscbCtxscontextEngineIds contextName((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdgen.pyssendReqs cCsÛ|\}}|ii||||||||| | | |t| ƒdtiƒ|fƒ }|iit|ƒƒtiti@otid|| || fƒ|||||||| | | | | ||f|i|±scCs-|\}}t|tiƒodfp|S(Ni (sosvs isinstancesunivsNull(s.0sosv((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdgen.pys²siÿÿÿÿs=_handleResponse: sendRequestHandle %s, OID(s) not increasing!soidNotIncreasings?_handleResponse: sendRequestHandle %s, app says to stop walkingcCs|\}}||ifS(N(sxsysselfs_null(s.0sselfsxsy((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdgen.pysÇsi(*scbFunscbCtxspModsapiPDUsgetVarBindTablesPDUsrspPDUs varBindTablesgetErrorStatussNoneserrorIndicationsmaps getVarBindssdebugsloggersflagAppssendRequestHandles getErrorIndexsosvs isinstancesunivsNulls setRequestIDsgetNextRequestIDs setVarBindssselfs_sendPdus snmpEnginestransportDomainstransportAddresssmessageProcessingModels securityModels securityNames securityLevelscontextEngineIds contextNames pduVersionstimeouts retryCounts getNextHandlesprocessResponsePdu(sselfs snmpEnginestransportDomainstransportAddresssmessageProcessingModels securityModels securityNames securityLevelscontextEngineIds contextNames pduVersionsPDUstimeouts retryCountspModsrspPDUssendRequestHandles.34scbFunscbCtxs varBindTableserrorIndicationsosv((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdgen.pys_handleResponse–sL   5 " "  & (s__name__s __module__sNonessendReqs_handleResponse(((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdgen.pysNextCommandGeneratords1sBulkCommandGeneratorcBs#tZeedd„Zd„ZRS(Nsc Csti||ƒ\} } }}}} }}t |ƒ\}} t| dƒ otid| ƒ‚n| iƒ}| ii|ƒ| ii||ƒ| ii||ƒ| ii||ƒtƒ}|i|| | || |||| ||||d||i"||ffƒ|SdS(NsGetBulkRequestPDUsBULK PDU not implemented at %si(%sconfigs getTargetInfos snmpEnginesaddrNamestransportDomainstransportAddressstimeouts retryCountsmessageProcessingModels securityModels securityNames securityLevelsgetVersionSpecificss pduVersionspModshasattrserrors PySnmpErrorsGetBulkRequestPDUsreqPDUs apiBulkPDUs setDefaultsssetNonRepeaterss nonRepeatersssetMaxRepetitionssmaxRepetitionss setVarBindssvarBindss getNextHandles requestHandlesselfs_sendPduscontextEngineIds contextNamesprocessResponsePduscbFunscbCtx(sselfs snmpEnginesaddrNames nonRepeaterssmaxRepetitionssvarBindsscbFunscbCtxscontextEngineIds contextNamestransportAddressspModstransportDomains securityModelsmessageProcessingModels pduVersions securityLevelsreqPDUs securityNames requestHandlestimeouts retryCount((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdgen.pyssendReqÞs6 *    cCsÝ|\}}|ii| |ƒ}|ii|ƒo t }nz| o d}nht d„|ii | ƒƒt d„|dƒjo t }n)t it i@ot id|ƒd}||||ii|ƒ|ii|ƒ||ƒ o*t it i@ot id|ƒdSn|ii| |iƒƒx5|dD]%\}}t|tiƒ oPq:q:WdS|ii| t |d„|dƒƒ|i||||||||| | | | | d t(ƒ|i)||ffƒdS( Ns emptyResponsecCs|\}}|S(N(sosv(s.0sosv((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdgen.pys1scCs-|\}}t|tiƒodfp|S(Ni (sosvs isinstancesunivsNull(s.0sosv((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdgen.pys2siÿÿÿÿs=_handleResponse: sendRequestHandle %s, OID(s) not increasing!soidNotIncreasings?_handleResponse: sendRequestHandle %s, app says to stop walkingcCs|\}}||ifS(N(sxsysselfs_null(s.0sselfsxsy((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdgen.pysHsi(*scbFunscbCtxspMods apiBulkPDUsgetVarBindTablesPDUsrspPDUs varBindTablesgetErrorStatussNoneserrorIndicationsmaps getVarBindssdebugsloggersflagAppssendRequestHandles getErrorIndexs setRequestIDsgetNextRequestIDsosvs isinstancesunivsNulls setVarBindssselfs_sendPdus snmpEnginestransportDomainstransportAddresssmessageProcessingModels securityModels securityNames securityLevelscontextEngineIds contextNames pduVersionstimeouts retryCounts getNextHandlesprocessResponsePdu(sselfs snmpEnginestransportDomainstransportAddresssmessageProcessingModels securityModels securityNames securityLevelscontextEngineIds contextNames pduVersionsPDUstimeouts retryCountspModsrspPDUssendRequestHandles.34scbFunscbCtxs varBindTableserrorIndicationsosv((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdgen.pys_handleResponsesL   5 " "  & (s__name__s __module__sNonessendReqs_handleResponse(((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdgen.pysBulkCommandGeneratorÝs8(stypesstimes pysnmp.protosrfc1157srfc1905sapispysnmp.entity.rfc3413sconfigspysnmp.proto.proxysrfc2576spysnmpserrorsnextidsdebugs pyasn1.typesunivsIntegers getNextHandlesgetVersionSpecificssCommandGeneratorBasesGetCommandGeneratorsSetCommandGeneratorsNextCommandGeneratorsBulkCommandGenerator(sBulkCommandGeneratorserrorsNextCommandGeneratorsunivsrfc1905s getNextHandlesrfc2576sgetVersionSpecificssapisCommandGeneratorBasestimesdebugsSetCommandGeneratorsrfc1157sconfigsnextidstypessGetCommandGenerator((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdgen.pys?s    ´MRyPK†£=›ÇàÞé5é5 pysnmp/entity/rfc3413/cmdrsp.pyc;ò ©öLc@sÄdklZlZlZlZlZdklZdkl Z dk Z dk l Z dfd„ƒYZ de fd„ƒYZd e fd „ƒYZd e fd „ƒYZd e fd„ƒYZdS((srfc1157srfc1902srfc1905srfc3411serror(sv2c(srfc2576N(sdebugsCommandResponderBasecBsztZdZfZd„Zd„Zd„Zd„Zei i Z ei i Z eii Zeii Zd„Zd„ZRS(NicCs5|ii|i|i|iƒ||_h|_dS(N( s snmpEngines msgAndPduDspsregisterContextEngineIds snmpContextscontextEngineIdsselfspduTypess processPdus"_CommandResponderBase__pendingReqs(sselfs snmpEngines snmpContext((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdrsp.pys__init__ s cCs|\}}dS(N(sacFunsacCtx(sselfs snmpEnginesstateReferences contextNamesPDUs.10sacFunsacCtx((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdrsp.pyshandleMgmtOperations cCs |ii|ii|iƒdS(N(s snmpEngines msgAndPduDspsunregisterContextEngineIdsselfs snmpContextscontextEngineIdspduTypes(sselfs snmpEngine((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdrsp.pysclosesc Csl|i|\ } }}}} } }}}} }|i|=titi@otid||||fƒtii||ƒtii||ƒtii||ƒ| djoti||ƒ}ny5|ii|| |||| | ||| ||ƒ Wnntij o_}titi@otid||fƒ|ii!i"i#ddƒ\} | i%d| _%nXdS(NsFsendRsp: stateReference %s, errorStatus %s, errorIndex %s, varBinds %sis0sendRsp: stateReference %s, statusInformation %ss __SNMPv2-MIBssnmpSilentDropsi(&sselfs"_CommandResponderBase__pendingReqssstateReferencesmessageProcessingModels securityModels securityNames securityLevelscontextEngineIds contextNames pduVersionsPDUsorigPdusmaxSizeResponseScopedPDUsstatusInformationsdebugsloggersflagApps errorStatuss errorIndexsvarBindssv2csapiPDUssetErrorStatuss setErrorIndexs setVarBindssrfc2576sv2ToV1s snmpEngines msgAndPduDspsreturnResponsePduserrorsStatusInformationswhysmibInstrumControllers mibBuilders importSymbolsssnmpSilentDropsssyntax(sselfs snmpEnginesstateReferences errorStatuss errorIndexsvarBindssorigPdusstatusInformations securityModelscontextEngineIdsmessageProcessingModelsmaxSizeResponseScopedPDUs contextNamessnmpSilentDropssPDUs pduVersionswhys securityLevels securityName((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdrsp.pyssendRsps2. .   (c  CsÄ|djo| } ti| ƒ} nt} tii| i ƒ oti i| i ƒ ot i d| i ƒ‚nt ii| ƒ}h}||||||||| | |f |i| <|||||| iƒf}t ii| ƒ}ddf\}} t#i$t#i%@ot#i$d| |fƒy&|i&|| || |i'|fƒWnVt(i)i i*j oa}t#i$t#i%@ot#i$d| |fƒ|idƒo |d|d<|d|d2>2pysnmp/entity/rfc3413/cmdrsp.pyfrom pysnmp.proto import rfc1157, rfc1902, rfc1905, rfc3411, error from pysnmp.proto.api import v2c # backend is always SMIv2 compliant from pysnmp.proto.proxy import rfc2576 import pysnmp.smi.error from pysnmp import debug # 3.2 class CommandResponderBase: acmID = 3 # default MIB access control method to use pduTypes = () def __init__(self, snmpEngine, snmpContext): snmpEngine.msgAndPduDsp.registerContextEngineId( snmpContext.contextEngineId, self.pduTypes, self.processPdu ) self.snmpContext = snmpContext # for unregistration self.__pendingReqs = {} def handleMgmtOperation( self, snmpEngine, stateReference, contextName, PDU, (acFun, acCtx) ): pass def close(self, snmpEngine): snmpEngine.msgAndPduDsp.unregisterContextEngineId( self.snmpContext.contextEngineId, self.pduTypes ) def sendRsp(self, snmpEngine, stateReference, errorStatus, errorIndex, varBinds): ( messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, PDU, origPdu, maxSizeResponseScopedPDU, statusInformation ) = self.__pendingReqs[stateReference] del self.__pendingReqs[stateReference] debug.logger & debug.flagApp and debug.logger('sendRsp: stateReference %s, errorStatus %s, errorIndex %s, varBinds %s' % (stateReference, errorStatus, errorIndex, varBinds)) v2c.apiPDU.setErrorStatus(PDU, errorStatus) v2c.apiPDU.setErrorIndex(PDU, errorIndex) v2c.apiPDU.setVarBinds(PDU, varBinds) # Agent-side API complies with SMIv2 if messageProcessingModel == 0: PDU = rfc2576.v2ToV1(PDU, origPdu) # 3.2.6 try: snmpEngine.msgAndPduDsp.returnResponsePdu( snmpEngine, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, PDU, maxSizeResponseScopedPDU, stateReference, statusInformation ) except error.StatusInformation, why: debug.logger & debug.flagApp and debug.logger('sendRsp: stateReference %s, statusInformation %s' % (stateReference, why)) snmpSilentDrops, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMPv2-MIB', 'snmpSilentDrops') snmpSilentDrops.syntax = snmpSilentDrops.syntax + 1 _getRequestType = rfc1905.GetRequestPDU.tagSet _getNextRequestType = rfc1905.GetNextRequestPDU.tagSet _setRequestType = rfc1905.SetRequestPDU.tagSet _counter64Type = rfc1902.Counter64.tagSet def processPdu( self, snmpEngine, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, PDU, maxSizeResponseScopedPDU, stateReference ): # Agent-side API complies with SMIv2 if messageProcessingModel == 0: origPdu = PDU PDU = rfc2576.v1ToV2(PDU) else: origPdu = None # 3.2.1 if not rfc3411.readClassPDUs.has_key(PDU.tagSet) and \ not rfc3411.writeClassPDUs.has_key(PDU.tagSet): raise error.ProtocolError('Unexpected PDU class %s' % PDU.tagSet) # 3.2.2 --> no-op # 3.2.4 rspPDU = v2c.apiPDU.getResponse(PDU) statusInformation = {} self.__pendingReqs[stateReference] = ( messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, rspPDU, origPdu, maxSizeResponseScopedPDU, statusInformation ) acCtx = ( snmpEngine, securityModel, securityName, securityLevel, contextName, PDU.getTagSet() ) # 3.2.5 varBinds = v2c.apiPDU.getVarBinds(PDU) errorStatus, errorIndex = 'noError', 0 debug.logger & debug.flagApp and debug.logger('processPdu: stateReference %s, varBinds %s' % (stateReference, varBinds)) try: self.handleMgmtOperation( snmpEngine, stateReference, contextName, PDU, (self.__verifyAccess, acCtx) ) # SNMPv2 SMI exceptions except pysnmp.smi.error.GenError, errorIndication: debug.logger & debug.flagApp and debug.logger('processPdu: stateReference %s, errorIndication %s' % (stateReference, errorIndication)) if errorIndication.has_key('oid'): # Request REPORT generation statusInformation['oid'] = errorIndication['oid'] statusInformation['val'] = errorIndication['val'] # PDU-level SMI errors except pysnmp.smi.error.NoAccessError, errorIndication: errorStatus, errorIndex = 'noAccess', errorIndication['idx'] + 1 except pysnmp.smi.error.WrongTypeError, errorIndication: errorStatus, errorIndex = 'wrongType', errorIndication['idx'] + 1 except pysnmp.smi.error.WrongValueError, errorIndication: errorStatus, errorIndex = 'wrongValue', errorIndication['idx'] + 1 except pysnmp.smi.error.NoCreationError, errorIndication: errorStatus, errorIndex = 'noCreation', errorIndication['idx'] + 1 except pysnmp.smi.error.InconsistentValueError, errorIndication: errorStatus, errorIndex = 'inconsistentValue', errorIndication['idx'] + 1 except pysnmp.smi.error.ResourceUnavailableError, errorIndication: errorStatus, errorIndex = 'resourceUnavailable', errorIndication['idx'] + 1 except pysnmp.smi.error.CommitFailedError, errorIndication: errorStatus, errorIndex = 'commitFailedError', errorIndication['idx'] + 1 except pysnmp.smi.error.UndoFailedError, errorIndication: errorStatus, errorIndex = 'undoFailedError', errorIndication['idx'] + 1 except pysnmp.smi.error.AuthorizationError, errorIndication: errorStatus, errorIndex = 'authorizationError', errorIndication['idx'] + 1 except pysnmp.smi.error.NotWritableError, errorIndication: errorStatus, errorIndex = 'notWritable', errorIndication['idx'] + 1 except pysnmp.smi.error.InconsistentNameError, errorIndication: errorStatus, errorIndex = 'inconsistentName', errorIndication['idx'] + 1 except pysnmp.smi.error.SmiError, errorIndication: errorStatus, errorIndex = 'genErr', len(varBinds) and 1 or 0 except pysnmp.error.PySnmpError, errorIndication: errorStatus, errorIndex = 'genErr', len(varBinds) and 1 or 0 else: return self.sendRsp( snmpEngine, stateReference, errorStatus, errorIndex, varBinds ) def __verifyAccess(self, name, syntax, idx, viewType, (snmpEngine, securityModel, securityName, securityLevel, contextName, pduType) ): try: snmpEngine.accessControlModel[self.acmID].isAccessAllowed( snmpEngine, securityModel, securityName, securityLevel, viewType, contextName, name ) # Map ACM errors onto SMI ones except error.StatusInformation, statusInformation: debug.logger & debug.flagApp and debug.logger('__verifyAccess: name %s, statusInformation %s' % (name, statusInformation)) errorIndication = statusInformation['errorIndication'] # 3.2.5... if errorIndication == 'noSuchView' or \ errorIndication == 'noAccessEntry' or \ errorIndication == 'noGroupName': raise pysnmp.smi.error.AuthorizationError( name=name, idx=idx ) elif errorIndication == 'otherError': raise pysnmp.smi.error.GenError(name=name, idx=idx) elif errorIndication == 'noSuchContext': snmpUnknownContexts, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-TARGET-MIB', 'snmpUnknownContexts') snmpUnknownContexts.syntax = snmpUnknownContexts.syntax + 1 # Request REPORT generation raise pysnmp.smi.error.GenError( name=name, idx=idx, oid=snmpUnknownContexts.name, val=snmpUnknownContexts.syntax ) elif errorIndication == 'notInView': return 1 else: raise error.ProtocolError( 'Unknown ACM error %s' % errorIndication ) else: # rfc2576: 4.1.2.1 if securityModel == 1 and \ syntax is not None and \ self._counter64Type == syntax.getTagSet() and \ self._getNextRequestType == pduType: # This will cause MibTree to skip this OID-value raise pysnmp.smi.error.NoAccessError(name=name, idx=idx) class GetCommandResponder(CommandResponderBase): pduTypes = ( rfc1905.GetRequestPDU.tagSet, ) # rfc1905: 4.2.1 def handleMgmtOperation( self, snmpEngine, stateReference, contextName, PDU, (acFun, acCtx) ): # rfc1905: 4.2.1.1 mgmtFun = self.snmpContext.getMibInstrum(contextName).readVars self.sendRsp( snmpEngine, stateReference, 0, 0, mgmtFun( v2c.apiPDU.getVarBinds(PDU), (acFun, acCtx) ) ) class NextCommandResponder(CommandResponderBase): pduTypes = ( rfc1905.GetNextRequestPDU.tagSet, ) # rfc1905: 4.2.2 def handleMgmtOperation( self, snmpEngine, stateReference, contextName, PDU, (acFun, acCtx) ): # rfc1905: 4.2.2.1 mgmtFun = self.snmpContext.getMibInstrum(contextName).readNextVars self.sendRsp( snmpEngine, stateReference, 0, 0, mgmtFun( v2c.apiPDU.getVarBinds(PDU), (acFun, acCtx) ) ) class BulkCommandResponder(CommandResponderBase): pduTypes = ( rfc1905.GetBulkRequestPDU.tagSet, ) maxVarBinds = 64 # rfc1905: 4.2.3 def handleMgmtOperation( self, snmpEngine, stateReference, contextName, PDU, (acFun, acCtx) ): nonRepeaters = v2c.apiBulkPDU.getNonRepeaters(PDU) if nonRepeaters < 0: nonRepeaters = 0 maxRepetitions = v2c.apiBulkPDU.getMaxRepetitions(PDU) if maxRepetitions < 0: maxRepetitions = 0 reqVarBinds = v2c.apiPDU.getVarBinds(PDU) N = min(int(nonRepeaters), len(reqVarBinds)) M = int(maxRepetitions) R = max(len(reqVarBinds)-N, 0) if R: M = min(M, self.maxVarBinds/R) debug.logger & debug.flagApp and debug.logger('handleMgmtOperation: N %d, M %d, R %d' % (N, M, R)) mgmtFun = self.snmpContext.getMibInstrum(contextName).readNextVars if N: rspVarBinds = mgmtFun(reqVarBinds[:N], (acFun, acCtx)) else: rspVarBinds = [] varBinds = reqVarBinds[-R:] while M and R: rspVarBinds.extend( mgmtFun(varBinds, (acFun, acCtx)) ) varBinds = rspVarBinds[-R:] M = M - 1 if len(rspVarBinds): self.sendRsp( snmpEngine, stateReference, 0, 0, rspVarBinds ) else: raise pysnmp.smi.error.SmiError() class SetCommandResponder(CommandResponderBase): pduTypes = ( rfc1905.SetRequestPDU.tagSet, ) # rfc1905: 4.2.5 def handleMgmtOperation( self, snmpEngine, stateReference, contextName, PDU, (acFun, acCtx) ): mgmtFun = self.snmpContext.getMibInstrum(contextName).writeVars # rfc1905: 4.2.5.1-13 try: self.sendRsp( snmpEngine, stateReference, 0, 0, mgmtFun( v2c.apiPDU.getVarBinds(PDU), (acFun, acCtx) ) ) except ( pysnmp.smi.error.NoSuchObjectError, pysnmp.smi.error.NoSuchInstanceError ), errorIndication: e = pysnmp.smi.error.NotWritableError() e.update(errorIndication) raise e PKPw7=_£î!MMpysnmp/entity/rfc3413/ntfrcv.pyfrom pysnmp.proto import rfc3411, error from pysnmp.proto.api import v1, v2c # backend is always SMIv2 compliant from pysnmp.proto.proxy import rfc2576 from pysnmp import debug # 3.4 class NotificationReceiver: pduTypes = ( v1.TrapPDU.tagSet, v2c.SNMPv2TrapPDU.tagSet, v2c.InformRequestPDU.tagSet ) def __init__(self, snmpEngine, cbFun, cbCtx=None): snmpEngine.msgAndPduDsp.registerContextEngineId( '', self.pduTypes, self.processPdu # '' is a wildcard ) self.__cbFunVer = 0 self.__cbFun = cbFun self.__cbCtx = cbCtx def close(self, snmpEngine): snmpEngine.msgAndPduDsp.unregisterContextEngineId( '', self.pduTypes ) def processPdu( self, snmpEngine, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, PDU, maxSizeResponseScopedPDU, stateReference ): # Agent-side API complies with SMIv2 if messageProcessingModel == 0: origPdu = PDU PDU = rfc2576.v1ToV2(PDU) else: origPdu = None errorStatus = 'noError'; errorIndex = 0 varBinds = v2c.apiPDU.getVarBinds(PDU) debug.logger & debug.flagApp and debug.logger('processPdu: stateReference %s, varBinds %s' % (stateReference, varBinds)) # 3.4 if rfc3411.confirmedClassPDUs.has_key(PDU.tagSet): # 3.4.1 --> no-op rspPDU = v2c.apiPDU.getResponse(PDU) # 3.4.2 v2c.apiPDU.setErrorStatus(rspPDU, errorStatus) v2c.apiPDU.setErrorIndex(rspPDU, errorIndex) v2c.apiPDU.setVarBinds(rspPDU, varBinds) debug.logger & debug.flagApp and debug.logger('processPdu: stateReference %s, confirm PDU %s' % (stateReference, rspPDU.prettyPrint())) # Agent-side API complies with SMIv2 if messageProcessingModel == 0: rspPDU = rfc2576.v2ToV1(rspPDU, origPdu) statusInformation = {} # 3.4.3 try: snmpEngine.msgAndPduDsp.returnResponsePdu( snmpEngine, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, rspPDU, maxSizeResponseScopedPDU, stateReference, statusInformation ) except error.StatusInformation, why: debug.logger & debug.flagApp and debug.logger('processPdu: stateReference %s, statusInformation %s' % (stateReference, why)) snmpSilentDrops, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMPv2-MIB', 'snmpSilentDrops') snmpSilentDrops.syntax = snmpSilentDrops.syntax + 1 elif rfc3411.unconfirmedClassPDUs.has_key(PDU.tagSet): pass else: raise error.ProtocolError('Unexpected PDU class %s' % PDU.tagSet) debug.logger & debug.flagApp and debug.logger('processPdu: stateReference %s, user cbFun %s, cbCtx %s, varBinds %s' % (stateReference, self.__cbFun, self.__cbCtx, varBinds)) if self.__cbFunVer: self.__cbFun( snmpEngine, stateReference, contextEngineId, contextName, varBinds, self.__cbCtx ) else: # Compatibility stub (handle legacy cbFun interface) try: self.__cbFun( snmpEngine, contextEngineId, contextName, varBinds, self.__cbCtx ) except TypeError: self.__cbFunVer = 1 self.__cbFun( snmpEngine, stateReference, contextEngineId, contextName, varBinds, self.__cbCtx ) PK†£=Cwø ! ! pysnmp/entity/rfc3413/mibvar.pyc;ò »nüDc@sTdkZdklZdklZd„ZeidƒfZd„Zd„Z dS(N(suniv(sNoSuchObjectErrorc Csnt|dƒtijo.tddd„|dƒ\}}|o|ii |ƒn|ii ƒ|o|i ||ƒ\}}} n|i|ƒ\}}} |d} |i|ƒ\}}}|ii||ƒ\}t|dƒoN|i|d ƒ\}}}|ii||ƒ\}|t|i| ƒfSqj|| fSn#|i|ƒ\}}} || fSdS(NiscCs ||fS(N(sxsy(sxsy((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/mibvar.pys sis createTestiÿÿÿÿ(stypesnamestypess TupleTypesapplysmodNamessymNamesmibViews mibBuilders loadModulessgetNodeNameByDescsoidslabelssuffixsgetFirstNodeNamesgetNodeLocations_ss importSymbolssmibNodeshasattrsrowNodesgetInstIdFromIndicessgetNodeNameByOid( smibViewsnamesmodNamesoidssymNames_sslabelsrowNodesmibNodessuffix((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/mibvar.pys mibNameToOids$"  ic Cs|it|ƒƒ\} }}|i| ƒ\}}} |i i ||ƒ\} t| dƒoQ|i| d ƒ\}}}|i i ||ƒ\} ||f| i|ƒfSn]| o||f|fSnA|dfjo||ftfSntdd|| ifƒ‚dS(Ns createTestiÿÿÿÿisstrs&No MIB info for %s (closest parent %s)(smibViewsgetNodeNameByOidstuplesoids_oidslabelssuffixsgetNodeLocationsmodNamessymNames__suffixs mibBuilders importSymbolssmibNodeshasattrs __modNames __symNames__ssrowNodesgetIndicesFromInstIds__scalarSuffixsNoSuchObjectErrorsname( smibViewsoidsmodNamessymNamessuffixslabels __modNames __symNames__ssrowNodes__suffixsmibNodes_oid((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/mibvar.pys oidToMibName$scCsD|ii||ƒ\}t|dƒo|ii|ƒSndSdS(Nssyntax( smibViews mibBuilders importSymbolssmodNamessymNamesmibNodeshasattrssyntaxsclonesvalue(smibViewsmodNamessymNamesvaluesmibNode((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/mibvar.pyscloneFromMibValue:s( stypess pyasn1.typesunivspysnmp.smi.errorsNoSuchObjectErrors mibNameToOidsIntegers__scalarSuffixs oidToMibNamescloneFromMibValue(s__scalarSuffixs oidToMibNamescloneFromMibValuesNoSuchObjectErrorstypessunivs mibNameToOid((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/mibvar.pys?s     PK†£=\ºqGG pysnmp/entity/rfc3413/ntfrcv.pyc;ò Ù2›Lc@sWdklZlZdklZlZdklZdkl Z dfd„ƒYZ dS((srfc3411serror(sv1sv2c(srfc2576(sdebugsNotificationReceivercBsGtZeiieiieiifZe d„Z d„Z d„Z RS(NcCs;|iid|i|iƒd|_||_||_ dS(Nsi( s snmpEngines msgAndPduDspsregisterContextEngineIdsselfspduTypess processPdus_NotificationReceiver__cbFunVerscbFuns_NotificationReceiver__cbFunscbCtxs_NotificationReceiver__cbCtx(sselfs snmpEnginescbFunscbCtx((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/ntfrcv.pys__init__s  cCs|iid|iƒdS(Ns(s snmpEngines msgAndPduDspsunregisterContextEngineIdsselfspduTypes(sselfs snmpEngine((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/ntfrcv.pysclosesc  CsÇ|djo| } ti| ƒ} nt} d}d} ti i | ƒ}t i t i@ot i d| |fƒtii| iƒoLti i| ƒ}ti i||ƒti i|| ƒti i||ƒt i t i@ot i d| |iƒfƒ|djoti|| ƒ}nh}y5|ii|||||||||| | |ƒ Wqt&i'j o_}t i t i@ot i d| |fƒ|ii)i*i+ddƒ\}|i-d|_-qXn1ti.i| iƒont&i/d | iƒ‚t i t i@o#t i d | |i1|i2|fƒ|i3o#|i1|| ||||i2ƒn_y |i1|||||i2ƒWn;t4j o/d|_3|i1|| ||||i2ƒnXdS( NisnoErrors*processPdu: stateReference %s, varBinds %ss-processPdu: stateReference %s, confirm PDU %ss3processPdu: stateReference %s, statusInformation %ss __SNMPv2-MIBssnmpSilentDropsisUnexpected PDU class %ssCprocessPdu: stateReference %s, user cbFun %s, cbCtx %s, varBinds %s(5smessageProcessingModelsPDUsorigPdusrfc2576sv1ToV2sNones errorStatuss errorIndexsv2csapiPDUs getVarBindssvarBindssdebugsloggersflagAppsstateReferencesrfc3411sconfirmedClassPDUsshas_keystagSets getResponsesrspPDUssetErrorStatuss setErrorIndexs setVarBindss prettyPrintsv2ToV1sstatusInformations snmpEngines msgAndPduDspsreturnResponsePdus securityModels securityNames securityLevelscontextEngineIds contextNames pduVersionsmaxSizeResponseScopedPDUserrorsStatusInformationswhysmibInstrumControllers mibBuilders importSymbolsssnmpSilentDropsssyntaxsunconfirmedClassPDUss ProtocolErrorsselfs_NotificationReceiver__cbFuns_NotificationReceiver__cbCtxs_NotificationReceiver__cbFunVers TypeError(sselfs snmpEnginesmessageProcessingModels securityModels securityNames securityLevelscontextEngineIds contextNames pduVersionsPDUsmaxSizeResponseScopedPDUsstateReferences errorIndexsorigPdusstatusInformations errorStatussvarBindsssnmpSilentDropsswhysrspPDU((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/ntfrcv.pys processPdus^  (.   (4  ( s__name__s __module__sv1sTrapPDUstagSetsv2cs SNMPv2TrapPDUsInformRequestPDUspduTypessNones__init__scloses processPdu(((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/ntfrcv.pysNotificationReceivers!  N( s pysnmp.protosrfc3411serrorspysnmp.proto.apisv1sv2cspysnmp.proto.proxysrfc2576spysnmpsdebugsNotificationReceiver(srfc2576sNotificationReceiversv2csv1serrorsdebugsrfc3411((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/ntfrcv.pys?s  PK†£=‰²o'ŒŒ"pysnmp/entity/rfc3413/__init__.pyc;ò ë ®Bc@sdS(N((((s<build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/__init__.pys?sPK÷\=‘k$órErEpysnmp/entity/rfc3413/cmdgen.pyimport types, time from pysnmp.proto import rfc1157, rfc1905, api from pysnmp.entity.rfc3413 import config from pysnmp.proto.proxy import rfc2576 from pysnmp import error, nextid, debug from pyasn1.type import univ getNextHandle = nextid.Integer(0x7fffffff) def getVersionSpecifics(snmpVersion): if snmpVersion == 0: pduVersion = 0 else: pduVersion = 1 return pduVersion, api.protoModules[pduVersion] class CommandGeneratorBase: _null = univ.Null('') def __init__(self): self.__pendingReqs = {} def processResponsePdu( self, snmpEngine, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, PDU, statusInformation, sendPduHandle, (cbFun, cbCtx) ): # 3.1.1 ( origTransportDomain, origTransportAddress, origMessageProcessingModel, origSecurityModel, origSecurityName, origSecurityLevel, origContextEngineId, origContextName, origPduVersion, origPdu, origTimeout, origRetryCount, origRetries, origSendRequestHandle ) = self.__pendingReqs[sendPduHandle] del self.__pendingReqs[sendPduHandle] snmpEngine.transportDispatcher.jobFinished(id(self)) # 3.1.3 if statusInformation: debug.logger & debug.flagApp and debug.logger('processResponsePdu: sendPduHandle %s, statusInformation %s' % (sendPduHandle, statusInformation)) if origRetries == origRetryCount: debug.logger & debug.flagApp and debug.logger('processResponsePdu: sendPduHandle %s, retry count %d exceeded' % (sendPduHandle, origRetries)) cbFun(origSendRequestHandle, statusInformation['errorIndication'], 0, 0, (), cbCtx) return self._sendPdu( snmpEngine, origTransportDomain, origTransportAddress, origMessageProcessingModel, origSecurityModel, origSecurityName, origSecurityLevel, origContextEngineId, origContextName, origPduVersion, origPdu, origTimeout, origRetryCount, origRetries + 1, origSendRequestHandle, (self.processResponsePdu, (cbFun, cbCtx)) ) return if origMessageProcessingModel != messageProcessingModel or \ origSecurityModel != securityModel or \ origSecurityName != origSecurityName or \ origContextEngineId and origContextEngineId != contextEngineId or \ origContextName and origContextName != contextName or \ origPduVersion != pduVersion: debug.logger & debug.flagApp and debug.logger('processResponsePdu: sendPduHandle %s, request/response data mismatch' % sendPduHandle) cbFun(origSendRequestHandle, 'badResponse', 0, 0, (), cbCtx) return pMod = api.protoModules[pduVersion] # 3.1.2 if pMod.apiPDU.getRequestID(PDU) != pMod.apiPDU.getRequestID(origPdu): debug.logger & debug.flagApp and debug.logger('processResponsePdu: sendPduHandle %s, request-id/response-id mismatch' % sendPduHandle) cbFun(origSendRequestHandle, 'badResponse', 0, 0, (), cbCtx) return # User-side API assumes SMIv2 if messageProcessingModel == 0: PDU = rfc2576.v1ToV2(PDU, origPdu) pMod = api.protoModules[api.protoVersion2c] self._handleResponse( snmpEngine, origTransportDomain, origTransportAddress, origMessageProcessingModel, origSecurityModel, origSecurityName, origSecurityLevel, origContextEngineId, origContextName, origPduVersion, origPdu, origTimeout, origRetryCount, pMod, PDU, origSendRequestHandle, (cbFun, cbCtx), ) def sendReq( self, snmpEngine, addrName, varBinds, cbFun, cbCtx=None, contextEngineId=None, contextName='' ): raise error.PySnmpError('Method not implemented') def _sendPdu( self, snmpEngine, transportDomain, transportAddress, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, reqPDU, timeout, retryCount, retries, sendRequestHandle, (processResponsePdu, cbCtx) ): # 3.1 sendPduHandle = snmpEngine.msgAndPduDsp.sendPdu( snmpEngine, transportDomain, transportAddress, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, reqPDU, (processResponsePdu, float(timeout)/100 + time.time(), cbCtx) ) snmpEngine.transportDispatcher.jobStarted(id(self)) debug.logger & debug.flagApp and debug.logger('_sendPdu: sendPduHandle %s, timeout %d, retry %d of %d' % (sendPduHandle, timeout, retries, retryCount)) self.__pendingReqs[sendPduHandle] = ( transportDomain, transportAddress, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, reqPDU, timeout, retryCount, retries, sendRequestHandle, ) class GetCommandGenerator(CommandGeneratorBase): def sendReq( self, snmpEngine, addrName, varBinds, cbFun, cbCtx=None, contextEngineId=None, contextName='' ): ( transportDomain, transportAddress, timeout, retryCount, messageProcessingModel, securityModel, securityName, securityLevel ) = config.getTargetInfo(snmpEngine, addrName) pduVersion, pMod = getVersionSpecifics(messageProcessingModel) reqPDU = pMod.GetRequestPDU() pMod.apiPDU.setDefaults(reqPDU) pMod.apiPDU.setVarBinds(reqPDU, varBinds) requestHandle = getNextHandle() self._sendPdu( snmpEngine, transportDomain, transportAddress, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, reqPDU, timeout, retryCount, 0, requestHandle, (self.processResponsePdu, (cbFun, cbCtx)) ) return requestHandle def _handleResponse( self, snmpEngine, transportDomain, transportAddress, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, PDU, timeout, retryCount, pMod, rspPDU, sendRequestHandle, (cbFun, cbCtx) ): cbFun(sendRequestHandle, None, pMod.apiPDU.getErrorStatus(rspPDU), pMod.apiPDU.getErrorIndex(rspPDU), pMod.apiPDU.getVarBinds(rspPDU), cbCtx) class SetCommandGenerator(CommandGeneratorBase): def sendReq( self, snmpEngine, addrName, varBinds, cbFun, cbCtx=None, contextEngineId=None, contextName='' ): ( transportDomain, transportAddress, timeout, retryCount, messageProcessingModel, securityModel, securityName, securityLevel ) = config.getTargetInfo(snmpEngine, addrName) pduVersion, pMod = getVersionSpecifics(messageProcessingModel) reqPDU = pMod.SetRequestPDU() pMod.apiPDU.setDefaults(reqPDU) pMod.apiPDU.setVarBinds(reqPDU, varBinds) # User-side API assumes SMIv2 if messageProcessingModel == 0: reqPDU = rfc2576.v2ToV1(reqPDU) pMod = api.protoModules[api.protoVersion1] requestHandle = getNextHandle() self._sendPdu( snmpEngine, transportDomain, transportAddress, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, reqPDU, timeout, retryCount, 0, requestHandle, (self.processResponsePdu, (cbFun, cbCtx)) ) return requestHandle def _handleResponse( self, snmpEngine, transportDomain, transportAddress, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, PDU, timeout, retryCount, pMod, rspPDU, sendRequestHandle, (cbFun, cbCtx) ): cbFun(sendRequestHandle, None, pMod.apiPDU.getErrorStatus(rspPDU), pMod.apiPDU.getErrorIndex(rspPDU), pMod.apiPDU.getVarBinds(rspPDU), cbCtx) class NextCommandGenerator(CommandGeneratorBase): def sendReq( self, snmpEngine, addrName, varBinds, cbFun, cbCtx=None, contextEngineId=None, contextName='' ): ( transportDomain, transportAddress, timeout, retryCount, messageProcessingModel, securityModel, securityName, securityLevel ) = config.getTargetInfo(snmpEngine, addrName) pduVersion, pMod = getVersionSpecifics(messageProcessingModel) reqPDU = pMod.GetNextRequestPDU() pMod.apiPDU.setDefaults(reqPDU) pMod.apiPDU.setVarBinds(reqPDU, varBinds) requestHandle = getNextHandle() self._sendPdu( snmpEngine, transportDomain, transportAddress, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, reqPDU, timeout, retryCount, 0, requestHandle, (self.processResponsePdu, (cbFun, cbCtx)) ) return requestHandle def _handleResponse( self, snmpEngine, transportDomain, transportAddress, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, PDU, timeout, retryCount, pMod, rspPDU, sendRequestHandle, (cbFun, cbCtx) ): varBindTable = pMod.apiPDU.getVarBindTable(PDU, rspPDU) if pMod.apiPDU.getErrorStatus(rspPDU): errorIndication = None elif not varBindTable: errorIndication = 'emptyResponse' else: if map(lambda (o,v): o, pMod.apiPDU.getVarBinds(PDU)) < \ map(lambda (o,v): isinstance(v, univ.Null) and (9,) or o,varBindTable[-1]): errorIndication = None else: debug.logger & debug.flagApp and debug.logger('_handleResponse: sendRequestHandle %s, OID(s) not increasing!' % sendRequestHandle) errorIndication = 'oidNotIncreasing' if not cbFun(sendRequestHandle, errorIndication, pMod.apiPDU.getErrorStatus(rspPDU), pMod.apiPDU.getErrorIndex(rspPDU), varBindTable, cbCtx): debug.logger & debug.flagApp and debug.logger('_handleResponse: sendRequestHandle %s, app says to stop walking' % sendRequestHandle) return # app says enough for o, v in varBindTable[-1]: if not isinstance(v, univ.Null): break else: return # no more objects available pMod.apiPDU.setRequestID(PDU, pMod.getNextRequestID()) pMod.apiPDU.setVarBinds( PDU, map(lambda (x,y),self=self: (x,self._null), varBindTable[-1]) ) self._sendPdu( snmpEngine, transportDomain, transportAddress, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, PDU, timeout, retryCount, 0, getNextHandle(), (self.processResponsePdu, (cbFun, cbCtx)) ) class BulkCommandGenerator(CommandGeneratorBase): def sendReq( self, snmpEngine, addrName, nonRepeaters, maxRepetitions, varBinds, cbFun, cbCtx=None, contextEngineId=None, contextName='' ): ( transportDomain, transportAddress, timeout, retryCount, messageProcessingModel, securityModel, securityName, securityLevel ) = config.getTargetInfo(snmpEngine, addrName) pduVersion, pMod = getVersionSpecifics(messageProcessingModel) if not hasattr(pMod, 'GetBulkRequestPDU'): raise error.PySnmpError('BULK PDU not implemented at %s' % pMod) reqPDU = pMod.GetBulkRequestPDU() pMod.apiBulkPDU.setDefaults(reqPDU) pMod.apiBulkPDU.setNonRepeaters(reqPDU, nonRepeaters) pMod.apiBulkPDU.setMaxRepetitions(reqPDU, maxRepetitions) pMod.apiBulkPDU.setVarBinds(reqPDU, varBinds) requestHandle = getNextHandle() self._sendPdu( snmpEngine, transportDomain, transportAddress, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, reqPDU, timeout, retryCount, 0, requestHandle, (self.processResponsePdu, (cbFun, cbCtx)) ) return requestHandle def _handleResponse( self, snmpEngine, transportDomain, transportAddress, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, PDU, timeout, retryCount, pMod, rspPDU, sendRequestHandle, (cbFun, cbCtx) ): varBindTable = pMod.apiBulkPDU.getVarBindTable(PDU, rspPDU) if pMod.apiBulkPDU.getErrorStatus(rspPDU): errorIndication = None elif not varBindTable: errorIndication = 'emptyResponse' else: if map(lambda (o,v): o, pMod.apiBulkPDU.getVarBinds(PDU)) < \ map(lambda (o,v): isinstance(v, univ.Null) and (9,) or o,varBindTable[-1]): errorIndication = None else: debug.logger & debug.flagApp and debug.logger('_handleResponse: sendRequestHandle %s, OID(s) not increasing!' % sendRequestHandle) errorIndication = 'oidNotIncreasing' if not cbFun(sendRequestHandle, errorIndication, pMod.apiBulkPDU.getErrorStatus(rspPDU), pMod.apiBulkPDU.getErrorIndex(rspPDU), varBindTable, cbCtx): debug.logger & debug.flagApp and debug.logger('_handleResponse: sendRequestHandle %s, app says to stop walking' % sendRequestHandle) return # app says enough pMod.apiBulkPDU.setRequestID(PDU, pMod.getNextRequestID()) for o, v in varBindTable[-1]: if not isinstance(v, univ.Null): break else: return # no more objects available pMod.apiBulkPDU.setVarBinds( PDU, map(lambda (x,y),self=self: (x,self._null), varBindTable[-1]) ) self._sendPdu( snmpEngine, transportDomain, transportAddress, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, PDU, timeout, retryCount, 0, getNextHandle(), (self.processResponsePdu, (cbFun, cbCtx)) ) PK·²$5 9‚–S S pysnmp/entity/rfc3413/mibvar.py# MIB variable pretty printers/parsers import types from pyasn1.type import univ from pysnmp.smi.error import NoSuchObjectError # Name def mibNameToOid(mibView, name): if type(name[0]) == types.TupleType: modName, symName = apply(lambda x='',y='': (x,y), name[0]) if modName: # load module if needed mibView.mibBuilder.loadModules(modName) else: mibView.mibBuilder.loadModules() # load all (slow) if symName: oid, label, suffix = mibView.getNodeNameByDesc(symName, modName) else: oid, label, suffix = mibView.getFirstNodeName(modName) suffix = name[1:] modName, symName, _s = mibView.getNodeLocation(oid) mibNode, = mibView.mibBuilder.importSymbols( modName, symName ) if hasattr(mibNode, 'createTest'): # table column XXX modName, symName, _s = mibView.getNodeLocation(oid[:-1]) rowNode, = mibView.mibBuilder.importSymbols(modName, symName) return oid, apply(rowNode.getInstIdFromIndices, suffix) else: # scalar or incomplete spec return oid, suffix else: oid, label, suffix = mibView.getNodeNameByOid(name) return oid, suffix __scalarSuffix = (univ.Integer(0),) def oidToMibName(mibView, oid): _oid, label, suffix = mibView.getNodeNameByOid(tuple(oid)) modName, symName, __suffix = mibView.getNodeLocation(_oid) mibNode, = mibView.mibBuilder.importSymbols( modName, symName ) if hasattr(mibNode, 'createTest'): # table column __modName, __symName, __s = mibView.getNodeLocation(_oid[:-1]) rowNode, = mibView.mibBuilder.importSymbols(__modName, __symName) return (symName, modName), rowNode.getIndicesFromInstId(suffix) elif not suffix: # scalar return (symName, modName), suffix elif suffix == (0,): # scalar return (symName, modName), __scalarSuffix else: raise NoSuchObjectError( str='No MIB info for %s (closest parent %s)' % (oid, mibNode.name) ) # Value def cloneFromMibValue(mibView, modName, symName, value): mibNode, = mibView.mibBuilder.importSymbols( modName, symName ) if hasattr(mibNode, 'syntax'): # scalar return mibNode.syntax.clone(value) else: return # identifier PK†£=O21Ž pysnmp/entity/rfc3413/config.pyc;ò «Î“Lc@spdkZdklZlZdklZdklZd„Zd„Z d„Z d„Z d„Z d „Z dS( N(sSmiErrorsNoSuchObjectError(snoSuchInstance(sconfigcCsdS(N((s snmpVersion((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/config.pysgetVersionSpecificssc Cs¿|ii}|iiddƒ\}|i|ƒ}|i |i df|t f|i df|t f|i df|t f|i df|t f|i df|t ffƒ\\} }\} } \} }\} }\} } ti| ƒotd|ƒ‚n|ttiƒ tijo4|iiiid d ƒ\} t| | ƒƒ} nR|ttiƒ tijo4|iiiid d ƒ\}t|| ƒƒ} n|| ||| fSdS( NsSNMP-TARGET-MIBssnmpTargetAddrEntryiiiiisTarget %s not configured at SMIs SNMPv2-TMsSnmpUDPAddresssTRANSPORT-ADDRESS-MIBsTransportAddressIPv6(s snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolsssnmpTargetAddrEntrysgetInstIdFromIndicesssnmpTargetAddrNamestblIdxsreadVarssnamesNonesvssnmpTargetAddrTDomainssnmpTargetAddrTAddressssnmpTargetAddrTimeoutssnmpTargetAddrRetryCountssnmpTargetAddrParamssnoSuchInstancesisSameTypeWithsSmiErrorslensconfigs snmpUDPDomainsSnmpUDPAddressstuplessnmpUDP6DomainsTransportAddressIPv6( s snmpEnginessnmpTargetAddrNamessnmpTargetAddrRetryCountssnmpTargetAddrTDomainsTransportAddressIPv6stblIdxsmibInstrumControllerssnmpTargetAddrEntryssnmpTargetAddrTimeoutsvssnmpTargetAddrParamsssnmpTargetAddrTAddresssSnmpUDPAddress((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/config.pys getTargetAddr s ¯ cCs$t||ƒ\}} } }}|ii }|i i ddƒ\}|i |ƒ}|i|idf|tf|idf|tf|idf|tf|idf|tffƒ\\} }\} }\} } \} } ti| ƒotd|ƒ‚n|| | |||| | fSdS(NsSNMP-TARGET-MIBssnmpTargetParamsEntryiiiis#Parameters %s not configured at SMI(s getTargetAddrs snmpEnginessnmpTargetAddrNamessnmpTargetAddrTDomainssnmpTargetAddrTAddressssnmpTargetAddrTimeoutssnmpTargetAddrRetryCountssnmpTargetAddrParamss msgAndPduDspsmibInstrumControllers mibBuilders importSymbolsssnmpTargetParamsEntrysgetInstIdFromIndicesstblIdxsreadVarssnamesNonesvssnmpTargetParamsMPModelssnmpTargetParamsSecurityModelssnmpTargetParamsSecurityNamessnmpTargetParamsSecurityLevelsnoSuchInstancesisSameTypeWithsSmiError(s snmpEnginessnmpTargetAddrNamessnmpTargetAddrRetryCountssnmpTargetAddrTDomainstblIdxssnmpTargetAddrParamsssnmpTargetParamsMPModelssnmpTargetParamsEntrysmibInstrumControllerssnmpTargetParamsSecurityNamessnmpTargetAddrTAddressssnmpTargetAddrTimeoutsvssnmpTargetParamsSecurityLevelssnmpTargetParamsSecurityModel((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/config.pys getTargetInfo3s  c Csú|ii}|iiddƒ\}|i|ƒ}|i |i df|t f|i df|t f|i df|t f|i df|t ffƒ\\}}\}} \}}\}}ti|ƒotd|ƒ‚n|| ||fSdS(NsSNMP-TARGET-MIBssnmpTargetParamsEntryiiiis#Parameters %s not configured at SMI(s snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolsssnmpTargetParamsEntrysgetInstIdFromIndicess paramsNamestblIdxsreadVarssnamesNonesvssnmpTargetParamsMPModelssnmpTargetParamsSecurityModelssnmpTargetParamsSecurityNamessnmpTargetParamsSecurityLevelsnoSuchInstancesisSameTypeWithsSmiError( s snmpEngines paramsNamesmibInstrumControllerssnmpTargetParamsMPModelssnmpTargetParamsEntrystblIdxssnmpTargetParamsSecurityNamesvssnmpTargetParamsSecurityLevelssnmpTargetParamsSecurityModel((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/config.pysgetTargetParams[s  cCs´|ii}|iiddƒ\}|i|ƒ}|i |i df|t f|i df|t ffƒ\\}}\}}ti|ƒotd|ƒ‚n||fSdS(NsSNMP-NOTIFICATION-MIBssnmpNotifyEntryiisTarget %s not configured at SMI(s snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolsssnmpNotifyEntrysgetInstIdFromIndicessnotificationTargetstblIdxsreadVarssnamesNonesvs snmpNotifyTagssnmpNotifyTypesnoSuchInstancesisSameTypeWithsSmiError(s snmpEnginesnotificationTargets snmpNotifyTagsmibInstrumControllerssnmpNotifyEntrystblIdxsvssnmpNotifyType((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/config.pysgetNotificationInfous Oc CsÖ|ii}|iidddƒ\}}g}|i}x’noŠy|i |ƒ}Wnt j oPnX|tit|iƒƒjo4|it|iƒ}|i|i|ƒdƒn|i}qCW|SdS(NsSNMP-TARGET-MIBssnmpTargetAddrEntryssnmpTargetAddrTagListii(s snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolsssnmpTargetAddrEntryssnmpTargetAddrTagLists targetNamessnamesnextNames getNextNodesmibNodesNoSuchObjectErrorstagsstringssplitsstrssyntaxslensidxsappendsgetIndicesFromInstId( s snmpEnginestagsidxsmibInstrumControllersmibNodessnmpTargetAddrEntrysnextNames targetNamesssnmpTargetAddrTagList((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/config.pysgetTargetNames‰s  (sstringspysnmp.smi.errorsSmiErrorsNoSuchObjectErrorspysnmp.smi.exvalsnoSuchInstances pysnmp.entitysconfigsgetVersionSpecificss getTargetAddrs getTargetInfosgetTargetParamssgetNotificationInfosgetTargetNames( sstringsgetTargetNamessSmiErrorsNoSuchObjectErrorsgetNotificationInfosgetVersionSpecificss getTargetInfos getTargetAddrsconfigsgetTargetParamssnoSuchInstance((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/config.pys?s     * (  PK†£=Ž9AA)pysnmp/entity/rfc3413/oneliner/ntforg.pyc;ò ±œ4Lc@sÉdkZdkZdklZdklZlZlZdkl Z e i Z e i Z e i Z e i Z e iZe iZe iZe iZe iZde ifd„ƒYZdefd„ƒYZdS(N(sconfig(sntforgscontextsmibvar(scmdgensAsynNotificationOriginatorcBsGtZeed„Zd„Zd„Zd„Zeeefd„ZRS(NcCs2tii||ƒ||_h|_h|_dS(N(scmdgensAsynCommandGenerators__init__sselfs snmpEngines snmpContexts-_AsynNotificationOriginator__knownNotifyNamess'_AsynNotificationOriginator__knownAuths(sselfs snmpEngines snmpContext((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/ntforg.pys__init__s  cCs|iƒdS(N(sselfs uncfgNtfOrg(sself((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/ntforg.pys__del__sc Cs0|i|||ƒ\}}|||f} |i i | ƒo|i | \}} n@dt iƒ}ti|i||||ƒ||f|i | <|ii |ƒ oEdddf}ti|i|i|i|i|ƒ||i|, , %s, %s, %s, %s)(sselfs __class__s__name__s securityNames authProtocols privProtocolscontextEngineIds contextName(sself((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys__repr__[scCs |iSdS(N(sselfs_UsmUserData__hash(sself((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys__hash__escCst|i|ƒSdS(N(scmpsselfs_UsmUserData__cmpsother(sselfsother((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys__cmp__fs(s__name__s __module__sNonesauthKeysprivKeysusmNoAuthProtocols authProtocolsusmNoPrivProtocols privProtocols securityLevels securityModelsmpModels contextNames__init__s__repr__s__hash__s__cmp__(((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys UsmUserData3s  sUdpTransportTargetcBsDtZeiZddd„Zd„Zd„Zd„Zd„Z RS(NiicCs6ti|dƒ|df|_||_||_dS(Nii(ssockets gethostbynames transportAddrsselfstimeoutsretries(sselfs transportAddrstimeoutsretries((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys__init__js  cCs5d|ii|id|id|i|ifSdS(Ns%s(("%s", %s), %s, %s)ii(sselfs __class__s__name__s transportAddrstimeoutsretries(sself((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys__repr__qscCst|iƒSdS(N(shashsselfs transportAddr(sself((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys__hash__wscCst|i|ƒSdS(N(scmpsselfs transportAddrsother(sselfsother((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys__cmp__xscCs tiƒiƒ|_|iSdS(N(sudpsUdpSocketTransportsopenClientModesselfs transport(sself((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pysopenClientModezs( s__name__s __module__sudps domainNamestransportDomains__init__s__repr__s__hash__s__cmp__sopenClientMode(((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pysUdpTransportTargeths     sAsynCommandGeneratorcBsetZeidƒZed„Zd„Zdd„Zd„Z d„Z d„Z d„Z d „Z RS( NscCsfh|_h|_h|_|tjotiƒ|_n ||_ti |ii i i ƒ|_ dS(N(sselfs!_AsynCommandGenerator__knownAuthss&_AsynCommandGenerator__knownTransportss*_AsynCommandGenerator__knownTransportAddrss snmpEnginesNonesengines SnmpEnginesviewsMibViewControllers msgAndPduDspsmibInstrumControllers mibBuildersmibViewController(sselfs snmpEngine((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys__init__€s     cCs|iƒdS(N(sselfs uncfgCmdGen(sself((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys__del__Œsc Cst|tƒod||if}n|ii|ƒo|i|}nõdt ƒ}t|tƒoTt i |i |i|i |i|i|ƒt i|i ||i|i|iƒnwt|tƒoWt i|i |i|i|i|i|i|iƒt i|i ||i|iƒntidƒ‚||i|<|ii|iƒ o9|iƒ}t i |i |i|ƒ||i|ix¦|iiƒD]•\}}t|tƒo-ti|i |i ƒti |i |ƒqt|t ƒo-ti |i |i ƒti |i |ƒqtidƒ‚qW|iiƒx:|iiƒD])\}}ti|i |ƒ|iƒqÆW|iiƒx*|iiƒD]}ti|i |ƒqW|iiƒdS(Ns!Unsupported authentication object(sselfs!_AsynCommandGenerator__knownAuthssitemssauthDatas paramsNames isinstances CommunityDatasconfigs delV1Systems snmpEngines securityNamesdelTargetParamss UsmUserDatas delV3Userserrors PySnmpErrorsclears&_AsynCommandGenerator__knownTransportsstransportDomains transportsdelSocketTransportscloseTransports*_AsynCommandGenerator__knownTransportAddrssvaluessaddrNames delTargetAddr(sselfsauthDatas paramsNamesaddrNamestransportDomains transport((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys uncfgCmdGenÎs(      c Cs¢|\}}|i||ƒ\}} g} xC|D];} t i |i | ƒ\}} | i|| |ifƒq1Wtiƒi|i|| |||i|iƒSdS(N(scbFunscbCtxsselfs cfgCmdGensauthDatastransportTargetsaddrNames paramsNamesvarBindssvarNamessvarNamesmibvars mibNameToOidsmibViewControllersnamesoidsappends_nullscmdgensGetCommandGeneratorssendReqs snmpEnginescontextEngineIds contextName( sselfsauthDatastransportTargetsvarNamess.8scbFunscbCtxsaddrNamesnamesvarBindssvarNames paramsNamesoid((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys asyncGetCmdòs cCs9|\}}|i||ƒ\} } g}xÚ|D]Ò\}} t i |i|ƒ\}}t| ƒtij o}t i|i||ƒ\\}} }t i|i| || ƒ} | tjotidt|ƒƒ‚n| i| ƒ} n|i||| fƒq1Wt i!ƒi"|i#| ||||i$|i%ƒSdS(Ns#Value type MIB lookup failed for %s(&scbFunscbCtxsselfs cfgCmdGensauthDatastransportTargetsaddrNames paramsNames_AsynCommandGenerator__varBindssvarBindssvarNamesvarValsmibvars mibNameToOidsmibViewControllersnamesoidstypestypess InstanceTypes oidToMibNamessymNamesmodNamessuffixscloneFromMibValuessyntaxsNoneserrors PySnmpErrorsreprsclonesappendscmdgensSetCommandGeneratorssendReqs snmpEnginescontextEngineIds contextName(sselfsauthDatastransportTargetsvarBindss.8scbFunscbCtxssuffixsvarNamesmodNamessyntaxsvarValsaddrNames paramsNamesoids_AsynCommandGenerator__varBindsssymNamesname((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys asyncSetCmds  % c Cs¢|\}}|i||ƒ\}} g} xC|D];} t i |i | ƒ\}} | i|| |ifƒq1Wtiƒi|i|| |||i|iƒSdS(N(scbFunscbCtxsselfs cfgCmdGensauthDatastransportTargetsaddrNames paramsNamesvarBindssvarNamessvarNamesmibvars mibNameToOidsmibViewControllersnamesoidsappends_nullscmdgensNextCommandGeneratorssendReqs snmpEnginescontextEngineIds contextName( sselfsauthDatastransportTargetsvarNamess.8scbFunscbCtxsaddrNamesnamesvarBindssvarNames paramsNamesoid((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys asyncNextCmd s c Cs¨|\}}|i||ƒ\} } g} xC|D];} t i |i | ƒ\} }| i| ||ifƒq1Wtiƒi|i| ||| |||i|iƒ SdS(N(scbFunscbCtxsselfs cfgCmdGensauthDatastransportTargetsaddrNames paramsNamesvarBindssvarNamessvarNamesmibvars mibNameToOidsmibViewControllersnamesoidsappends_nullscmdgensBulkCommandGeneratorssendReqs snmpEngines nonRepeaterssmaxRepetitionsscontextEngineIds contextName(sselfsauthDatastransportTargets nonRepeaterssmaxRepetitionssvarNamess.12scbFunscbCtxsvarBindssnamesvarNames paramsNamesaddrNamesoid((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys asyncBulkCmd1s (s__name__s __module__sunivsNulls_nullsNones__init__s__del__s cfgCmdGens uncfgCmdGens asyncGetCmds asyncSetCmds asyncNextCmds asyncBulkCmd(((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pysAsynCommandGenerator~s  @ $   sCommandGeneratorcBs2tZeZd„Zd„Zd„Zd„ZRS(NcGs_d„}h}|i|||||fƒ|iii ƒ|d|d|d|dfSdS(NcCs,||d<||d<||d<||d™scCsti|i|ƒS(N(smibvars mibNameToOidsselfsmibViewControllersx(sxsself((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys™sserrorIndications errorStatuss errorIndexs varBindTable( s_CommandGenerator__cbFunsmapsselfsvarNamess varBindHeads appReturns asyncNextCmdsauthDatastransportTargets snmpEnginestransportDispatchers runDispatcher(sselfsauthDatastransportTargetsvarNamess_CommandGenerator__cbFuns varBindHeads appReturn((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pysnextCmdrs &$c Gs•d„}t|d„t|d„|ƒƒ}h}|i||||||||g|ffƒ|i i i ƒ|d|d|d|dfSdS(NcCsU|\}}}} |p|o0|| d<|| d<|| d<|| dÓscCsti|i|ƒS(N(smibvars mibNameToOidsselfsmibViewControllersx(sxsself((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pysÓsserrorIndications errorStatuss errorIndexs varBindTable(s_CommandGenerator__cbFunsmapsselfsvarNamess varBindHeads appReturns asyncBulkCmdsauthDatastransportTargets nonRepeaterssmaxRepetitionss snmpEnginestransportDispatchers runDispatcher( sselfsauthDatastransportTargets nonRepeaterssmaxRepetitionssvarNamess_CommandGenerator__cbFuns varBindHeads appReturn((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pysbulkCmdªs '$(s__name__s __module__sNoneslexicographicModesgetCmdssetCmdsnextCmdsbulkCmd(((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pysCommandGeneratorDs    8(ssocketsstringstypess pysnmp.entitysenginesconfigspysnmp.entity.rfc3413scmdgensmibvarspysnmp.carrier.asynsock.dgramsudps pysnmp.smisviewspysnmpsnextidserrors pyasn1.typesunivsusmHMACMD5AuthProtocolsusmHMACSHAAuthProtocolsusmNoAuthProtocolsusmDESPrivProtocolsusmAesCfb128ProtocolsusmNoPrivProtocolsIntegersnextIDs CommunityDatas UsmUserDatasUdpTransportTargetsAsynCommandGeneratorsCommandGenerator(scmdgensusmNoAuthProtocolsusmNoPrivProtocolsnextidsunivsCommandGeneratorsusmHMACMD5AuthProtocolsconfigsenginesudpsstringsAsynCommandGenerators CommunityDatasmibvarsusmDESPrivProtocolsUdpTransportTargetsnextIDstypessusmAesCfb128ProtocolssocketsusmHMACSHAAuthProtocolserrors UsmUserDatasview((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys?s$         5ÆPKT›ç<|DpŽŽ(pysnmp/entity/rfc3413/oneliner/ntforg.pyimport types, string from pysnmp.entity import config from pysnmp.entity.rfc3413 import ntforg, context, mibvar from pysnmp.entity.rfc3413.oneliner import cmdgen # Auth protocol usmHMACMD5AuthProtocol = cmdgen.usmHMACMD5AuthProtocol usmHMACSHAAuthProtocol = cmdgen.usmHMACSHAAuthProtocol usmNoAuthProtocol = cmdgen.usmNoAuthProtocol # Privacy protocol usmDESPrivProtocol = cmdgen.usmDESPrivProtocol usmAesCfb128Protocol = cmdgen.usmAesCfb128Protocol usmNoPrivProtocol = cmdgen.usmNoPrivProtocol # Credentials CommunityData = cmdgen.CommunityData UsmUserData = cmdgen.UsmUserData # Transport UdpTransportTarget = cmdgen.UdpTransportTarget class AsynNotificationOriginator(cmdgen.AsynCommandGenerator): def __init__(self, snmpEngine=None, snmpContext=None): cmdgen.AsynCommandGenerator.__init__(self, snmpEngine) self.snmpContext = snmpContext self.__knownNotifyNames = {} self.__knownAuths = {} def __del__(self): self.uncfgNtfOrg() def cfgNtfOrg(self, authData, transportTarget, notifyType, tagList): addrName, paramsName = self.cfgCmdGen( authData, transportTarget, tagList ) k = paramsName, tagList, notifyType if self.__knownNotifyNames.has_key(k): notifyName, _ = self.__knownNotifyNames[k] else: notifyName = 'n%s' % cmdgen.nextID() config.addNotificationTarget( self.snmpEngine, notifyName, paramsName, tagList, notifyType ) self.__knownNotifyNames[k] = notifyName, paramsName if not self.__knownAuths.has_key(authData): subTree = (1,3,6) config.addTrapUser( self.snmpEngine, authData.securityModel, authData.securityName, authData.securityLevel, subTree ) self.__knownAuths[authData] = subTree if self.snmpContext is None: self.snmpContext = context.SnmpContext(self.snmpEngine) config.addContext( self.snmpEngine, '' # this is leaky ) return notifyName def uncfgNtfOrg(self): for notifyName, paramsName in self.__knownNotifyNames.values(): config.delNotificationTarget( self.snmpEngine, notifyName, paramsName ) for authData, subTree in self.__knownAuths.items(): config.delTrapUser( self.snmpEngine, authData.securityModel, authData.securityName, authData.securityLevel, subTree ) self.uncfgCmdGen() def asyncSendNotification( self, authData, transportTarget, notifyType, notificationType, varBinds=None, (cbFun, cbCtx)=(None, None) ): tagList = string.replace(str(transportTarget.transportAddr), ' ', '_') notifyName = self.cfgNtfOrg(authData, transportTarget, notifyType, tagList) if notificationType: name, oid = mibvar.mibNameToOid( self.mibViewController, notificationType ) notificationType = name + oid if varBinds: __varBinds = [] for varName, varVal in varBinds: name, oid = mibvar.mibNameToOid( self.mibViewController, varName ) if not type(varVal) == types.InstanceType: ((symName, modName), suffix) = mibvar.oidToMibName( self.mibViewController, name + oid ) syntax = mibvar.cloneFromMibValue( self.mibViewController, modName, symName, varVal ) if syntax is None: raise error.PySnmpError( 'Value type MIB lookup failed for %s' % repr(varName) ) varVal = syntax.clone(varVal) __varBinds.append((name + oid, varVal)) else: __varBinds = None return ntforg.NotificationOriginator(self.snmpContext).sendNotification(self.snmpEngine, notifyName, notificationType, __varBinds, cbFun, cbCtx) class NotificationOriginator(AsynNotificationOriginator): def sendNotification( self, authData, transportTarget, notifyType, notificationType, *varBinds ): def __cbFun(sendRequestHandle, errorIndication, appReturn): appReturn['errorIndication'] = errorIndication appReturn = {} self.asyncSendNotification( authData, transportTarget, notifyType, notificationType, varBinds, (__cbFun, appReturn) ) self.snmpEngine.transportDispatcher.runDispatcher() return appReturn.get('errorIndication') PK†£=,iVW••+pysnmp/entity/rfc3413/oneliner/__init__.pyc;ò Mà®Bc@sdS(N((((sEbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/__init__.pys?sPK÷\=F:QýÃHÃH(pysnmp/entity/rfc3413/oneliner/cmdgen.pyimport socket, string, types from pysnmp.entity import engine, config from pysnmp.entity.rfc3413 import cmdgen, mibvar from pysnmp.carrier.asynsock.dgram import udp from pysnmp.smi import view from pysnmp import nextid, error from pyasn1.type import univ # Auth protocol usmHMACMD5AuthProtocol = config.usmHMACMD5AuthProtocol usmHMACSHAAuthProtocol = config.usmHMACSHAAuthProtocol usmNoAuthProtocol = config.usmNoAuthProtocol # Privacy protocol usmDESPrivProtocol = config.usmDESPrivProtocol usmAesCfb128Protocol = config.usmAesCfb128Protocol usmNoPrivProtocol = config.usmNoPrivProtocol nextID = nextid.Integer(0xffffffffL) class CommunityData: mpModel = 1 # Default is SMIv2 securityModel = mpModel+1 securityLevel = 'noAuthNoPriv' contextName = '' def __init__(self, securityName, communityName, mpModel=None, contextEngineId=None, contextName=None): self.securityName = securityName self.communityName = communityName if mpModel is not None: self.mpModel = mpModel self.securityModel = mpModel + 1 self.contextEngineId = contextEngineId if contextName is not None: self.contextName = contextName self.__cmp = self.mpModel, self.securityModel, self.securityLevel, self.securityName, self.communityName, self.contextEngineId, self.contextName self.__hash = hash(self.__cmp) def __repr__(self): return '%s("%s", , %s, %s, %s)' % ( self.__class__.__name__, self.securityName, self.mpModel, self.contextEngineId, self.contextName ) def __hash__(self): return self.__hash def __cmp__(self, other): return cmp(self.__cmp, other) class UsmUserData: authKey = privKey = None authProtocol = usmNoAuthProtocol privProtocol = usmNoPrivProtocol securityLevel = 'noAuthNoPriv' securityModel = 3 mpModel = 2 contextName = '' def __init__(self, securityName, authKey=None, privKey=None, authProtocol=None, privProtocol=None, contextEngineId=None, contextName=None): self.securityName = securityName if authKey is not None: self.authKey = authKey if authProtocol is None: self.authProtocol = usmHMACMD5AuthProtocol else: self.authProtocol = authProtocol if self.securityLevel != 'authPriv': self.securityLevel = 'authNoPriv' if privKey is not None: self.privKey = privKey if self.authProtocol == usmNoAuthProtocol: raise error.PySnmpError('Privacy implies authenticity') self.securityLevel = 'authPriv' if privProtocol is None: self.privProtocol = usmDESPrivProtocol else: self.privProtocol = privProtocol self.contextEngineId = contextEngineId if contextName is not None: self.contextName = contextName self.__cmp = self.mpModel, self.securityModel, self.securityLevel, self.securityName, self.authProtocol, self.authKey, self.privProtocol, self.privKey, self.contextEngineId self.__hash = hash(self.__cmp) def __repr__(self): return '%s("%s", , , %s, %s, %s, %s)' % ( self.__class__.__name__, self.securityName, self.authProtocol, self.privProtocol, self.contextEngineId, self.contextName ) def __hash__(self): return self.__hash def __cmp__(self, other): return cmp(self.__cmp, other) class UdpTransportTarget: transportDomain = udp.domainName def __init__(self, transportAddr, timeout=1, retries=5): self.transportAddr = ( socket.gethostbyname(transportAddr[0]), transportAddr[1] ) self.timeout = timeout self.retries = retries def __repr__(self): return '%s(("%s", %s), %s, %s)' % ( self.__class__.__name__, self.transportAddr[0], self.transportAddr[1], self.timeout, self.retries ) def __hash__(self): return hash(self.transportAddr) def __cmp__(self, other): return cmp(self.transportAddr, other) def openClientMode(self): self.transport = udp.UdpSocketTransport().openClientMode() return self.transport class AsynCommandGenerator: _null = univ.Null('') def __init__(self, snmpEngine=None): self.__knownAuths = {} self.__knownTransports = {} self.__knownTransportAddrs = {} if snmpEngine is None: self.snmpEngine = engine.SnmpEngine() else: self.snmpEngine = snmpEngine self.mibViewController = view.MibViewController( self.snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder ) def __del__(self): self.uncfgCmdGen() def cfgCmdGen(self, authData, transportTarget, tagList=''): if isinstance(authData, CommunityData): tagList = '%s %s' % (tagList, authData.securityName) if self.__knownAuths.has_key(authData): paramsName = self.__knownAuths[authData] else: paramsName = 'p%s' % nextID() if isinstance(authData, CommunityData): config.addV1System( self.snmpEngine, authData.securityName, authData.communityName, authData.contextEngineId, authData.contextName, tagList ) config.addTargetParams( self.snmpEngine, paramsName, authData.securityName, authData.securityLevel, authData.mpModel ) elif isinstance(authData, UsmUserData): config.addV3User( self.snmpEngine, authData.securityName, authData.authProtocol, authData.authKey, authData.privProtocol, authData.privKey, authData.contextEngineId ) config.addTargetParams( self.snmpEngine, paramsName, authData.securityName, authData.securityLevel ) else: raise error.PySnmpError('Unsupported authentication object') self.__knownAuths[authData] = paramsName if not self.__knownTransports.has_key(transportTarget.transportDomain): transport = transportTarget.openClientMode() config.addSocketTransport( self.snmpEngine, transportTarget.transportDomain, transport ) self.__knownTransports[transportTarget.transportDomain] = transport k = paramsName, transportTarget, tagList if self.__knownTransportAddrs.has_key(k): addrName = self.__knownTransportAddrs[k] else: addrName = 'a%s' % nextID() config.addTargetAddr( self.snmpEngine, addrName, transportTarget.transportDomain, transportTarget.transportAddr, paramsName, transportTarget.timeout * 100, transportTarget.retries, tagList ) self.__knownTransportAddrs[k] = addrName return addrName, paramsName def uncfgCmdGen(self): for authData, paramsName in self.__knownAuths.items(): if isinstance(authData, CommunityData): config.delV1System( self.snmpEngine, authData.securityName ) config.delTargetParams( self.snmpEngine, paramsName ) elif isinstance(authData, UsmUserData): config.delV3User( self.snmpEngine, authData.securityName ) config.delTargetParams( self.snmpEngine, paramsName ) else: raise error.PySnmpError('Unsupported authentication object') self.__knownAuths.clear() for transportDomain, transport in self.__knownTransports.items(): config.delSocketTransport( self.snmpEngine, transportDomain ) transport.closeTransport() self.__knownTransports.clear() for addrName in self.__knownTransportAddrs.values(): config.delTargetAddr( self.snmpEngine, addrName ) self.__knownTransportAddrs.clear() # Async SNMP apps def asyncGetCmd( self, authData, transportTarget, varNames, (cbFun, cbCtx) ): addrName, paramsName = self.cfgCmdGen( authData, transportTarget ) varBinds = [] for varName in varNames: name, oid = mibvar.mibNameToOid( self.mibViewController, varName ) varBinds.append((name + oid, self._null)) return cmdgen.GetCommandGenerator().sendReq( self.snmpEngine, addrName, varBinds, cbFun, cbCtx, authData.contextEngineId, authData.contextName ) def asyncSetCmd( self, authData, transportTarget, varBinds, (cbFun, cbCtx) ): addrName, paramsName = self.cfgCmdGen( authData, transportTarget ) __varBinds = [] for varName, varVal in varBinds: name, oid = mibvar.mibNameToOid( self.mibViewController, varName ) if not type(varVal) == types.InstanceType: ((symName, modName), suffix) = mibvar.oidToMibName( self.mibViewController, name + oid ) syntax = mibvar.cloneFromMibValue( self.mibViewController, modName, symName, varVal ) if syntax is None: raise error.PySnmpError( 'Value type MIB lookup failed for %s' % repr(varName) ) varVal = syntax.clone(varVal) __varBinds.append((name + oid, varVal)) return cmdgen.SetCommandGenerator().sendReq( self.snmpEngine, addrName, __varBinds, cbFun, cbCtx, authData.contextEngineId, authData.contextName ) def asyncNextCmd( self, authData, transportTarget, varNames, (cbFun, cbCtx) ): addrName, paramsName = self.cfgCmdGen( authData, transportTarget ) varBinds = [] for varName in varNames: name, oid = mibvar.mibNameToOid( self.mibViewController, varName ) varBinds.append((name + oid, self._null)) return cmdgen.NextCommandGenerator().sendReq( self.snmpEngine, addrName, varBinds, cbFun, cbCtx, authData.contextEngineId, authData.contextName ) def asyncBulkCmd( self, authData, transportTarget, nonRepeaters, maxRepetitions, varNames, (cbFun, cbCtx) ): addrName, paramsName = self.cfgCmdGen( authData, transportTarget ) varBinds = [] for varName in varNames: name, oid = mibvar.mibNameToOid( self.mibViewController, varName ) varBinds.append((name + oid, self._null)) return cmdgen.BulkCommandGenerator().sendReq( self.snmpEngine, addrName, nonRepeaters, maxRepetitions, varBinds, cbFun, cbCtx, authData.contextEngineId, authData.contextName ) class CommandGenerator(AsynCommandGenerator): lexicographicMode = None def getCmd(self, authData, transportTarget, *varNames): def __cbFun( sendRequestHandle, errorIndication, errorStatus, errorIndex, varBinds, appReturn ): appReturn['errorIndication'] = errorIndication appReturn['errorStatus'] = errorStatus appReturn['errorIndex'] = errorIndex appReturn['varBinds'] = varBinds appReturn = {} self.asyncGetCmd( authData, transportTarget, varNames, (__cbFun, appReturn) ) self.snmpEngine.transportDispatcher.runDispatcher() return ( appReturn['errorIndication'], appReturn['errorStatus'], appReturn['errorIndex'], appReturn['varBinds'] ) def setCmd(self, authData, transportTarget, *varBinds): def __cbFun( sendRequestHandle, errorIndication, errorStatus, errorIndex, varBinds, appReturn ): appReturn['errorIndication'] = errorIndication appReturn['errorStatus'] = errorStatus appReturn['errorIndex'] = errorIndex appReturn['varBinds'] = varBinds appReturn = {} self.asyncSetCmd( authData, transportTarget, varBinds, (__cbFun, appReturn) ) self.snmpEngine.transportDispatcher.runDispatcher() return ( appReturn['errorIndication'], appReturn['errorStatus'], appReturn['errorIndex'], appReturn['varBinds'] ) def nextCmd(self, authData, transportTarget, *varNames): def __cbFun( sendRequestHandle, errorIndication, errorStatus, errorIndex, varBindTable, (self, varBindHead, varBindTotalTable, appReturn) ): if errorIndication or errorStatus: appReturn['errorIndication'] = errorIndication if errorStatus == 2: # Hide SNMPv1 noSuchName error which leaks in here # from SNMPv1 Agent through internal pysnmp proxy. appReturn['errorStatus'] = errorStatus.clone(0) appReturn['errorIndex'] = errorIndex.clone(0) else: appReturn['errorStatus'] = errorStatus appReturn['errorIndex'] = errorIndex appReturn['varBindTable'] = varBindTotalTable return else: varBindTableRow = varBindTable[-1] for idx in range(len(varBindTableRow)): name, val = varBindTableRow[idx] # XXX extra rows if not isinstance(val, univ.Null): if self.lexicographicMode: if varBindHead[idx] <= name: break else: if varBindHead[idx].isPrefixOf(name): break else: appReturn['errorIndication'] = errorIndication appReturn['errorStatus'] = errorStatus appReturn['errorIndex'] = errorIndex appReturn['varBindTable'] = varBindTotalTable return varBindTotalTable.extend(varBindTable) return 1 # continue table retrieval varBindHead = map(lambda (x,y),self=self: univ.ObjectIdentifier(x+y), map(lambda x,self=self: mibvar.mibNameToOid(self.mibViewController, x), varNames)) appReturn = {} self.asyncNextCmd( authData, transportTarget, varNames, (__cbFun, (self, varBindHead,[],appReturn)) ) self.snmpEngine.transportDispatcher.runDispatcher() return ( appReturn['errorIndication'], appReturn['errorStatus'], appReturn['errorIndex'], appReturn['varBindTable'] ) def bulkCmd(self, authData, transportTarget, nonRepeaters, maxRepetitions, *varNames): def __cbFun( sendRequestHandle, errorIndication, errorStatus, errorIndex, varBindTable, (self, varBindHead, varBindTotalTable, appReturn) ): if errorIndication or errorStatus: appReturn['errorIndication'] = errorIndication appReturn['errorStatus'] = errorStatus appReturn['errorIndex'] = errorIndex appReturn['varBindTable'] = varBindTable return else: while varBindTable: if len(varBindTable[-1]) != len(varBindHead): # Fix possibly non-rectangular table del varBindTable[-1] else: break varBindTotalTable.extend(varBindTable) # XXX out of table # rows possible varBindTableRow = varBindTable[-1] for idx in range(len(varBindTableRow)): name, val = varBindTableRow[idx] if not isinstance(val, univ.Null): if self.lexicographicMode: if varBindHead[idx] <= name: break else: if varBindHead[idx].isPrefixOf(name): break else: appReturn['errorIndication'] = errorIndication appReturn['errorStatus'] = errorStatus appReturn['errorIndex'] = errorIndex appReturn['varBindTable'] = varBindTotalTable return return 1 # continue table retrieval varBindHead = map(lambda (x,y),self=self: univ.ObjectIdentifier(x+y), map(lambda x,self=self: mibvar.mibNameToOid(self.mibViewController, x), varNames)) appReturn = {} self.asyncBulkCmd( authData, transportTarget, nonRepeaters, maxRepetitions, varNames, (__cbFun, (self, varBindHead, [], appReturn)) ) self.snmpEngine.transportDispatcher.runDispatcher() return ( appReturn['errorIndication'], appReturn['errorStatus'], appReturn['errorIndex'], appReturn['varBindTable'] ) PK†£=øaTP,,(pysnmp/entity/rfc3413/twisted/ntforg.pyc;ò LsJc@s=dklZlZdklZdeifd„ƒYZdS((sreactorsdefer(sntforgsNotificationOriginatorcBs tZedd„Zd„ZRS(Nsc Cs<tiƒ}tii|||||t |ddƒ|SdS(Ns contextNames( sdefersDeferredsdfsntforgsNotificationOriginatorssendNotificationsselfs snmpEnginesnotificationTargetsnotificationNamesadditionalVarBindssNone(sselfs snmpEnginesnotificationTargetsnotificationNamesadditionalVarBindss contextNamesdf((sBbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/twisted/ntforg.pyssendNotifications   cCs|i||fƒdS(N(scbCtxscallbackssendRequestHandleserrorIndication(sselfssendRequestHandleserrorIndicationscbFunscbCtx((sBbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/twisted/ntforg.pys_handleResponses(s__name__s __module__sNonessendNotifications_handleResponse(((sBbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/twisted/ntforg.pysNotificationOriginatorsN(stwisted.internetsreactorsdeferspysnmp.entity.rfc3413sntforgsNotificationOriginator(sntforgsdefersreactorsNotificationOriginator((sBbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/twisted/ntforg.pys?s PKâ¾ÿ:)pysnmp/entity/rfc3413/twisted/__init__.pyPK†£=>¼£¿66(pysnmp/entity/rfc3413/twisted/cmdgen.pyc;ò K4Mc@s”dklZdklZd„Zdeifd„ƒYZdeifd„ƒYZd„Zdeifd „ƒYZd ei fd „ƒYZ d S( (sdefer(scmdgencCs|i||||fƒdS(N(scbCtxscallbackserrorIndications errorStatuss errorIndexsvarBinds(ssendRequestHandleserrorIndications errorStatuss errorIndexsvarBindsscbCtx((sBbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/twisted/cmdgen.pys_cbFunssGetCommandGeneratorcBstZedd„ZRS(Nsc Cs9tiƒ}tii||||t |||ƒ|SdS(N( sdefersDeferredsdfscmdgensGetCommandGeneratorssendReqsselfs snmpEnginesaddrNamesvarBindss_cbFunscontextEngineIds contextName(sselfs snmpEnginesaddrNamesvarBindsscontextEngineIds contextNamesdf((sBbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/twisted/cmdgen.pyssendReq s  (s__name__s __module__sNonessendReq(((sBbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/twisted/cmdgen.pysGetCommandGeneratorssSetCommandGeneratorcBstZedd„ZRS(Nsc Cs9tiƒ}tii||||t |||ƒ|SdS(N( sdefersDeferredsdfscmdgensSetCommandGeneratorssendReqsselfs snmpEnginesaddrNamesvarBindss_cbFunscontextEngineIds contextName(sselfs snmpEnginesaddrNamesvarBindsscontextEngineIds contextNamesdf((sBbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/twisted/cmdgen.pyssendReqs  (s__name__s __module__sNonessendReq(((sBbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/twisted/cmdgen.pysSetCommandGeneratorscCsR|d}|i||||fƒt|it i ƒo|i|d>¤ý‚pysnmp/__init__.pyPK†£=²H¾—pp¤kƒpysnmp/error.pycPK0kêJJ¤Áúpysnmp/proto/rfc3412.pyPK«ºy78rúµîî¤Epysnmp/proto/rfc3411.pyPK†£=c"Ì?ââ¤)Jpysnmp/proto/rfc1157.pycPK1¥r=UˆQ~~¤A`pysnmp/proto/rfc1905.pyPK†£=‰Ÿ¤¬†>†>¤ôspysnmp/proto/rfc3412.pycPKÜ“õ<…\€¡!!¤°²pysnmp/proto/rfc1155.pyPK¶Ö2‰DõKŒ Œ ¤Ãpysnmp/proto/rfc1157.pyPK†£= ¦2ÉQQ¤ÇÎpysnmp/proto/__init__.pycPK†£=Ðð‡Ÿ²²¤OÐpysnmp/proto/rfc1155.pycPK†£=èsÀ°D.D.¤7îpysnmp/proto/rfc1902.pycPK†£=þ P ¤±pysnmp/proto/acmod/rfc3415.pycPKÄsÎ2¤ +pysnmp/proto/acmod/__init__.pyPK†£=÷e™ ¤G+pysnmp/proto/acmod/void.pycPK†£=·Ò‰‰¤ /pysnmp/proto/acmod/__init__.pycPK7¥&51F„==¤Ó/pysnmp/proto/acmod/rfc3415.pyPKõ}=ÓiÕüü¤K@pysnmp/proto/acmod/void.pyPKauÎ2¤Bpysnmp/proto/mpmod/__init__.pyPK†£=CnõÊ{{¤»Bpysnmp/proto/mpmod/base.pycPK¤4=®öL´hrhr¤oapysnmp/proto/mpmod/rfc3412.pyPK†£=Z ž?L?L¤Ôpysnmp/proto/mpmod/rfc3412.pycPK†£=×òìp‰‰¤ pysnmp/proto/mpmod/__init__.pycPK-¤;=>>XQãã¤S!pysnmp/proto/mpmod/base.pyPK¥‚=ЕÌ9Ì9¤n7pysnmp/proto/mpmod/rfc2576.pyPK†£=áÌ÷³ý(ý(¤uqpysnmp/proto/mpmod/rfc2576.pycPKoÖ2¤®špysnmp/proto/proxy/__init__.pyPK†£=Ádxɉ‰¤êšpysnmp/proto/proxy/__init__.pycPK˜¦†=dÔhõ~%~%¤°›pysnmp/proto/proxy/rfc2576.pyPK†£=4Krä::¤iÁpysnmp/proto/proxy/rfc2576.pycPK¯Šl1¤ßßpysnmp/proto/secmod/__init__.pyPK†£=Ú…Ñnª ª ¤àpysnmp/proto/secmod/base.pycPK†£=$EvŠŠ ¤îpysnmp/proto/secmod/__init__.pycPKF£45›Þí44¤Èîpysnmp/proto/secmod/base.pyPK¯¨‚=Sw½¢€,€,¤5÷pysnmp/proto/secmod/rfc2576.pyPK†£=…:ã¾ó#ó#¤ñ#pysnmp/proto/secmod/rfc2576.pycPK——-¤{Åpysnmp/proto/secmod/rfc3414/priv/__init__.pycPK†£=Ce<¤+¤]Æpysnmp/proto/secmod/rfc3414/priv/nopriv.pycPKЍ=s>ÁâMM(¤»Ëpysnmp/proto/secmod/rfc3414/priv/base.pyPKøŒé6'¤NÍpysnmp/proto/secmod/rfc3826/__init__.pyPK†£=OOT’’(¤“Ípysnmp/proto/secmod/rfc3826/__init__.pycPKøŒé6,¤kÎpysnmp/proto/secmod/rfc3826/priv/__init__.pyPK†£=Xåèî——-¤µÎpysnmp/proto/secmod/rfc3826/priv/__init__.pycPKM¶Ø’f­ ­ ¤0Lpysnmp/proto/api/v2c.pycPKuÎ2æ^Õ¸ÕÕ¤mpysnmp/proto/api/verdec.pyPK˜¦†=ÙŸÁ_ûû¤ npysnmp/proto/api/v2c.pyPK†£=ÄïLu.u.¤Ppysnmp/smi/view.pycPK¯Šl1£QŽ¥¤ö­pysnmp/smi/__init__.pyPK†£=߸¼†¯¯¤9®pysnmp/smi/error.pycPKT` 7"¤Épysnmp/smi/error.pyPK†£=c#ann¤YÏpysnmp/smi/exval.pycPKÐÜ<žTS!!¤ùÐpysnmp/smi/instrum.pyPK†£=Sòœ±¿¿¤<òpysnmp/smi/instrum.pycPK†£=&¾€æS7S7¤/ pysnmp/smi/indices.pycPK†£=0FgÏ  ¤¶Dpysnmp/smi/__init__.pycPKðƒ”7ý|Æ`-`-¤‹Epysnmp/smi/view.pyPK†£=o‹3ïÈ9È9¤spysnmp/smi/builder.pycPK)o=Þ¯zžž¤­pysnmp/smi/exval.pyPK‹±Q6u:F¡¡¤æ­pysnmp/smi/indices.pyPKDzyç>#¤×% pysnmp/smi/mibs/SNMP-TARGET-MIB.pycPKà©z:01ÈzÖiÖi*¤ÿd pysnmp/smi/mibs/SNMP-VIEW-BASED-ACM-MIB.pyPK†£=\mñ&&&¤Ï pysnmp/smi/mibs/SNMP-FRAMEWORK-MIB.pycPK¤l=ü ðͱž±ž¤|õ pysnmp/smi/mibs/SNMPv2-SMI.pyPK†£=Ø7Œ\BýBý¤h”pysnmp/smi/mibs/RFC1213-MIB.pycPK†£= ÈÛ††¤ç‘pysnmp/smi/mibs/__init__.pycPKt£,<èH¼ˆN+N+(¤§’pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.pyPKà©z:¦=ªbªb¤;¾pysnmp/smi/mibs/SNMPv2-MIB.pyPKó²;@Ìô@xx¤ !pysnmp/smi/mibs/RFC1155-SMI.pyPK†£=©‘øA/Z/Z¤Ô(pysnmp/smi/mibs/SNMPv2-MIB.pycPKà©z:êKÅ‹ÄBÄB"¤?ƒpysnmp/smi/mibs/SNMP-TARGET-MIB.pyPK†£=loƒMa a ¤CÆpysnmp/smi/mibs/RFC1155-SMI.pycPKà©z:±*ªr>r>(¤áÓpysnmp/smi/mibs/SNMP-NOTIFICATION-MIB.pyPK†£=¥›' 00&¤™pysnmp/smi/mibs/SNMP-COMMUNITY-MIB.pycPK¥žl9$Ç,@@)¤ôBpysnmp/smi/mibs/instances/__SNMPv2-MIB.pyPKR Ø4|bÆff5¤{`pysnmp/smi/mibs/instances/__SNMP-USER-BASED-SM-MIB.pyPK†£=-C÷ÇÇ,¤4hpysnmp/smi/mibs/instances/__SNMP-MPD-MIB.pycPKR Ø4ÐæCwjj+¤Elpysnmp/smi/mibs/instances/__SNMP-MPD-MIB.pyPK†£=¡á‹6ëë.¤øopysnmp/smi/mibs/instances/__PYSNMP-USM-MIB.pycPKd[3%¤/spysnmp/smi/mibs/instances/__init__.pyPK†£=Ö ¨86¤rspysnmp/smi/mibs/instances/__SNMP-USER-BASED-SM-MIB.pycPK†£=°¨Ø_II7¤Üzpysnmp/smi/mibs/instances/__SNMP-VIEW-BASED-ACM-MIB.pycPK†£=̇;mm2¤z}pysnmp/smi/mibs/instances/__SNMP-FRAMEWORK-MIB.pycPKjWN6,Ë~€îî1¤7‚pysnmp/smi/mibs/instances/__SNMP-FRAMEWORK-MIB.pyPKR Ø4e9ưƒƒ.¤t†pysnmp/smi/mibs/instances/__SNMP-TARGET-MIB.pyPKR Ø4M›6nn-¤CŠpysnmp/smi/mibs/instances/__PYSNMP-USM-MIB.pyPKR Ø4§)…^œœ6¤üŒpysnmp/smi/mibs/instances/__SNMP-VIEW-BASED-ACM-MIB.pyPK†£=÷ DYçç*¤ìŽpysnmp/smi/mibs/instances/__SNMPv2-MIB.pycPK†£=^ÞCØ&¤¬pysnmp/smi/mibs/instances/__init__.pycPK†£=”{6¿ÆÆ/¤ï¬pysnmp/smi/mibs/instances/__SNMP-TARGET-MIB.pycPKSnÎ2¤±pysnmp/carrier/__init__.pyPK†£=œé‘¡Â¤:±pysnmp/carrier/error.pycPK†£=}Ñ9ÞÞ¤2³pysnmp/carrier/base.pycPKoÎ2ºÊ´FF¤EÒpysnmp/carrier/error.pyPK†£=;…e……¤ÀÒpysnmp/carrier/__init__.pycPKÀ†”>%¤½pysnmp/carrier/asynsock/dgram/unix.pyPK®Šl1)¤>!pysnmp/carrier/asynsock/dgram/__init__.pyPK†£=nH,”ÒÒ&¤…!pysnmp/carrier/asynsock/dgram/base.pycPK¹«²:FbaÎ55$¤›5pysnmp/carrier/asynsock/dgram/udp.pyPK†£=¾/óqq%¤7pysnmp/carrier/asynsock/dgram/udp.pycPK†£=‹”R™³³&¤Æ:pysnmp/carrier/asynsock/dgram/udp6.pycPK†£=·G0!””*¤½>pysnmp/carrier/asynsock/dgram/__init__.pycPKyŽ,<´œšÓ  %¤™?pysnmp/carrier/asynsock/dgram/base.pyPK†£=þ‚ iJJ&¤ãKpysnmp/carrier/asynsock/dgram/unix.pycPKâ¾ÿ:"¤qQpysnmp/carrier/twisted/__init__.pyPK†£=Œä­hh¤±Qpysnmp/carrier/twisted/base.pycPK†£=¿ÄÐs#¤VWpysnmp/carrier/twisted/__init__.pycPKâ¾ÿ: ØÈDÛÛ¤$Xpysnmp/carrier/twisted/base.pyPKâ¾ÿ:»Å¾¯çç"¤;[pysnmp/carrier/twisted/dispatch.pyPK†£=e''ÏÍ Í #¤bcpysnmp/carrier/twisted/dispatch.pycPKâ¾ÿ:Š ˆ°;;$¤popysnmp/carrier/twisted/dgram/unix.pyPKâ¾ÿ:(¤írpysnmp/carrier/twisted/dgram/__init__.pyPK†£=kŽÛî î %¤3spysnmp/carrier/twisted/dgram/base.pycPKâ¾ÿ:ò±´E#¤d€pysnmp/carrier/twisted/dgram/udp.pyPK†£=«÷…´ÐÐ$¤·ƒpysnmp/carrier/twisted/dgram/udp.pycPK†£=ØAÌÙ““)¤ÉŠpysnmp/carrier/twisted/dgram/__init__.pycPKâ¾ÿ:¢ ÑVV$¤£‹pysnmp/carrier/twisted/dgram/base.pyPK†£=‡¦Ùxøø%¤;”pysnmp/carrier/twisted/dgram/unix.pycPK9jÎ2¤v›pysnmp/entity/__init__.pyPK†£=Ï™ÚP¯¯¤­›pysnmp/entity/engine.pycPK'2=›‡ !:e:e¤’®pysnmp/entity/config.pyPK†£=Ì'„„¤pysnmp/entity/__init__.pycPKK~=3Ä0½šš¤½pysnmp/entity/engine.pyPK†£=i$„8ŸoŸo¤Œ$pysnmp/entity/config.pycPK†£=\•=ëë ¤a”pysnmp/entity/rfc3413/ntforg.pycPKQjÎ2!¤Š¯pysnmp/entity/rfc3413/__init__.pyPK†£=¹‹ù1?I?I ¤É¯pysnmp/entity/rfc3413/cmdgen.pycPK†£=›ÇàÞé5é5 ¤Fùpysnmp/entity/rfc3413/cmdrsp.pycPK'2=4¬ò##¤m/pysnmp/entity/rfc3413/config.pyPKH Ú<»èF.44 ¤ÍHpysnmp/entity/rfc3413/context.pyPK†£=økIà à !¤?Qpysnmp/entity/rfc3413/context.pycPKÉ©=J¼!ä%ä%¤A\pysnmp/entity/rfc3413/ntforg.pyPKX©=úȯ>2>2¤b‚pysnmp/entity/rfc3413/cmdrsp.pyPKPw7=_£î!MM¤Ý´pysnmp/entity/rfc3413/ntfrcv.pyPK†£=Cwø ! ! ¤gÅpysnmp/entity/rfc3413/mibvar.pycPK†£=\ºqGG ¤ÆÑpysnmp/entity/rfc3413/ntfrcv.pycPK†£=‰²o'ŒŒ"¤Kâpysnmp/entity/rfc3413/__init__.pycPK÷\=‘k$órErE¤ãpysnmp/entity/rfc3413/cmdgen.pyPK·²$5 9‚–S S ¤Æ(pysnmp/entity/rfc3413/mibvar.pyPK†£=O21Ž ¤V2pysnmp/entity/rfc3413/config.pycPK†£=Ž9AA)¤ªMpysnmp/entity/rfc3413/oneliner/ntforg.pycPK ŽÎ2*¤2hpysnmp/entity/rfc3413/oneliner/__init__.pyPK†£='Pµ…½V½V)¤zhpysnmp/entity/rfc3413/oneliner/cmdgen.pycPKT›ç<|DpŽŽ(¤~¿pysnmp/entity/rfc3413/oneliner/ntforg.pyPK†£=,iVW••+¤RÓpysnmp/entity/rfc3413/oneliner/__init__.pycPK÷\=F:QýÃHÃH(¤0Ôpysnmp/entity/rfc3413/oneliner/cmdgen.pyPK†£=øaTP,,(¤9pysnmp/entity/rfc3413/twisted/ntforg.pycPKâ¾ÿ:)¤«#pysnmp/entity/rfc3413/twisted/__init__.pyPK†£=>¼£¿66(¤ò#pysnmp/entity/rfc3413/twisted/cmdgen.pycPKâ¾ÿ:*­…;;'¤n6pysnmp/entity/rfc3413/twisted/ntforg.pyPK†£=J¥ð0””*¤î9pysnmp/entity/rfc3413/twisted/__init__.pycPK'=¯ò¼X X '¤Ê:pysnmp/entity/rfc3413/twisted/cmdgen.pyPKêê¤GgF