PK= M?:::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/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/top_level.txt 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/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/build-pysnmp-mib tools/libsmi2pysnmpPK=GEGG-INFO/top_level.txtpysnmp PK=KRvEGG-INFO/PKG-INFOMetadata-Version: 1.0 Name: pysnmp Version: 4.1.14a 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=2EGG-INFO/not-zip-safe PK=2EGG-INFO/dependency_links.txt PK=>XXEGG-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.9-alpha' 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: out.write('%s = ' % transOpers(symName)) if symDef['nodetype'] == 'node': 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'])) if symDef['nodetype'] == 'scalar': 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']) if symDef['nodetype'] == 'table': out.write('MibTable(%s)' % __oidToTuple(symDef['oid'])) if symDef['nodetype'] == 'row': # 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(')') if symDef['nodetype'] == 'column': 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']) 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, '.')) nodes.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)) out.write('\n') if mib.has_key('groups'): groups = mib['groups'].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: groups = () if groups: out.write('\n# Groups\n\n') for symName, symDef in groups: out.write('%s = ' % transOpers(symName)) if symDef['nodetype'] == 'group': if mib.has_key('notifications') and mib['notifications'].has_key(symDef['members'].keys()[0]): out.write('NotificationGroup(') else: out.write('ObjectGroup(') 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)) 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') # XXX # implement API version checking PK-m<@U!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) exec 5>"$OPTARG" 1>&5 || { echo >&2 "Redirection failed"; exit 1; } ;; [?]) 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 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/\(.*\)\/.*/\1/g')"; } 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; 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 || { 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 PKz:qݚpysnmp/nextid.py# Return a next value in a reasonably MT-safe manner class Integer: def __init__(self, maximum, increment=256): self.__maximum = maximum if increment >= 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=7e pysnmp/debug.pyc; <8Lc@sdkZdklZdZdZdZdZdZdZdZ d Z d Z d Z d Z d Zhde<de<de<de<de<de <de <de <de <de <de= 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/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<>pysnmp/proto/rfc3412.pyc; -08Lc@smdZdkZdklZlZdklZdklZdk l Z dk l Z dfdYZ dS( s4SNMP v3 Message Processing and Dispatching (RFC3412)N(sbuildersinstrum(serror(sverdec(s PySnmpError(sdebugsMsgAndPduDispatchercBstZdZedZdZdZdZdZdZ dZ dZ d Z d Z d Zd Zd ZdZedZdZRS(sSNMP engine PDU & message dispatcher. Exchanges SNMP PDU's with applications and serialized messages with transport level. cCsy|tjotiti|_n ||_|iiidddddh|_ 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|iiD]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.pysgetTransportInfoBscCsx]|D]U}t||f}|ii|oti d||fn||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.pysreturnResponsePdus: 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 idWnrt'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 idy=|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|B||vs(stypesbitsstypess TupleTypesListTypesstrsoctetssbitsselfs_Bits__namedValuessgetValuesvsNoneserrors ProtocolErrorsdivmodsdsmslensextendsstringsjoinsmap(sselfsbitssdsmsoctetssvsbit((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pysprettyInhs &cCsg}tttt|}d}x|t|jot ||}d}x~|djop|d|>@oS|i i|dd|}|tjotid|n|i|n|d}qVW|d}q*Wtitd|dSdS(NiiiisUnknown named value %scCs t|S(N(sstrsx(sx((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pysss, (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.pysclones4        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.pyssubtypes           ( 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 ObjectNamess SimpleSyntaxcBsMtZeieideeideeideiZ 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 SimpleSyntaxssApplicationSyntaxc BstZeieideeideeideeideeide 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.pysApplicationSyntaxs s ObjectSyntaxcBs8tZeieideeideZRS(Nssimplesapplication-wide(s__name__s __module__s namedtypes NamedTypess NamedTypes SimpleSyntaxsApplicationSyntaxs componentType(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1902.pys ObjectSyntaxs(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= 2QQpysnmp/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?sPKy78rpysnmp/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 } 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=:'k pysnmp/proto/error.pyc; fHKc@sdklZdklZdklZdeefdYZdefdYZdefdYZd efd YZ d efd YZ d efdYZ defdYZ 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 ssStatusInformationcBs8tZdZdZdZdZedZRS(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|iSdS(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    PK2DK 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=KFdpysnmp/proto/rfc1155.pyc; nBc@skdkZdklZlZlZlZdklZdkl Z dZ dZ dei fdYZ deifd YZd eifd YZd eifd YZdeifdYZdei fdYZdeifdYZdfdYZdeeifdYZdeeifdYZdeifdYZdS(N(sunivstags constraints namedtype(s PyAsn1Error(serrorcCst|djo|Snyti|d}Wntid|nXt|djotid|ny tdtd|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|dt|dt|dt|dfSndSdS(Ns %d.%d.%d.%diiiis(svaluesord(svalue((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1155.pysipAddressPrettyOuts@s IpAddresscBs`tZeiiieieiei dZeii e i ddZ dZ dZRS(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 dZeii e i ddZ RS(Niil( s__name__s __module__sunivsIntegerstagSets tagImplicitlystagsTagstagClassApplicationstagFormatSimples subtypeSpecs constraintsValueRangeConstraint(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1155.pysCounter0s*sNetworkAddresscBs&tZeieideZRS(Nsinternet(s__name__s __module__s namedtypes NamedTypess NamedTypes IpAddresss componentType(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1155.pysNetworkAddress8ssGaugecBsNtZeiiieieiei dZeii e i ddZ RS(Niil( s__name__s __module__sunivsIntegerstagSets tagImplicitlystagsTagstagClassApplicationstagFormatSimples subtypeSpecs constraintsValueRangeConstraint(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1155.pysGauge=s*s TimeTickscBsNtZeiiieieiei dZeii e i ddZ RS(Niil( s__name__s __module__sunivsIntegerstagSets tagImplicitlystagsTagstagClassApplicationstagFormatSimples subtypeSpecs constraintsValueRangeConstraint(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1155.pys TimeTicksEs*sOpaquecBs2tZeiiieieiei dZRS(Ni( s__name__s __module__sunivsIntegerstagSets 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 ObjectNameRssTypeCoercionHackMixIncBstZdZRS(NcCs|i}|oz|t|jotdn||i}|ii |i o&tdt |t |fqndS(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 SimpleSyntaxcBshtZeieideieideieideieidei Z RS(Nsnumbersstringsobjectsempty( s__name__s __module__s namedtypes NamedTypess NamedTypesunivsIntegers OctetStringsObjectIdentifiersNulls componentType(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1155.pys SimpleSyntaxcssApplicationSyntaxcBsntZeieideeideeideeideeide Z RS(Nsaddressscountersgaugestickss arbitrary( s__name__s __module__s namedtypes NamedTypess NamedTypesNetworkAddresssCountersGauges TimeTickssOpaques componentType(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1155.pysApplicationSyntaxks s ObjectSyntaxcBs8tZeieideeideZRS(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.3`6;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) class _BindValue(univ.Choice): # Made a separate class for better readability componentType = namedtype.NamedTypes( namedtype.NamedType('value', rfc1902.ObjectSyntax()), namedtype.NamedType('unSpecified', univ.Null()), namedtype.NamedType('noSuchObject', univ.Null().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0x00))), namedtype.NamedType('noSuchInstance', univ.Null().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0x01))), namedtype.NamedType('endOfMibView', univ.Null().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0x02))) ) 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=c"?pysnmp/proto/rfc1157.pyc; Bc@sdklZlZlZlZdklZdeifdYZdei fdYZ deifdYZ de fd YZ d e fd YZ d e fd YZde fdYZdeifdYZdeifdYZdeifdYZdS((sunivstags namedtypesnamedval(srfc1155sVarBindcBs>tZeieideieideiZRS(Nsnamesvalue( s__name__s __module__s namedtypes NamedTypess NamedTypesrfc1155s ObjectNames ObjectSyntaxs componentType(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1157.pysVarBindss VarBindListcBstZeZRS(N(s__name__s __module__sVarBinds componentType(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1157.pys VarBindList ss _RequestBasecBstZeieideieideideiddfddfdd fd d fd d fddfeideieide 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/tZeiieieieidZRS(Ni( s__name__s __module__s _RequestBasestagSets tagImplicitlystagsTagstagClassContextstagFormatConstructed(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1157.pys GetRequestPDUssGetNextRequestPDUcBs/tZeiieieieidZRS(Ni( s__name__s __module__s _RequestBasestagSets tagImplicitlystagsTagstagClassContextstagFormatConstructed(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1157.pysGetNextRequestPDUssGetResponsePDUcBs/tZeiieieieidZRS(Ni( s__name__s __module__s _RequestBasestagSets tagImplicitlystagsTagstagClassContextstagFormatConstructed(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1157.pysGetResponsePDUss SetRequestPDUcBs/tZeiieieieidZRS(Ni( s__name__s __module__s _RequestBasestagSets tagImplicitlystagsTagstagClassContextstagFormatConstructed(((s2build/bdist.linux-i686/egg/pysnmp/proto/rfc1157.pys SetRequestPDU ssTrapPDUcBs tZeiiieieiei dZe i e i dei e i deie i deiideiddfdd fd d fd d fddfddfddfe i deie i deie i deZRS(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*fsPDUscBsntZeieideeideeideeideeide 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 sMessagecBsetZeieideideiddfeidei 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   PKl1Lpysnmp/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. """ PKr)s 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 | ido| tj o| id}| i}nt}| tjo| p|tj ot!i"i| ot#i$ddnt%i&}t(i)i*|| d| dfft(i)i+|dt(i)i,|d| tjot(i)i-|dnt(i)i-||| ido| d}nd}| ido| d}n|}| ido| d}nd}|} titi@otid| n| o |}n| o d}ntiti@otidt.||ft/}|i1d||i1d||i1d|idi2| i| t3}|i1dd|i1did}|i1d||iiiidd\}|i1dt7|id}|djonJ|djo|dB}n/|djo|dB}nt#i9d|t!i"i| io|dB}n|i1dt:||i1d|titi@otid|i;f|i<i=|}|tjot#i$ddny:|i?||i@||i|||||| \}}Wnt#i$j o } nXtiti@o tidtC|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.pysprepareResponseMessages            "  6   &  .      +  c'Cs y"ti|d|i\}}#WnStj oG|i i i i dd\}|id|_tiddnXtiti@otid|if|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 tidWntij o} titi@otid| | i!doT| i!do@| 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| nX||f}%|i;i!|% o|\}}}hd#|$<d|<d|<|i;|%<|i<d$}|i>i!| og|i>||i?|%titi@o tid%t@|$||fn|i i i i d&d'\}!|!i}!|\}}}|i2}tBiC}|iE} tGiHi!| ptGiIi!| oYy|iJ|}&Wn5tiLj o&|iM|tidd(nX|&d)}nt1}titi@otid*||ftGiIi!| otOiPiQ|} | 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|tidd0dS(1Nsasn1Specs __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 %sserrorReportReceivedsvals dataMispatchsengineIDMispatchs*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.pysprepareDataElementss8"++       ""          &  ( 5    & (   U  /     "/  / cCs|ii|io[xG|i|iD]5}|i|=titi@otid|fq'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__expireEnginesInfos )cCs!|iti|||dS(N(sselfs0_SnmpV3MessageProcessingModel__expireEnginesInfosAbstractMessageProcessingModelsreceiveTimerTicks snmpEnginestimeNow(sselfs snmpEnginestimeNow((s8build/bdist.linux-i686/egg/pysnmp/proto/mpmod/rfc3412.pysreceiveTimerTicks ( 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       PKh<>>XQpysnmp/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=ppysnmp/proto/mpmod/__init__.pyc; Bc@sdS(N((((s9build/bdist.linux-i686/egg/pysnmp/proto/mpmod/__init__.pys?sPKz<hrhrpysnmp/proto/mpmod/rfc3412.py# SNMP v3 message processing model implementation from pysnmp.proto.mpmod.base import AbstractMessageProcessingModel from pysnmp.proto.secmod import rfc3414 from pysnmp.proto import rfc1905, rfc3411, error, api from pyasn1.type import univ, namedtype, constraint from pyasn1.codec.ber import decoder from pyasn1.error import PyAsn1Error from pysnmp import debug # API to rfc1905 protocol objects pMod = api.protoModules[api.protoVersion2c] # SNMPv3 message format class ScopedPDU(univ.Sequence): componentType = namedtype.NamedTypes( namedtype.NamedType('contextEngineId', univ.OctetString()), namedtype.NamedType('contextName', univ.OctetString()), namedtype.NamedType('data', rfc1905.PDUs()) ) class ScopedPduData(univ.Choice): componentType = namedtype.NamedTypes( namedtype.NamedType('plaintext', ScopedPDU()), namedtype.NamedType('encryptedPDU', univ.OctetString()), ) class HeaderData(univ.Sequence): componentType = namedtype.NamedTypes( namedtype.NamedType('msgID', univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(0, 2147483647L))), namedtype.NamedType('msgMaxSize', univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(484, 2147483647L))), namedtype.NamedType('msgFlags', univ.OctetString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, 1))), namedtype.NamedType('msgSecurityModel', univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(1, 2147483647L))) ) class SNMPv3Message(univ.Sequence): componentType = namedtype.NamedTypes( namedtype.NamedType('msgVersion', univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(0, 2147483647L))), namedtype.NamedType('msgGlobalData', HeaderData()), namedtype.NamedType('msgSecurityParameters', univ.OctetString()), namedtype.NamedType('msgData', ScopedPduData()) ) # XXX move somewhere? _snmpErrors = { (1, 3, 6, 1, 6, 3, 15, 1, 1, 1, 0): 'unsupportedSecLevel', (1, 3, 6, 1, 6, 3, 15, 1, 1, 2, 0): 'notInTimeWindow', (1, 3, 6, 1, 6, 3, 15, 1, 1, 3, 0): 'unknownUserName', (1, 3, 6, 1, 6, 3, 15, 1, 1, 4, 0): 'unknownEngineID', (1, 3, 6, 1, 6, 3, 15, 1, 1, 5, 0): 'wrongDigest', (1, 3, 6, 1, 6, 3, 15, 1, 1, 6, 0): 'decryptionError', } class SnmpV3MessageProcessingModel(AbstractMessageProcessingModel): messageProcessingModelID = 3 # SNMPv3 _snmpMsgSpec = SNMPv3Message() def __init__(self): AbstractMessageProcessingModel.__init__(self) self.__engineIDs = {} self.__engineIDsExpQueue = {} self.__expirationTimer = 0L # 7.1.1a 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 # 7.1.1b msgID = self._newMsgID() debug.logger & debug.flagMP and debug.logger('prepareOutgoingMessage: new msgID %s' % msgID) peerSnmpEngineData = self.__engineIDs.get( (transportDomain, transportAddress) ) debug.logger & debug.flagMP and debug.logger('prepareOutgoingMessage: peer SNMP engine data %s for transport %s, address %s' % (peerSnmpEngineData, transportDomain, transportAddress)) # 7.1.4 if contextEngineId is None: if peerSnmpEngineData is None: contextEngineId = snmpEngineID else: contextEngineId = peerSnmpEngineData['contextEngineId'] # Defaulting contextEngineID to securityEngineID should # probably be done on Agent side (see 7.1.3.d.2,) so this # is a sort of workaround. if not contextEngineId: contextEngineId = peerSnmpEngineData['securityEngineID'] # 7.1.5 if not contextName: contextName = '' debug.logger & debug.flagMP and debug.logger('prepareOutgoingMessage: 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): msgFlags = msgFlags | 0x04 headerData.setComponentByPosition(2, chr(msgFlags)) # 7.1.7e # XXX need to coerce MIB value as it has incompatible constraints set headerData.setComponentByPosition(3, int(securityModel)) debug.logger & debug.flagMP and debug.logger('prepareOutgoingMessage: %s' % (msg.prettyPrint(),)) smHandler = snmpEngine.securityModels.get(securityModel) if smHandler is None: raise error.StatusInformation( errorIndication = 'unsupportedSecurityModel' ) # 7.1.9.a if rfc3411.unconfirmedClassPDUs.has_key(pdu.tagSet): securityEngineID = snmpEngineID else: if peerSnmpEngineData is None: # Force engineID discovery (rfc3414, 4) securityEngineID = securityName = '' securityLevel = 1 # Clear possible auth&priv flags headerData.setComponentByPosition(2, chr(msgFlags & 0xfc)) # XXX scopedPDU = ScopedPDU() scopedPDU.setComponentByPosition(0, '') scopedPDU.setComponentByPosition(1, contextName) scopedPDU.setComponentByPosition(2) # Use dead-empty PDU for engine-discovery report emptyPdu = pdu.clone() pMod.apiPDU.setDefaults(emptyPdu) scopedPDU.getComponentByPosition(2).setComponentByType( emptyPdu.tagSet, emptyPdu ) debug.logger & debug.flagMP and debug.logger('prepareOutgoingMessage: force engineID discovery') else: securityEngineID = peerSnmpEngineData['securityEngineID'] debug.logger & debug.flagMP and debug.logger('prepareOutgoingMessage: securityEngineID %s' % securityEngineID) # 7.1.9.b ( securityParameters, wholeMsg ) = smHandler.generateRequestMsg( snmpEngine, self.messageProcessingModelID, msg, snmpEngineMaxMessageSize.syntax, securityModel, securityEngineID, securityName, securityLevel, scopedPDU ) # Message size constraint verification if len(wholeMsg) > 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 = 'dataMispatch' ) # 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 = 'engineIDMispatch' ) # 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={{pysnmp/proto/mpmod/base.pyc; t[Lc@s$dklZdfdYZdS((serrorsAbstractMessageProcessingModelcBstZeZdZZdZdZdZdZ dZ dZ dZ d Z d Zd Zd Zd ZdZdZRS(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     cCstiddS(Nsmethod not implemented(serrors ProtocolError(sselfs snmpEnginestransportDomainstransportAddresssmessageProcessingModels securityModels securityNames securityLevelscontextEngineIds contextNames pduVersionspdusexpectResponses sendPduHandle((s5build/bdist.linux-i686/egg/pysnmp/proto/mpmod/base.pysprepareOutgoingMessagesc CstiddS(Nsmethod not implemented(serrors ProtocolError( sselfs snmpEnginesmessageProcessingModels securityModels securityNames securityLevelscontextEngineIds contextNames pduVersionspdusmaxSizeResponseScopedPDUsstateReferencesstatusInformation((s5build/bdist.linux-i686/egg/pysnmp/proto/mpmod/base.pysprepareResponseMessage!scCstiddS(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||fn|id}||f|i|<|i i| oh|i | 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="Rv#v#pysnmp/proto/api/v2c.pyc; Kc@sdklZlZlZdklZdklZdkl Z l Z l Z e i Z e i Z eiZeiZeiZeiZeiZeiZeiZeiZeiZeiZeiZeiZeiZeiZeiZeiZZeiZei Z ei!Z!ei"Z"Z#ei$Z$dei%fdYZ%ei&Z&ei'Z'dei(fdYZ(e(Z)de(fd YZ*e*Z+d ei(fd YZ,e,Z-d ei.fd YZ.e.Z/dS((srfc1902srfc1905serror(sv1(sexval(sunivs namedtypesnamedvalsMessagecBshtZeieideideiddfeidei 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,tZdZdZdZdZRS(NcCs7t}|i||i||i||SdS(N(s ResponsePDUsrspPDUsselfs setDefaultss setRequestIDs getRequestIDsreqPDU(sselfsreqPDUsrspPDU((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pys getResponse.s  cCsag}xMti|D]<\}}tii|o t }n|i ||fqW|gSdS(N( svarBindssapiPDUs getVarBindssrspPDUsoidsvalsexvalsendOfMibsisSameTypeWithsNonesappend(sselfsreqPDUsrspPDUsvarBindssvalsoid((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pysgetVarBindTable4s  cCs.|i|}||didtidS(Ni(sselfsgetVarBindListspdus varBindLists errorIndexssetComponentByPositionsexvalsendOfMib(sselfspdus errorIndexs varBindList((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pyssetEndOfMibError<scCs.|i|}||didtidS(Ni(sselfsgetVarBindListspdus varBindLists errorIndexssetComponentByPositionsexvalsnoSuchInstance(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>tZdZdZdZdZdZdZRS(NcCs$ti|||idddS(Nii (sPDUAPIs setDefaultssselfspdussetComponentByPosition(sselfspdu((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pys setDefaultsGscCs|idSdS(Ni(spdusgetComponentByPosition(sselfspdu((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pysgetNonRepeatersKscCs|id|dS(Ni(spdussetComponentByPositionsvalue(sselfspdusvalue((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pyssetNonRepeatersLscCs|idSdS(Ni(spdusgetComponentByPosition(sselfspdu((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pysgetMaxRepetitionsNscCs|id|dS(Ni(spdussetComponentByPositionsvalue(sselfspdusvalue((s2build/bdist.linux-i686/egg/pysnmp/proto/api/v2c.pyssetMaxRepetitionsOscCsHt|i|}t|t|i|} t t|i|| d} | djo d} n6tt|i |tt i|| | } t i|}g}|g}x]t| D]O} ti|| \}}tii|o t}n|i||fqWxt| D]}t||djo|ign|d} xt| D]}x4|ot| | jo| i|d|qzW| || |} ti|| \}}tii|o t}nt| || djo| i||fqq||f| | 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): (x, None), 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=spysnmp/proto/api/__init__.pyc; Bc@sJdklZlZlZdZdZhee<ee %s(spdusgetComponentByPositions errorIndexslenserrors ProtocolError(sselfspdus errorIndex((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys getErrorIndex8s'cCs|id|dS(Ni(spdussetComponentByPositionsvalue(sselfspdusvalue((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys setErrorIndex?scCs|i|ddS(Ni(sselfssetErrorStatusspdu(sselfspdus errorIndex((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pyssetEndOfMibErrorBscCs|i||dS(N(sselfssetEndOfMibErrorspdus errorIndex(sselfspdus errorIndex((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pyssetNoSuchInstanceErrorEscCs|idSdS(Ni(spdusgetComponentByPosition(sselfspdu((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pysgetVarBindListHscCs|id|}dS(Ni(spdussetComponentByPositions varBindList(sselfspdus varBindList((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pyssetVarBindListJscCstd|idSdS(NcCs ti|S(N(s apiVarBinds getOIDValsx(sx((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pysNsi(smapspdusgetComponentByPosition(sselfspdu((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys getVarBindsMs cCs|idid}|id}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 setVarBindsPs  cCs7t}|i||i||i||SdS(N(sGetResponsePDUsrspPDUsselfs setDefaultss setRequestIDs getRequestIDsreqPDU(sselfsreqPDUsrspPDU((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys getResponse^s  cCsJti|djo tdti|gSnti|gSdS(NicCs|\}}|tfS(N(sxsysNone(s.0sxsy((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pysfs(sapiPDUsgetErrorStatussrspPDUsmaps getVarBindssreqPDU(sselfsreqPDUsrspPDU((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pysgetVarBindTableds (s__name__s __module__s setDefaultss getRequestIDs setRequestIDsgetErrorStatusssetErrorStatuss getErrorIndexs setErrorIndexssetEndOfMibErrorssetNoSuchInstanceErrorsgetVarBindListssetVarBindLists getVarBindss setVarBindss getResponsesgetVarBindTable(((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pysPDUAPI+s              s TrapPDUAPIcBstZy(dkZeeieiZWnedZnXdZdZdZ dZ dZ dZ dZ d Zd Zd Zd Zd ZdZdZdZRS(Ns0.0.0.0c Cs|iddddddddf|ididid|i|idd|idd|idd|iddS( NiiiiiiOii(spdussetComponentByPositionsgetComponentByPositionsselfs agentAddress(sselfspdu((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys setDefaultsrs %%cCs|idSdS(Ni(spdusgetComponentByPosition(sselfspdu((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys getEnterprisezscCs|id|dS(Ni(spdussetComponentByPositionsvalue(sselfspdusvalue((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys setEnterprise{scCs|ididSdS(Nii(spdusgetComponentByPosition(sselfspdu((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys getAgentAddr}scCs|idid|dS(Nii(spdusgetComponentByPositionssetComponentByPositionsvalue(sselfspdusvalue((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys setAgentAddrscCs|idSdS(Ni(spdusgetComponentByPosition(sselfspdu((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pysgetGenericTrapscCs|id|dS(Ni(spdussetComponentByPositionsvalue(sselfspdusvalue((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pyssetGenericTrapscCs|idSdS(Ni(spdusgetComponentByPosition(sselfspdu((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pysgetSpecificTrapscCs|id|dS(Ni(spdussetComponentByPositionsvalue(sselfspdusvalue((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pyssetSpecificTrapscCs|idSdS(Ni(spdusgetComponentByPosition(sselfspdu((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys getTimeStampscCs|id|dS(Ni(spdussetComponentByPositionsvalue(sselfspdusvalue((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys setTimeStampscCs|idSdS(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.pyssetVarBindListscCstd|idSdS(NcCs ti|S(N(s apiVarBinds getOIDValsx(sx((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pyssi(smapspdusgetComponentByPosition(sselfspdu((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys getVarBindss cCs|idid}|id}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 setVarBindss  (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 TrapPDUAPIls(               s MessageAPIcBsPtZdZdZdZdZdZdZdZdZ RS( NcCs(|idd|idd|SdS(Niispublic(smsgssetComponentByPosition(sselfsmsg((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys setDefaultsscCs|idSdS(Ni(smsgsgetComponentByPosition(sselfsmsg((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys getVersionscCs|id|dS(Ni(smsgssetComponentByPositionsvalue(sselfsmsgsvalue((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys setVersionscCs|idSdS(Ni(smsgsgetComponentByPosition(sselfsmsg((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys getCommunityscCs|id|dS(Ni(smsgssetComponentByPositionsvalue(sselfsmsgsvalue((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys setCommunityscCs|idiSdS(Ni(smsgsgetComponentByPositions getComponent(sselfsmsg((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pysgetPDUscCs/|ididi|i|ddS(Nii(smsgssetComponentByPositionsgetComponentByPositionssetComponentByTypesvalues getTagSet(sselfsmsgsvalue((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pyssetPDUscCsrt}|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 getResponses   "( s__name__s __module__s setDefaultss getVersions setVersions getCommunitys setCommunitysgetPDUssetPDUs getResponse(((s1build/bdist.linux-i686/egg/pysnmp/proto/api/v1.pys MessageAPIs       ($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<                      ? 5 PK= EEpysnmp/proto/api/verdec.pyc; Bc@sdklZdZdS((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 PKr;C!Xpysnmp/proto/api/v2c.pyfrom pysnmp.proto import rfc1902, rfc1905, error from pysnmp.proto.api import v1 from pysnmp.smi import exval 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): varBinds = [] for oid, val in apiPDU.getVarBinds(rspPDU): if exval.endOfMib.isSameTypeWith(val): val = None varBinds.append((oid, val)) return [ varBinds ] def setEndOfMibError(self, pdu, errorIndex): varBindList = self.getVarBindList(pdu) varBindList[errorIndex-1].setComponentByPosition(1, exval.endOfMib) def setNoSuchInstanceError(self, pdu, errorIndex): varBindList = self.getVarBindList(pdu) varBindList[errorIndex-1].setComponentByPosition(1,exval.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 = int(self.getNonRepeaters(reqPDU)) N = min(nonRepeaters, len(self.getVarBindList(reqPDU))) R = max(len(self.getVarBindList(reqPDU))-N, 0) if R == 0: M = 0 else: M = int(min(self.getMaxRepetitions(reqPDU), (len(apiPDU.getVarBindList(rspPDU))-N))/R) varBindList = apiPDU.getVarBindList(rspPDU) varBindRows = []; varBindTable = [ varBindRows ] # __null = Null() for idx in range(N): oid, val = apiVarBind.getOIDVal(varBindList[idx]) if exval.endOfMib.isSameTypeWith(val): val = None # val = __null varBindRows.append((oid, val)) for rowIdx in range(M): if len(varBindTable) < rowIdx+1: varBindTable.append([]) varBindRow = varBindTable[-1] for colIdx in range(R): while rowIdx and len(varBindRow) < N: varBindRow.append(varBindTable[-2][colIdx]) idx = N + rowIdx*R + colIdx oid, val = apiVarBind.getOIDVal(varBindList[idx]) if exval.endOfMib.isSameTypeWith(val): val = None if len(varBindRow) < colIdx+N+1: varBindRow.append((oid, val)) else: varBindRow[colIdx] = (oid, val) 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) 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() PKu2ΩFpysnmp/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=W##pysnmp/proto/secmod/rfc2576.pyc; OlKc@sdkZdklZdklZdklZlZdkl Z dk l Z dk l Z deifdYZd efd YZdS( N(sencoder(sbase(sudpsudp6(sNoSuchInstanceError(serror(sdebugsSnmpV1SecurityModelcBs)tZdZdZdZdZRS(Nic Cs|\}| \}}}|iii i dddddd\}}} }}|} xnoy|i| i} Wntj oPnX| i|joq^n| 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#ft$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 nextMibNodes getNextNodesnamesNoSuchInstanceErrorssyntaxs securityNameslensinstIdsgetNodesmibNodessecurityParameterssdebugsloggersflagSMssetComponentByPositionsgetComponentByPositionssetComponentByTypestagSetsflagMPs prettyPrintsencodersencodeswholeMsgserrorsStatusInformation(sselfs snmpEnginesmessageProcessingModels globalDatasmaxMessageSizes securityModelssecurityEngineIds securityNames securityLevels scopedPDUsmibNodesinstIds nextMibNodessnmpCommunityContextEngineIdscontextEngineIdssnmpCommunitySecurityNamesmsgs contextNamessnmpCommunityTransportTagssecurityParametersspduswholeMsgssnmpCommunityContextNamessnmpCommunityName((s9build/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc2576.pysgenerateRequestMsgsD  . +c Cs|\}| \} } }|i| } | d}t i t i @ot i d|| f|id||id|idi|i|t i t i@ot i d|ifti|}||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.pysgenerateResponseMsgYs  ( +c +Cs|\}}}|iiiidddddd\})}} }%}"|)} h}x-no%y|)i| i} WnStj oG|iiiidd \}|id|_tid d nX| i|joq[n| it|)i} |"i|"i| }$|$iog| o|iiiid d dd\} }(}|}*xnoy|i|*i}*Wntj oPnX|*it|i}| i| i|i}|(i|(i|i}t"|}|t#i$jo4|iiiidd\}!t"|!|}nE|t&i'jo4|iiiidd\}t"||}n||f}#|i|i|i}'|i+|# oh||# 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.getNextNode( nextMibNode.name ) except NoSuchInstanceError: break if nextMibNode.syntax != securityName: continue 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.getNextNode( nextMibNode.name ) except NoSuchInstanceError: snmpInBadCommunityNames, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMPv2-MIB', 'snmpInBadCommunityNames') snmpInBadCommunityNames.syntax = snmpInBadCommunityNames.syntax+1 raise error.StatusInformation( errorIndication = 'unknownCommunityName' ) if nextMibNode.syntax != communityName: continue 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 == udp.snmpUDPDomain: SnmpUDPAddress, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('SNMPv2-TM', 'SnmpUDPAddress') targetAddrTAddress = tuple( SnmpUDPAddress(targetAddrTAddress) ) elif targetAddrTDomain == 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=OOT(pysnmp/proto/secmod/rfc3826/__init__.pyc; :Fc@sdS(N((((sBbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3826/__init__.pys?sPK6'pysnmp/proto/secmod/rfc3826/__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?sPK=m::(pysnmp/proto/secmod/rfc3826/priv/aes.pyc; #Lc@sdkZdkZdklZdklZdklZydkl Z Wne j oddfZ nXydk l Z Wne j o e Z nXeideifdYZdS( N(sbase(suniv(serror(s version_infoi(sAESsAesc BstZddddddddddf ZeddfjoeeidZneiddZd Zd Z d Z d Z RS( Niiii iilic 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( Ni8ii0i(i iiiliis( 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|dt|dt|dt|dt|d t|d t|d t|d g}|d ti t t |d fSdS(Niiiiiiiiiiiis( slongssnmpEngineBootsssnmpEngineTimesstrssaltsordsivsprivKeysstringsjoinsmapschr(sselfsprivKeyssnmpEngineBootsssnmpEngineTimessaltsiv((sBbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3826/priv/aes.pys__getDecryptionKey3s*c Csttjotiddn|\}}}|i t |||\}}}ti|ti|dd} |ddt|d}| i|} ti| ti|fSdS(NserrorIndicationsencryptionErrors segment_sizeisi(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 Csttjotiddn|\}}}t|djotiddn|i t ||||\}}ti|ti|dd} |ddt|d}| it |SdS(NserrorIndicationsdecryptionErroris segment_sizeisi(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     PKM>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)) PK6,pysnmp/proto/secmod/rfc3826/priv/__init__.pyPKQ;W'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 * (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 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) PKh<~[I]]&pysnmp/proto/secmod/rfc3414/service.py# SNMP v3 USM model services from pysnmp.proto.secmod.base import AbstractSecurityModel 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.proto.secmod.rfc3414 import localkey from pysnmp.smi.error import NoSuchInstanceError from pysnmp.proto import rfc1155, error from pyasn1.type import univ, namedtype, constraint from pyasn1.codec.ber import encoder, decoder from pyasn1.error import PyAsn1Error from pysnmp import debug import time # USM security params class UsmSecurityParameters(rfc1155.TypeCoercionHackMixIn, univ.Sequence): componentType = namedtype.NamedTypes( namedtype.NamedType('msgAuthoritativeEngineID', univ.OctetString()), namedtype.NamedType('msgAuthoritativeEngineBoots', univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(0, 2147483647L))), namedtype.NamedType('msgAuthoritativeEngineTime', univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(0, 2147483647L))), namedtype.NamedType('msgUserName', univ.OctetString().subtype(subtypeSpec=constraint.ValueSizeConstraint(0, 32))), namedtype.NamedType('msgAuthenticationParameters', univ.OctetString()), namedtype.NamedType('msgPrivacyParameters', univ.OctetString()) ) class SnmpUSMSecurityModel(AbstractSecurityModel): securityModelID = 3 authServices = { hmacmd5.HmacMd5.serviceID: hmacmd5.HmacMd5(), hmacsha.HmacSha.serviceID: hmacsha.HmacSha(), noauth.NoAuth.serviceID: noauth.NoAuth() } privServices = { des.Des.serviceID: des.Des(), aes.Aes.serviceID: aes.Aes(), nopriv.NoPriv.serviceID: nopriv.NoPriv() } _securityParametersSpec = UsmSecurityParameters() def __init__(self): AbstractSecurityModel.__init__(self) self.__timeline = {} self.__timelineExpQueue = {} self.__expirationTimer = 0L def __getUserInfo( self, mibInstrumController, securityEngineID, securityName ): usmUserEntry, = mibInstrumController.mibBuilder.importSymbols( 'SNMP-USER-BASED-SM-MIB', 'usmUserEntry' ) tblIdx = usmUserEntry.getInstIdFromIndices( securityEngineID, securityName ) # Get protocols usmUserSecurityName = usmUserEntry.getNode( usmUserEntry.name + (3,) + tblIdx ).syntax usmUserAuthProtocol = usmUserEntry.getNode( usmUserEntry.name + (5,) + tblIdx ).syntax usmUserPrivProtocol = usmUserEntry.getNode( usmUserEntry.name + (8,) + tblIdx ).syntax # Get keys pysnmpUsmKeyEntry, = mibInstrumController.mibBuilder.importSymbols( 'PYSNMP-USM-MIB', 'pysnmpUsmKeyEntry' ) pysnmpUsmKeyAuthLocalized = pysnmpUsmKeyEntry.getNode( pysnmpUsmKeyEntry.name + (1,) + tblIdx ).syntax pysnmpUsmKeyPrivLocalized = pysnmpUsmKeyEntry.getNode( pysnmpUsmKeyEntry.name + (2,) + tblIdx ).syntax return ( usmUserSecurityName, # XXX function needed? usmUserAuthProtocol, pysnmpUsmKeyAuthLocalized, usmUserPrivProtocol, pysnmpUsmKeyPrivLocalized ) def __cloneUserInfo( self, mibInstrumController, securityEngineID, securityName ): snmpEngineID, = mibInstrumController.mibBuilder.importSymbols( '__SNMP-FRAMEWORK-MIB', 'snmpEngineID' ) # Proto entry usmUserEntry, = mibInstrumController.mibBuilder.importSymbols( 'SNMP-USER-BASED-SM-MIB', 'usmUserEntry' ) tblIdx = usmUserEntry.getInstIdFromIndices( snmpEngineID.syntax, securityName ) # Get proto protocols usmUserSecurityName = usmUserEntry.getNode( usmUserEntry.name + (3,) + tblIdx ) usmUserAuthProtocol = usmUserEntry.getNode( usmUserEntry.name + (5,) + tblIdx ) usmUserPrivProtocol = usmUserEntry.getNode( usmUserEntry.name + (8,) + tblIdx ) # Get proto keys pysnmpUsmKeyEntry, = mibInstrumController.mibBuilder.importSymbols( 'PYSNMP-USM-MIB', 'pysnmpUsmKeyEntry' ) pysnmpUsmKeyAuth = pysnmpUsmKeyEntry.getNode( pysnmpUsmKeyEntry.name + (3,) + tblIdx ) pysnmpUsmKeyPriv = pysnmpUsmKeyEntry.getNode( pysnmpUsmKeyEntry.name + (4,) + tblIdx ) # Create new row from proto values tblIdx = usmUserEntry.getInstIdFromIndices( securityEngineID, securityName ) # New row mibInstrumController.writeVars( ((usmUserEntry.name + (13,) + tblIdx, 4),) ) # Set protocols usmUserEntry.getNode( usmUserEntry.name + (3,) + tblIdx ).syntax = usmUserSecurityName.syntax usmUserEntry.getNode( usmUserEntry.name + (5,) + tblIdx ).syntax = usmUserAuthProtocol.syntax usmUserEntry.getNode( usmUserEntry.name + (8,) + tblIdx ).syntax = usmUserPrivProtocol.syntax # Localize and set keys pysnmpUsmKeyEntry, = mibInstrumController.mibBuilder.importSymbols( 'PYSNMP-USM-MIB', 'pysnmpUsmKeyEntry' ) pysnmpUsmKeyAuthLocalized = pysnmpUsmKeyEntry.getNode( pysnmpUsmKeyEntry.name + (1,) + tblIdx ) if usmUserAuthProtocol.syntax == hmacsha.HmacSha.serviceID: localAuthKey = localkey.localizeKeySHA( pysnmpUsmKeyAuth.syntax, securityEngineID ) elif usmUserAuthProtocol.syntax == hmacmd5.HmacMd5.serviceID: localAuthKey = localkey.localizeKeyMD5( pysnmpUsmKeyAuth.syntax, securityEngineID ) elif usmUserAuthProtocol.syntax == noauth.NoAuth.serviceID: localAuthKey = None else: raise error.StatusInformation( errorIndication = 'unsupportedAuthProtocol' ) if localAuthKey is not None: pysnmpUsmKeyAuthLocalized.syntax = pysnmpUsmKeyAuthLocalized.syntax.clone(localAuthKey) pysnmpUsmKeyPrivLocalized = pysnmpUsmKeyEntry.getNode( pysnmpUsmKeyEntry.name + (2,) + tblIdx ) if usmUserPrivProtocol.syntax == des.Des.serviceID or \ usmUserPrivProtocol.syntax == aes.Aes.serviceID: if usmUserAuthProtocol.syntax == hmacsha.HmacSha.serviceID: localPrivKey = localkey.localizeKeySHA( pysnmpUsmKeyPriv.syntax, securityEngineID ) else: localPrivKey = localkey.localizeKeyMD5( pysnmpUsmKeyPriv.syntax, securityEngineID ) elif usmUserPrivProtocol.syntax == nopriv.NoPriv.serviceID: localPrivKey = None else: raise error.StatusInformation( errorIndication = 'unsupportedPrivProtocol' ) if localPrivKey is not None: pysnmpUsmKeyPrivLocalized.syntax = pysnmpUsmKeyPrivLocalized.syntax.clone(localPrivKey) return ( usmUserSecurityName.syntax, # XXX function needed? usmUserAuthProtocol.syntax, pysnmpUsmKeyAuthLocalized.syntax, usmUserPrivProtocol.syntax, pysnmpUsmKeyPrivLocalized.syntax ) def __generateRequestOrResponseMsg( self, snmpEngine, messageProcessingModel, globalData, maxMessageSize, securityModel, securityEngineID, securityName, securityLevel, scopedPDU, securityStateReference ): snmpEngineID = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-FRAMEWORK-MIB', 'snmpEngineID')[0].syntax # 3.1.1 if securityStateReference is not None: # 3.1.1a cachedSecurityData = self._cachePop(securityStateReference) usmUserName = cachedSecurityData['msgUserName'] usmUserAuthProtocol = cachedSecurityData.get('usmUserAuthProtocol') usmUserAuthKeyLocalized = cachedSecurityData.get( 'usmUserAuthKeyLocalized' ) usmUserPrivProtocol = cachedSecurityData.get('usmUserPrivProtocol') usmUserPrivKeyLocalized = cachedSecurityData.get( 'usmUserPrivKeyLocalized' ) securityEngineID = snmpEngineID debug.logger & debug.flagSM and debug.logger('__generateRequestOrResponseMsg: user info read from cache') elif securityName: # 3.1.1b try: ( usmUserName, usmUserAuthProtocol, usmUserAuthKeyLocalized, usmUserPrivProtocol, usmUserPrivKeyLocalized ) = self.__getUserInfo( snmpEngine.msgAndPduDsp.mibInstrumController, securityEngineID, securityName ) debug.logger & debug.flagSM and debug.logger('__generateRequestOrResponseMsg: read user info') except NoSuchInstanceError: pysnmpUsmDiscovery, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__PYSNMP-USM-MIB', 'pysnmpUsmDiscovery') __reportUnknownName = not pysnmpUsmDiscovery.syntax if not __reportUnknownName: try: ( usmUserName, usmUserAuthProtocol, usmUserAuthKeyLocalized, usmUserPrivProtocol, usmUserPrivKeyLocalized ) = self.__cloneUserInfo( snmpEngine.msgAndPduDsp.mibInstrumController, securityEngineID, securityName ) except NoSuchInstanceError: __reportUnknownName = 1 if __reportUnknownName: raise error.StatusInformation( errorIndication = 'unknownSecurityName' ) debug.logger & debug.flagSM and debug.logger('__generateRequestOrResponseMsg: clone user info') else: # empty username used for engineID discovery usmUserName = usmUserSecurityName = '' usmUserAuthProtocol = usmUserAuthKeyLocalized = None usmUserPrivProtocol = usmUserPrivKeyLocalized = None debug.logger & debug.flagSM and debug.logger('__generateRequestOrResponseMsg: use empty USM data') debug.logger & debug.flagSM and debug.logger('__generateRequestOrResponseMsg: local user usmUserName %s usmUserAuthProtocol %s usmUserPrivProtocol %s by securityEngineID %s securityName %s' % (usmUserName, usmUserAuthProtocol, usmUserPrivProtocol, repr(securityEngineID), securityName)) msg = globalData # 3.1.2 if securityLevel == 3: if not usmUserAuthProtocol or not usmUserPrivProtocol: raise error.StatusInformation( errorIndication = 'unsupportedSecurityLevel' ) # 3.1.3 if securityLevel == 3 or securityLevel == 2: if not usmUserAuthProtocol: raise error.StatusInformation( errorIndication = 'unsupportedSecurityLevel' ) securityParameters = UsmSecurityParameters() scopedPDUData = msg.setComponentByPosition(3).getComponentByPosition(3) scopedPDUData.setComponentByPosition(0, scopedPDU) # 3.1.6a if securityStateReference is None and ( # request type check added securityLevel == 3 or securityLevel == 2 ): if self.__timeline.has_key(securityEngineID): ( snmpEngineBoots, snmpEngineTime, latestReceivedEngineTime, latestUpdateTimestamp) = self.__timeline[ securityEngineID ] debug.logger & debug.flagSM and debug.logger('__generateRequestOrResponseMsg: read snmpEngineBoots, snmpEngineTime from timeline') else: # 2.3 XXX is this correct? snmpEngineBoots = snmpEngineTime = 0 debug.logger & debug.flagSM and debug.logger('__generateRequestOrResponseMsg: no timeline for securityEngineID %s' % repr(securityEngineID)) # 3.1.6.b elif securityStateReference is not None: # XXX Report? ( snmpEngineBoots, snmpEngineTime ) = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-FRAMEWORK-MIB', 'snmpEngineBoots', 'snmpEngineTime') snmpEngineBoots = snmpEngineBoots.syntax snmpEngineTime = snmpEngineTime.syntax.clone() debug.logger & debug.flagSM and debug.logger('__generateRequestOrResponseMsg: read snmpEngineBoots, snmpEngineTime from LCD') # 3.1.6.c else: snmpEngineBoots = snmpEngineTime = 0 debug.logger & debug.flagSM and debug.logger('__generateRequestOrResponseMsg: assuming zero snmpEngineBoots, snmpEngineTime') debug.logger & debug.flagSM and debug.logger('__generateRequestOrResponseMsg: use snmpEngineBoots %s snmpEngineTime %s for securityEngineID %s' % (snmpEngineBoots, snmpEngineTime, repr(securityEngineID))) # 3.1.4a if securityLevel == 3: privHandler = self.privServices.get(usmUserPrivProtocol) if privHandler is None: raise error.StatusInformation( errorIndication = 'encryptionError' ) debug.logger & debug.flagSM and debug.logger('__generateRequestOrResponseMsg: scopedPDU %s' % scopedPDU.prettyPrint()) dataToEncrypt = encoder.encode(scopedPDU) debug.logger & debug.flagSM and debug.logger('__generateRequestOrResponseMsg: scopedPDU encoded into %s' % repr(dataToEncrypt)) ( encryptedData, privParameters ) = privHandler.encryptData( usmUserPrivKeyLocalized, ( snmpEngineBoots, snmpEngineTime, None ), dataToEncrypt ) securityParameters.setComponentByPosition(5, privParameters) scopedPDUData.setComponentByPosition(1, encryptedData) debug.logger & debug.flagSM and debug.logger('__generateRequestOrResponseMsg: scopedPDU ciphered') # 3.1.4b elif securityLevel == 1 or securityLevel == 2: securityParameters.setComponentByPosition(5, '') debug.logger & debug.flagSM and debug.logger('__generateRequestOrResponseMsg: %s' % scopedPDUData.prettyPrint()) # 3.1.5 securityParameters.setComponentByPosition(0, securityEngineID) securityParameters.setComponentByPosition(1, snmpEngineBoots) securityParameters.setComponentByPosition(2, snmpEngineTime) # 3.1.7 securityParameters.setComponentByPosition(3, usmUserName) # 3.1.8a if securityLevel == 3 or securityLevel == 2: authHandler = self.authServices.get(usmUserAuthProtocol) if authHandler is None: raise error.StatusInformation( errorIndication = 'authenticationFailure' ) # extra-wild hack to facilitate BER substrate in-place re-write securityParameters.setComponentByPosition( 4, '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' ) debug.logger & debug.flagSM and debug.logger('__generateRequestOrResponseMsg: %s' % (securityParameters.prettyPrint(),)) msg.setComponentByPosition(2, encoder.encode(securityParameters)) debug.logger & debug.flagSM and debug.logger('__generateRequestOrResponseMsg: auth outgoing msg: %s' % msg.prettyPrint()) wholeMsg = encoder.encode(msg) authenticatedWholeMsg = authHandler.authenticateOutgoingMsg( usmUserAuthKeyLocalized, wholeMsg ) # 3.1.8b else: securityParameters.setComponentByPosition(4, '') debug.logger & debug.flagSM and debug.logger('__generateRequestOrResponseMsg: %s' % (securityParameters.prettyPrint(),)) msg.setComponentByPosition(2, encoder.encode(securityParameters)) debug.logger & debug.flagSM and debug.logger('__generateRequestOrResponseMsg: plain outgoing msg: %s' % msg.prettyPrint()) authenticatedWholeMsg = encoder.encode(msg) # 3.1.9 return ( msg.getComponentByPosition(2), authenticatedWholeMsg ) def generateRequestMsg( self, snmpEngine, messageProcessingModel, globalData, maxMessageSize, securityModel, securityEngineID, securityName, securityLevel, scopedPDU, ): return self.__generateRequestOrResponseMsg( snmpEngine, messageProcessingModel, globalData, maxMessageSize, securityModel, securityEngineID, securityName, securityLevel, scopedPDU, None ) def generateResponseMsg( self, snmpEngine, messageProcessingModel, globalData, maxMessageSize, securityModel, securityEngineID, securityName, securityLevel, scopedPDU, securityStateReference ): return self.__generateRequestOrResponseMsg( snmpEngine, messageProcessingModel, globalData, maxMessageSize, securityModel, securityEngineID, securityName, securityLevel, scopedPDU, securityStateReference ) # 3.2 def processIncomingMsg( self, snmpEngine, messageProcessingModel, maxMessageSize, securityParameters, securityModel, securityLevel, wholeMsg, msg # XXX ): # 3.2.1 try: securityParameters, rest = decoder.decode( securityParameters, asn1Spec=self._securityParametersSpec ) except PyAsn1Error: snmpInASNParseErrs, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMPv2-MIB', 'snmpInASNParseErrs') snmpInASNParseErrs.syntax = snmpInASNParseErrs.syntax + 1 raise error.StatusInformation( errorIndication='parseError' ) debug.logger & debug.flagSM and debug.logger('processIncomingMsg: %s' % (securityParameters.prettyPrint(),)) # 3.2.9 -- moved up here to be able to report # maxSizeResponseScopedPDU on error try: maxSizeResponseScopedPDU = maxMessageSize - len(securityParameters) - 48 # maximum SNMPv3 header length except PyAsn1Error: maxSizeResponseScopedPDU = 0 # 3.2.2 securityEngineID = securityParameters.getComponentByPosition(0) securityStateReference = self._cachePush( msgUserName=securityParameters.getComponentByPosition(3) ) debug.logger & debug.flagSM and debug.logger('processIncomingMsg: cache read securityStateReference %s by msgUserName %s' % (securityStateReference, securityParameters.getComponentByPosition(3))) scopedPduData = msg.getComponentByPosition(3) # Used for error reporting contextEngineId = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-FRAMEWORK-MIB', 'snmpEngineID')[0].syntax contextName = '' # 3.2.3 if not self.__timeline.has_key(securityEngineID): debug.logger & debug.flagSM and debug.logger('processIncomingMsg: unknown securityEngineID %s' % repr(securityEngineID)) if securityEngineID: # 3.2.3a XXX any other way to get auth engine in cache? self.__timeline[securityEngineID] = ( securityParameters.getComponentByPosition(1), securityParameters.getComponentByPosition(2), securityParameters.getComponentByPosition(2), int(time.time()) ) expireAt = self.__expirationTimer + 300 if not self.__timelineExpQueue.has_key(expireAt): self.__timelineExpQueue[expireAt] = [] self.__timelineExpQueue[expireAt].append(securityEngineID) debug.logger & debug.flagSM and debug.logger('processIncomingMsg: store timeline for securityEngineID %s' % repr(securityEngineID)) else: # 3.2.3b usmStatsUnknownEngineIDs, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-USER-BASED-SM-MIB', 'usmStatsUnknownEngineIDs') usmStatsUnknownEngineIDs.syntax = usmStatsUnknownEngineIDs.syntax+1 debug.logger & debug.flagSM and debug.logger('processIncomingMsg: null securityEngineID') pysnmpUsmDiscoverable, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__PYSNMP-USM-MIB', 'pysnmpUsmDiscoverable') if pysnmpUsmDiscoverable.syntax: debug.logger & debug.flagSM and debug.logger('processIncomingMsg: request EngineID discovery') # Report original contextName if scopedPduData.getName() != 'plaintext': debug.logger & debug.flagSM and debug.logger('processIncomingMsg: scopedPduData not plaintext %s' % scopedPduData.prettyPrint()) raise error.StatusInformation( errorIndication = 'unknownEngineID' ) contextName = scopedPduData.getComponent().getComponentByPosition(1) raise error.StatusInformation( errorIndication = 'unknownEngineID', oid=usmStatsUnknownEngineIDs.name, val=usmStatsUnknownEngineIDs.syntax, securityStateReference=securityStateReference, contextEngineId=contextEngineId, contextName=contextName, maxSizeResponseScopedPDU=maxSizeResponseScopedPDU ) else: debug.logger & debug.flagSM and debug.logger('processIncomingMsg: will not discover EngineID') # free securityStateReference XXX raise error.StatusInformation( errorIndication = 'unknownEngineID' ) snmpEngineID = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-FRAMEWORK-MIB', 'snmpEngineID')[0].syntax msgAuthoritativeEngineID = securityParameters.getComponentByPosition(0) msgUserName = securityParameters.getComponentByPosition(3) debug.logger & debug.flagSM and debug.logger('processIncomingMsg: read from securityParams msgAuthoritativeEngineID %s msgUserName %s' % (repr(msgAuthoritativeEngineID), msgUserName)) if msgUserName: # 3.2.4 try: ( usmUserSecurityName, usmUserAuthProtocol, usmUserAuthKeyLocalized, usmUserPrivProtocol, usmUserPrivKeyLocalized ) = self.__getUserInfo( snmpEngine.msgAndPduDsp.mibInstrumController, msgAuthoritativeEngineID, msgUserName ) debug.logger & debug.flagSM and debug.logger('processIncomingMsg: read user info from LCD') except NoSuchInstanceError: pysnmpUsmDiscoverable, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__PYSNMP-USM-MIB', 'pysnmpUsmDiscoverable') __reportUnknownName = not pysnmpUsmDiscoverable.syntax if not __reportUnknownName: try: ( usmUserSecurityName, usmUserAuthProtocol, usmUserAuthKeyLocalized, usmUserPrivProtocol, usmUserPrivKeyLocalized ) = self.__cloneUserInfo( snmpEngine.msgAndPduDsp.mibInstrumController, securityEngineID, msgUserName ) debug.logger & debug.flagSM and debug.logger('processIncomingMsg: cloned user info') except NoSuchInstanceError: __reportUnknownName = 1 debug.logger & debug.flagSM and debug.logger('processIncomingMsg: unknown securityEngineID %s msgUserName %s' % (repr(securityEngineID), msgUserName)) if __reportUnknownName: 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, contextEngineId=contextEngineId, contextName=contextName, maxSizeResponseScopedPDU=maxSizeResponseScopedPDU ) else: # empty username used for engineID discovery usmUserName = usmUserSecurityName = '' usmUserAuthProtocol = usmUserAuthKeyLocalized = None usmUserPrivProtocol = usmUserPrivKeyLocalized = None debug.logger & debug.flagSM and debug.logger('processIncomingMsg: now have usmUserSecurityName %s usmUserAuthProtocol %s usmUserPrivProtocol %s for msgUserName %s' % (usmUserSecurityName, usmUserAuthProtocol, usmUserPrivProtocol, msgUserName)) # 3.2.5 __reportError = 0 if securityLevel == 3: if not usmUserAuthProtocol or not usmUserPrivProtocol: __reportError = 1 elif securityLevel == 2: if not usmUserAuthProtocol: __reportError = 1 if __reportError: usmStatsUnsupportedSecLevels, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-USER-BASED-SM-MIB', 'usmStatsUnsupportedSecLevels') usmStatsUnsupportedSecLevels.syntax = usmStatsUnsupportedSecLevels.syntax + 1 raise error.StatusInformation( errorIndication='unsupportedSecurityLevel', oid=usmStatsUnknownEngineIDs.name, val=usmStatsUnknownEngineIDs.syntax, securityStateReference=securityStateReference, contextEngineId=contextEngineId, contextName=contextName, maxSizeResponseScopedPDU=maxSizeResponseScopedPDU ) # 3.2.6 if securityLevel == 3 or securityLevel == 2: authHandler = self.authServices.get(usmUserAuthProtocol) if authHandler is None: raise error.StatusInformation( errorIndication = 'authenticationFailure' ) try: authenticatedWholeMsg = authHandler.authenticateIncomingMsg( usmUserAuthKeyLocalized, securityParameters.getComponentByPosition(4), wholeMsg ) except error.StatusInformation: usmStatsWrongDigests, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-USER-BASED-SM-MIB', 'usmStatsWrongDigests') usmStatsWrongDigests.syntax = usmStatsWrongDigests.syntax+1 raise error.StatusInformation( errorIndication = 'authenticationFailure', oid=usmStatsWrongDigests.name, val=usmStatsWrongDigests.syntax, securityStateReference=securityStateReference, contextEngineId=contextEngineId, contextName=contextName, maxSizeResponseScopedPDU=maxSizeResponseScopedPDU ) debug.logger & debug.flagSM and debug.logger('processIncomingMsg: incoming msg authenticated') # 3.2.7 if securityLevel == 3 or securityLevel == 2: if msgAuthoritativeEngineID == snmpEngineID: # Authoritative SNMP engine: use local notion (SF bug #1649032) ( snmpEngineBoots, snmpEngineTime ) = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMP-FRAMEWORK-MIB', 'snmpEngineBoots', 'snmpEngineTime') snmpEngineBoots = snmpEngineBoots.syntax snmpEngineTime = snmpEngineTime.syntax.clone() idleTime = 0 debug.logger & debug.flagSM and debug.logger('processIncomingMsg: read snmpEngineBoots (%s), snmpEngineTime (%s) from LCD' % (snmpEngineBoots, snmpEngineTime)) else: # Non-authoritative SNMP engine: use cached estimates if self.__timeline.has_key(securityEngineID): ( snmpEngineBoots, snmpEngineTime, latestReceivedEngineTime, latestUpdateTimestamp ) = self.__timeline[ msgAuthoritativeEngineID ] # time passed since last talk with this SNMP engine idleTime = int(time.time())-latestUpdateTimestamp debug.logger & debug.flagSM and debug.logger('processIncomingMsg: read timeline snmpEngineBoots %s snmpEngineTime %s for msgAuthoritativeEngineID %s, idle time %s secs' % (snmpEngineBoots, snmpEngineTime, repr(msgAuthoritativeEngineID), idleTime)) else: raise error.ProtocolError('Peer SNMP engine info missing') msgAuthoritativeEngineBoots = securityParameters.getComponentByPosition(1) msgAuthoritativeEngineTime = securityParameters.getComponentByPosition(2) # 3.2.7a if msgAuthoritativeEngineID == snmpEngineID: if snmpEngineBoots == 2147483647L or \ snmpEngineBoots != msgAuthoritativeEngineBoots or \ abs(idleTime + int(snmpEngineTime) - \ int(msgAuthoritativeEngineTime)) > 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()) ) 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, 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 # 3.2.11 self._cachePop(securityStateReference) securityStateReference = self._cachePush( msgUserName=securityParameters.getComponentByPosition(3), usmUserAuthProtocol=usmUserAuthProtocol, usmUserAuthKeyLocalized=usmUserAuthKeyLocalized, usmUserPrivProtocol=usmUserPrivProtocol, usmUserPrivKeyLocalized=usmUserPrivKeyLocalized ) 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 securityEngineID: 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=securityEngineID, contextEngineId=contextEngineId, contextName=contextName, maxSizeResponseScopedPDU=maxSizeResponseScopedPDU, PDU=scopedPDU ) # 3.2.12 return ( securityEngineID, securityName, scopedPDU, maxSizeResponseScopedPDU, securityStateReference ) def __expireTimelineInfo(self): if self.__timelineExpQueue.has_key(self.__expirationTimer): for engineIdKey in self.__timelineExpQueue[self.__expirationTimer]: 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=f%%(pysnmp/proto/secmod/rfc3414/__init__.pyc; UBc@sdklZeiZdS((sserviceN(spysnmp.proto.secmod.rfc3414sservicesSnmpUSMSecurityModel(sSnmpUSMSecurityModelsservice((sBbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/__init__.pys?s PK=``'pysnmp/proto/secmod/rfc3414/service.pyc; . #Lc@sdklZdklZlZlZdklZlZdk l Z dk l Z dk lZdklZlZdklZlZlZdklZlZd klZd klZd kZd eieifd YZ defdYZ!d S((sAbstractSecurityModel(shmacmd5shmacshasnoauth(sdessnopriv(saes(slocalkey(sNoSuchInstanceError(srfc1155serror(sunivs namedtypes constraint(sencodersdecoder(s PyAsn1Error(sdebugNsUsmSecurityParametersc BstZeieideieideiide i ddeideiide i ddeideiide i ddeid eieid eiZ RS( NsmsgAuthoritativeEngineIDsmsgAuthoritativeEngineBootss subtypeSpecilsmsgAuthoritativeEngineTimes msgUserNamei smsgAuthenticationParameterssmsgPrivacyParameters( s__name__s __module__s namedtypes NamedTypess NamedTypesunivs OctetStringsIntegerssubtypes constraintsValueRangeConstraintsValueSizeConstraints componentType(((sAbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/service.pysUsmSecurityParameterss ---sSnmpUSMSecurityModelcBstZdZheiiei<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__generateRequestOrResponseMsgs "  "" '   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.pysgenerateRequestMsgs 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.pysgenerateResponseMsgs c 4CsFy"ti|d|i\}}WnStj oG|ii i i dd\}$|$i d|$_ tiddnXtiti@otid|ify|t|d}Wntj o d }nX|id }|id |id }(titi@o tid |(|id f|id }2|ii i i d dd i }d}|ii | oMtiti@otidt!||o|id|id|idt"t#i#f|i|<|i$d} |i&i |  og|i&| titi@otid|2itiddn|2i+id}tiddd|i,d|i d|(d |d!|d"|qtiti@o tid#tiddn|ii i i d dd i }/|id }*|id } titi@otid$t!|*| f| oyL|i0|ii |*| \}#}}!}%}.titi@o tid%Wqt6j oF|ii i i dd\}|i } | olyL|i8|ii || \}#}}!}%}.titi@o tid&Wq8t6j o d} q8Xntiti@otid't!|| f| on|ii i i dd(\}-|-i d|-_ tidd)d|-i,d|-i d|(d |d!|d"|qqXnd}}#t;}}!t;}%}.titi@otid*|#||%| fd }|d joA| p|% o d}q|djo| o d}qqn|on|ii i i dd+\}|i d|_ tidd,d|i,d|i d|(d |d!|d"|n|d jp |djo|i?i@|}0|0t;jotidd-ny"|0iB|!|id.|}Wntij oq|ii i i dd/\}|i d|_ tidd-d|i,d|i d|(d |d!|d"|nXtiti@o tid0n|d jp |djo|*|/jon|ii i i d d1d2\}&} |&i }&| i iH} d }titi@otid3|&| fn|ii |og|i|*\}&} },}'t"t#i#|'}titi@o#tid4|&| t!|*|fntiLd5|id}3|id})|*|/jo|&d6jp1|&|3jp$tO|t"| t"|)d7jot|ii i i dd8\}+|+i d|+_ tidd9d|+i,d|+i d|(d:dd |d!|d"|q q |3|&jp|3|&jo |)|,joZ|3|)|)t"t#i#f|i|*|3|&jp1|3|&jo$tO|t"| t"|)d7jotidd9q n|d jo|iQi@|%}"|"t;jotidd<n|2id}|t;jotidd<nye|"iT|.|id|id|id=f|} titi@otid>t!| Wntij oq|ii i i dd?\}|i d|_ tidd<d|i,d|i d|(d |d!|d"|nX|2iWd id }1yti| d|1\}}Wq tj o=}titi@otid@|tidd<q Xn3|2id }|t;jotidd<ntiti@otidA|i|#} |i\|(|id |id dB|dC|!dD|%dE|.}(titi@otidF| |(f| o| oz|ii i i dd(\}-|-i d|-_ tidd)d|-i,d|-i d|(dG|d |d!|d"|dH| n|| |||(fSdS(INsasn1Specs __SNMPv2-MIBssnmpInASNParseErrsiserrorIndications parseErrorsprocessIncomingMsg: %si0is msgUserNameisJprocessIncomingMsg: cache read securityStateReference %s by msgUserName %ss__SNMP-FRAMEWORK-MIBs snmpEngineIDss/processIncomingMsg: unknown securityEngineID %sii,s:processIncomingMsg: store timeline for securityEngineID %ss__SNMP-USER-BASED-SM-MIBsusmStatsUnknownEngineIDss)processIncomingMsg: null securityEngineIDs__PYSNMP-USM-MIBspysnmpUsmDiscoverables.processIncomingMsg: request EngineID discoverys plaintexts2processIncomingMsg: scopedPduData not plaintext %ssunknownEngineIDsoidsvalssecurityStateReferencescontextEngineIds contextNamesmaxSizeResponseScopedPDUs.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 %ssusmStatsUnsupportedSecLevelssunsupportedSecurityLevelsauthenticationFailureisusmStatsWrongDigestss.processIncomingMsg: incoming msg authenticatedssnmpEngineBootsssnmpEngineTimesKprocessIncomingMsg: read snmpEngineBoots (%s), snmpEngineTime (%s) from LCDsyprocessIncomingMsg: read timeline snmpEngineBoots %s snmpEngineTime %s for msgAuthoritativeEngineID %s, idle time %s secssPeer SNMP engine info missinglisusmStatsNotInTimeWindowssnotInTimeWindows securityLevelsprocessIncomingMsg: stored timeline msgAuthoritativeEngineBoots %s msgAuthoritativeEngineTime %s for msgAuthoritativeEngineID %ssdecryptionErroris*processIncomingMsg: PDU deciphered into %ssusmStatsDecryptionErrorss/processIncomingMsg: scopedPDU decoder failed %ss(processIncomingMsg: scopedPDU decoded %ssusmUserAuthProtocolsusmUserAuthKeyLocalizedsusmUserPrivProtocolsusmUserPrivKeyLocalizedsKprocessIncomingMsg: cached msgUserName %s info by securityStateReference %sssecurityEngineIDsPDU(]sdecodersdecodessecurityParameterssselfs_securityParametersSpecsrests PyAsn1Errors snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolsssnmpInASNParseErrsssyntaxserrorsStatusInformationsdebugsloggersflagSMs prettyPrintsmaxMessageSizeslensmaxSizeResponseScopedPDUsgetComponentByPositionssecurityEngineIDs _cachePushssecurityStateReferencesmsgs scopedPduDatascontextEngineIds contextNames_SnmpUSMSecurityModel__timelineshas_keysreprsintstimes&_SnmpUSMSecurityModel__expirationTimersexpireAts'_SnmpUSMSecurityModel__timelineExpQueuesappendsusmStatsUnknownEngineIDsspysnmpUsmDiscoverablesgetNames getComponentsnames snmpEngineIDsmsgAuthoritativeEngineIDs msgUserNames"_SnmpUSMSecurityModel__getUserInfosusmUserSecurityNamesusmUserAuthProtocolsusmUserAuthKeyLocalizedsusmUserPrivProtocolsusmUserPrivKeyLocalizedsNoSuchInstanceErrors(_SnmpUSMSecurityModel__reportUnknownNames$_SnmpUSMSecurityModel__cloneUserInfosusmStatsUnknownUserNamess usmUserNamesNones"_SnmpUSMSecurityModel__reportErrors securityLevelsusmStatsUnsupportedSecLevelss authServicessgets authHandlersauthenticateIncomingMsgswholeMsgsauthenticatedWholeMsgsusmStatsWrongDigestsssnmpEngineBootsssnmpEngineTimesclonesidleTimeslatestReceivedEngineTimeslatestUpdateTimestamps ProtocolErrorsmsgAuthoritativeEngineBootssmsgAuthoritativeEngineTimesabssusmStatsNotInTimeWindowss privServicess privHandlers encryptedPDUs decryptDatas decryptedDatasusmStatsDecryptionErrorsssetComponentByPositions scopedPduSpecs scopedPDUswhys securityNames _cachePop(4sselfs snmpEnginesmessageProcessingModelsmaxMessageSizessecurityParameterss securityModels securityLevelswholeMsgsmsgs securityNamesexpireAtssnmpEngineTimes(_SnmpUSMSecurityModel__reportUnknownNames decryptedDatasrestspysnmpUsmDiscoverablesusmUserAuthProtocols"_SnmpUSMSecurityModel__reportErrors scopedPDUsauthenticatedWholeMsgscontextEngineIdsusmStatsWrongDigestssusmStatsUnsupportedSecLevelssusmStatsDecryptionErrorsswhys encryptedPDUssecurityEngineIDsmaxSizeResponseScopedPDUsidleTimes usmUserNamesusmStatsUnknownEngineIDss contextNames msgUserNamesusmUserAuthKeyLocalizeds privHandlersusmUserSecurityNamessnmpInASNParseErrssusmUserPrivProtocolssnmpEngineBootsslatestUpdateTimestampssecurityStateReferencesmsgAuthoritativeEngineTimesmsgAuthoritativeEngineIDsusmStatsNotInTimeWindowsslatestReceivedEngineTimesusmStatsUnknownUserNamessusmUserPrivKeyLocalizeds snmpEngineIDs authHandlers scopedPduSpecs scopedPduDatasmsgAuthoritativeEngineBoots((sAbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/service.pysprocessIncomingMsgs  + 1"(@ , (   ".*" ".      .             " $ ,8 A   '%5N    ' ,   " (  (   cCs|ii|io[xG|i|iD]5}|i|=titi@otid|fq'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|idS(N(sselfs)_SnmpUSMSecurityModel__expireTimelineInfo(sselfs snmpEnginestimeNow((sAbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/service.pysreceiveTimerTick3s(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   n ("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=r4 (pysnmp/proto/secmod/rfc3414/localkey.pyc; ƎJc@sydklZlZWn7ej o+dkZdkZeiZeiZnXdZdZdZdZ dZ dZ dS((smd5ssha1NcCst}|dt|d}t|}d}d}x~|djop|d}||jo|i |||!|}n.|i |||!|d||!||}|d}q<W|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||fiSdS(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 scCst}|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||fiSdS(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 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 PKA5ii(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=cd-pysnmp/proto/secmod/rfc3414/auth/__init__.pyc; Bc@sdS(N((((sGbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/auth/__init__.pys?sPK=.$C  ,pysnmp/proto/secmod/rfc3414/auth/hmacmd5.pyc; ƎJc@sydklZWn%ej odkZeiZnXdkZdklZdklZddZ ddZ dei fdYZ dS( (smd5N(sbase(serrorsi i0sHmacMd5c BsXtZddddddddddf ZdgdZdgdZd Zd ZRS( Niiii ii6i@i\c Csti|t}|djotidn|| }||d}t t t |t }tit d||id} tit d||id}t| |i}t||i} | d } d|| |fSdS(NisCant locate digest placeholderi cCst||AS(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|djotiddnti|t|} | djoti dn|| } || d} d| t | f}ttt|t}titd||id} titd||id}t| |i}t||i}|d } | |jotidd n|SdS( Ni serrorIndicationsauthenticationErrorisCant locate digest in wholeMsgs%s%s%scCst||AS(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=',pysnmp/proto/secmod/rfc3414/auth/hmacsha.pyc; ƎJc@sydklZWn%ej odkZeiZnXdkZdklZdkl Z ddZ ddZ dei fdYZ dS( (ssha1N(sbase(serrorsi i,sHmacShac BsXtZddddddddddf ZdgdZdgdZdZd ZRS( Niiii i6i@i\c Csti|t}|djotidn|| }||d}t t t |t }tit d||id} tit d||id}t| |i}t||i} | d } d|| |fSdS(NisCant locate digest placeholderi cCst||AS(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|djotiddnti|t|} | djoti dn|| } || d} d| t | f}ttt|t}titd||id} titd||id}t| |i}t||i}|d } | |jotidd n|SdS( Ni serrorIndicationsauthenticationErrorisCant locate digest in wholeMsgs%s%s%scCst||AS(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=Q)pysnmp/proto/secmod/rfc3414/auth/base.pyc;  Ec@s$dklZdfdYZdS((serrorsAbstractAuthenticationServicecBs tZeZdZdZRS(NcCstiddS(Nsno authentication(serrors ProtocolError(sselfsauthKeyswholeMsg((sCbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/auth/base.pysauthenticateOutgoingMsgscCstiddS(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 PK=N ??+pysnmp/proto/secmod/rfc3414/auth/noauth.pyc; >wBc@s*dklZdeifdYZdS((sbasesNoAuthc Bs,tZddddddddddf ZRS(Niiii (s__name__s __module__s serviceID(((sEbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/auth/noauth.pysNoAuthsN(s pysnmp.proto.secmod.rfc3414.authsbasesAbstractAuthenticationServicesNoAuth(sbasesNoAuth((sEbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/auth/noauth.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 PKe3d*pysnmp/proto/secmod/rfc3414/auth/noauth.pyfrom pysnmp.proto.secmod.rfc3414.auth import base class NoAuth(base.AbstractAuthenticationService): serviceID = (1, 3, 6, 1, 6, 3, 10, 1, 1, 1) # usmNoAuthProtocol PK\v2,pysnmp/proto/secmod/rfc3414/auth/__init__.pyPKF<;?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)) PKe3LM"¥*pysnmp/proto/secmod/rfc3414/priv/nopriv.pyfrom pysnmp.proto.secmod.rfc3414.priv import base class NoPriv(base.AbstractEncryptionService): serviceID = (1, 3, 6, 1, 6, 3, 10, 1, 2, 1) # usmNoPrivProtocol PK=ܶ@@+pysnmp/proto/secmod/rfc3414/priv/nopriv.pyc; >wBc@s*dklZdeifdYZdS((sbasesNoPrivc Bs,tZddddddddddf ZRS(Niiii i(s__name__s __module__s serviceID(((sEbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/priv/nopriv.pysNoPrivsN(s pysnmp.proto.secmod.rfc3414.privsbasesAbstractEncryptionServicesNoPriv(sbasesNoPriv((sEbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/priv/nopriv.pys?s PK=w-r]](pysnmp/proto/secmod/rfc3414/priv/des.pyc; us#Lc@sdkZdkZdklZdklZdklZydkl Z Wne j oddfZ nXydk l Z Wne j o e Z nXeideifdYZdS( N(sbase(suniv(serror(s version_infoi(sDESsDesc BstZddddddddddf ZeddfjoeeidZneiddZdZd Z d Z d Z RS( Niiii ilic 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 |dt i t d ||dfSdS( NiiiiliiscCst|t|AS(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!dfSdS(NicCstt|t|AS(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 Csttjotiddn|\} }} |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 Csttjotiddn|\}}} t| djotiddnt | } |i t || \}}t|ddjotiddnti|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     PKA5n5(pysnmp/proto/secmod/rfc3414/priv/base.pyfrom pysnmp.proto import error class AbstractEncryptionService: serviceID = None def encryptData(self, mibInstrumController, encryptKey, dataToEncrypt): raise error.ProtocolError('no encryption') def decryptData(self, mibInstrumController, decryptKey, privParameters, encryptedData): raise error.ProtocolError('no encryption') 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=+)pysnmp/proto/secmod/rfc3414/priv/base.pyc;  Ec@s$dklZdfdYZdS((serrorsAbstractEncryptionServicecBs tZeZdZdZRS(NcCstiddS(Ns no encryption(serrors ProtocolError(sselfsmibInstrumControllers encryptKeys dataToEncrypt((sCbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/priv/base.pys encryptDatascCstiddS(Ns no encryption(serrors ProtocolError(sselfsmibInstrumControllers decryptKeysprivParameterss encryptedData((sCbuild/bdist.linux-i686/egg/pysnmp/proto/secmod/rfc3414/priv/base.pys decryptData s(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\v2,pysnmp/proto/secmod/rfc3414/priv/__init__.pyPK=%vpysnmp/proto/proxy/rfc2576.pyc; S Lc @sKdklZlZdklZlZdklZdkl Z hei i ei <ei i ei <eii ei<eii ei<eii ei<eii ei<eii ei<eii ei<eii eisdebugsloggersflagPrxsv2Pdus prettyPrintstagSetspduTypes__v2ToV1PduMapsclonesv1Pdusv2csapiPDUs getVarBindss v2VarBindss v1VarBindssrfc3411snotificationClassPDUsshas_keysv1s apiTrapPDUs setDefaultss snmpTrapOIDssnmpTrapOIDParamserrors ProtocolErrors__v2ToV1TrapMapsoidsvalssnmpTrapEnterprises setEnterprisessnmpTrapAddresss setAgentAddrs agentAddressssetGenericTrapssetSpecificTraps setTimeStamps __v2VarBindss sysUpTimesappendsresponseClassPDUsslensidxs Counter64s origV1Pdus GetRequestPDUssetErrorStatuss setErrorIndexsGetNextRequestPDUsStatusInformationsexvalsnoSuchInstances noSuchObjectsendOfMibsgetErrorStatuss v2ErrorStatuss__v2ToV1ErrorMaps getErrorIndexsv2Vals__v2ToV1ValueMaps setVarBindss setRequestIDs getRequestID(sv2Pdus origV1Pdus v2ErrorStatusspduTypes v2VarBindss v1VarBindssoids snmpTrapOIDsv2Vals __v2VarBindssvalsidxsv1PdussnmpTrapOIDParam((s8build/bdist.linux-i686/egg/pysnmp/proto/proxy/rfc2576.pysv2ToV1s(   2   8  B' '(N()s pysnmp.protosrfc3411serrorspysnmp.proto.apisv1sv2cs pysnmp.smisexvalspysnmpsdebugsIntegerstagSets Integer32s OctetStringsNullsObjectIdentifiers IpAddresssCounters Counter32sGaugesGauge32s TimeTickssOpaques__v1ToV2ValueMaps__v2ToV1ValueMaps GetRequestPDUsGetNextRequestPDUs SetRequestPDUsGetResponsePDUs ResponsePDUsTrapPDUs SNMPv2TrapPDUs__v1ToV2PduMapsGetBulkRequestPDUs__v2ToV1PduMaps__v1ToV2TrapMaps__v2ToV1TrapMaps__v2ToV1ErrorMapsNonesv1ToV2sv2ToV1(sexvals__v2ToV1TrapMaps__v2ToV1PduMapsv2ToV1s__v1ToV2TrapMaps__v1ToV2PduMaps__v2ToV1ErrorMapsv2csv1s__v1ToV2ValueMapserrorsdebugs__v2ToV1ValueMapsrfc3411sv1ToV2((s8build/bdist.linux-i686/egg/pysnmp/proto/proxy/rfc2576.pys?s   o  MPK=dxɉpysnmp/proto/proxy/__init__.pyc; Bc@sdS(N((((s9build/bdist.linux-i686/egg/pysnmp/proto/proxy/__init__.pys?sPKo2pysnmp/proto/proxy/__init__.pyPK 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 v1Pdu = __v2ToV1PduMap[pduType].clone() 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 exval.noSuchInstance.tagSet == val.tagSet or \ exval.noSuchObject.tagSet == val.tagSet or \ exval.endOfMib.tagSet == val.tagSet: 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 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=P pysnmp/proto/acmod/rfc3415.pyc; KDc@sXdklZdklZdklZdZdddddd d d gZd Zd S((sNoSuchObjectError(serror(sdebugiii@i iiiiicCs|ii} titi@otid||f| ii dd\}|i |}y$|i|idf|i}Wn%tj otiddnX| 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 otiddnXt| otiddn| ii dd\}|i |}|idf|}}|idf|}xno|i#|} |i#|} | i}| i}||t| jotiddnt| i}|t|joqn| iog}x?t(t)t*| iD]%}|t(t,|dt-}q=Wt|d}|d}xK|oC||jp ||o| i|||joPn|d}qW|oqqn| i|| joqntiddSqWdS(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   PK7&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=pysnmp/proto/acmod/__init__.pyc; Bc@sdS(N((((s9build/bdist.linux-i686/egg/pysnmp/proto/acmod/__init__.pys?sPKs2pysnmp/proto/acmod/__init__.pyPKЍ 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=&S7S7pysnmp/smi/indices.pyc; SEc@sdZdklZlZdklZlZlZdklZydk l Z Wne j oddfZ nXe ddfjodfdYZ ndefd YZ d e fd YZ d S( s-Ordered dictionaries classes used for indices(sDictTypes TupleType(sjoinssplitsatol(sbisect(s version_infoiis OrderedDictcBstZdZdZdZdZdZdZdZeZ dZ e d Z d Z d Zd Zd ZdZdZdZdZdZRS(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|iSdS(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#|iig|_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|int|iSdS(N(sselfs_OrderedDict__dirtys_OrderedDict__orderslists_OrderedDict__keys(sself((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pyskeys-s cCs5|io|int|id|iSdS(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|int|id|iSdS(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|idS(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|idS(N(skeysssort(sselfskeys((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pys sortingFun8scCsv|i|ih}x!|iD]}d|t|rs(sselfs_OrderedDict__dirtys_OrderedDict__ordersmaps_OrderedDict__keys(sself((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pysvaluesps cCs2|io|int|d|iSdS(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|idS(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|idS(N(skeysssort(sselfskeys((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pys sortingFunxscCsv|i|ih}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.pysfs(sselfsfskeysssort(sselfskeyssf((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pys sortingFuns (s__name__s __module__s__init__s __setitem__s __delitem__s __delattr__s sortingFun(((s0build/bdist.linux-i686/egg/pysnmp/smi/indices.pysOidOrderedDicts   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=ďLu.u.pysnmp/smi/view.pyc; njGc@sfdklZlZlZdklZlZdklZdk l Z dgZ dfdYZ dS((s ClassTypes InstanceTypes TupleType(s OrderedDictsOidOrderedDict(serror(sdebugsMibViewControllercBstZdZdZdZdZdZddZddZdd Z dd Z dd Z dd Z dd Z ddZddZddZRS(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 |}qnx|ii |iD]~\}} |d joqnt| tjo\|d i|o(tid |||d |fn||d |<||d | (oid, label, suffix)iiN( snodeNames labelToOidIdxsgetsoids oidToLabelIdxslabelslensselfs_MibViewController__getOidLabelssuffixsresLabelsresOid( sselfsnodeNames oidToLabelIdxs labelToOidIdxsoidsresOidslabelsresLabelssuffix((s-build/bdist.linux-i686/egg/pysnmp/smi/view.pys __getOidLabels,"  scCs|i|ii|}|tjotid||fn|i ||d|d\}}}||jo#tidd|||fntiti@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.pysgetNodeNameByOids  & #/cCs|i|ii|}|tjotid||fn|di|}|tjo#ti dd|||fnt 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.pysgetNodeNameByDescs   #+cCsly|i||SWnQtij oB|i|d|\}}}|i|||d|SnXdS(Nii( sselfsgetNodeNameByOidsnodeNamesmodNameserrorsNoSuchObjectErrorsgetNodeNameByDescsoidslabelssuffix(sselfsnodeNamesmodNamesoidslabelssuffix((s-build/bdist.linux-i686/egg/pysnmp/smi/view.pys getNodeNames cCs|i|ii|}|tjotid||fn|d o ti dd||fn|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.pysgetFirstNodeNames    cCs|i||\}}}y,|i|i|di|||SWn2t j o&t i dd|||fnXdS(Ns oidToLabelIdxsstrsNo name next to %s::%s at %s( sselfs getNodeNamesnodeNamesmodNamesoidslabelssuffixs!_MibViewController__mibSymbolsIdxsnextKeysKeyErrorserrorsNoSuchObjectError(sselfsnodeNamesmodNamessuffixsoidslabel((s-build/bdist.linux-i686/egg/pysnmp/smi/view.pysgetNextNodeNames ,cCsr|i||\}}}t|djo#ti dd|||fn|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||fn|di|}|tjo#ti dd|||fn||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||fn|d o ti dd||fn|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|||fnXdS(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=S򜱿pysnmp/smi/instrum.pyc; (Lc@sGdklZdklZdklZdgZdfdYZdS((s InstanceType(serror(sdebugsMibInstrumControllercBstZhddfd<ddfd<ddfd<ddfd`ss#Orphan MIB scalar instance %s at %sis 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|\}}|ititi@otidt||i i dd\} g}ddf\} } t}x no|i| | f} | tjoC|id| f} | tjotid| | fqntiti@otid | | | f| } d} | d joPnd }xI|D]A\}}t| | t}|tjotid | |fny%|t|||||f} Wnjtij o[}titi@o#tid |||t|f|tjo |}nd} Pn_Xtiti@o tid||t|f| tj o|i| d | dfn|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 flipFlopFsmsN  (  !+   %4  1  cCs,|\}}|i|i|||fSdS(N(sacFunsacCtxsselfs flipFlopFsms fsmReadVarsvars(sselfsvarss.4sacFunsacCtx((s0build/bdist.linux-i686/egg/pysnmp/smi/instrum.pysreadVarss cCs,|\}}|i|i|||fSdS(N(sacFunsacCtxsselfs flipFlopFsmsfsmReadNextVarsvars(sselfsvarss.4sacFunsacCtx((s0build/bdist.linux-i686/egg/pysnmp/smi/instrum.pys readNextVarss cCs,|\}}|i|i|||fSdS(N(sacFunsacCtxsselfs flipFlopFsms fsmWriteVarsvars(sselfsvarss.4sacFunsacCtx((s0build/bdist.linux-i686/egg/pysnmp/smi/instrum.pys writeVarss ( 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=0FgϠpysnmp/smi/__init__.pyc; ƔAc@s dZdS(sSNMP SMIN(s__doc__(((s1build/bdist.linux-i686/egg/pysnmp/smi/__init__.pys?sPK=߸pysnmp/smi/error.pyc; mFc@sdklZdklZdeefdYZdefdYZdefdYZdefd YZd efd YZd efd YZ defdYZ defdYZ defdYZ defdYZ defdYZdefdYZdefdYZdefdYZdefdYZd 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.pysSmiErrorssMibOperationErrorcBsJtZdZdZdZdZedZdZdZ 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|iiSdS(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(   PKQ6u:Fpysnmp/smi/indices.py"""Ordered dictionaries classes used for indices""" from types import DictType, TupleType from string import join, split, atol from bisect import bisect try: from sys import version_info except ImportError: version_info = ( 0, 0 ) # a really early version if version_info < (2, 2): class OrderedDict: def __init__(self, **kwargs): self.__dict = {} self.__keys = [] self.__dirty = 1 if kwargs: self.update(kwargs) self.__dirty = 1 def __len__(self): return len(self.__dict) def __getitem__(self, key): return self.__dict[key] def __setitem__(self, key, value): if not self.__dict.has_key(key): self.__keys.append(key) self.__dict[key] = value self.__dirty = 1 def __repr__(self): if self.__dirty: self.__order() return repr(self.__dict) def __str__(self): if self.__dirty: self.__order() return str(self.__dict) def __delitem__(self, key): if self.__dict.has_key(key): self.__keys.remove(key) del self.__dict[key] self.__dirty = 1 __delattr__ = __delitem__ def clear(self): self.__dict.clear() self.__keys = [] self.__dirty = 1 def get(self, key, default=None): return self.__dict.get(key, default) def has_key(self, key): return self.__dict.has_key(key) def keys(self): if self.__dirty: self.__order() return list(self.__keys) def values(self): if self.__dirty: self.__order() return map(lambda k, d=self.__dict: d[k], self.__keys) def items(self): if self.__dirty: self.__order() return map(lambda k, d=self.__dict: (k, d[k]), self.__keys) def update(self, d): map(lambda (k, v), self=self: self.__setitem__(k, v), d.items()) def sortingFun(self, keys): keys.sort() def __order(self): self.sortingFun(self.__keys) d = {} for k in self.__keys: d[len(k)] = 1 l = d.keys() l.sort(); l.reverse() self.__keysLens = tuple(l) self.__dirty = 0 def nextKey(self, key): keys = self.keys() if self.has_key(key): nextIdx = keys.index(key) + 1 else: nextIdx = bisect(keys, key) if nextIdx < len(keys): return keys[nextIdx] else: raise KeyError(key) def getKeysLens(self): if self.__dirty: self.__order() return self.__keysLens else: class OrderedDict(DictType): def __init__(self, **kwargs): self.__keys = [] self.__dirty = 1 super(OrderedDict, self).__init__() if kwargs: self.update(kwargs) def __setitem__(self, key, value): if not self.has_key(key): self.__keys.append(key) super(OrderedDict, self).__setitem__(key, value) self.__dirty = 1 def __repr__(self): if self.__dirty: self.__order() return super(OrderedDict, self).__repr__() def __str__(self): if self.__dirty: self.__order() return super(OrderedDict, self).__str__() def __delitem__(self, key): if super(OrderedDict, self).has_key(key): self.__keys.remove(key) super(OrderedDict, self).__delitem__(key) self.__dirty = 1 __delattr__ = __delitem__ def clear(self): super(OrderedDict, self).clear() self.__keys = [] self.__dirty = 1 def keys(self): if self.__dirty: self.__order() return list(self.__keys) def values(self): if self.__dirty: self.__order() return map(lambda k, d=self: d[k], self.__keys) def items(self): if self.__dirty: self.__order() return map(lambda k, d=self: (k, d[k]), self.__keys) def update(self, d): map(lambda (k, v), self=self: self.__setitem__(k, v), d.items()) def sortingFun(self, keys): keys.sort() def __order(self): self.sortingFun(self.__keys) d = {} for k in self.__keys: d[len(k)] = 1 l = d.keys() l.sort(); l.reverse() self.__keysLens = tuple(l) self.__dirty = 0 def nextKey(self, key): keys = self.keys() if self.has_key(key): nextIdx = keys.index(key) + 1 else: nextIdx = bisect(keys, key) if nextIdx < len(keys): return keys[nextIdx] else: raise KeyError(key) def getKeysLens(self): if self.__dirty: self.__order() return self.__keysLens class OidOrderedDict(OrderedDict): def __init__(self, **kwargs): self.__keysCache = {} apply(OrderedDict.__init__, [self], kwargs) def __setitem__(self, key, value): if not self.__keysCache.has_key(key): if type(key) == TupleType: self.__keysCache[key] = key else: self.__keysCache[key] = map( lambda x: atol(x), filter(None, split(key, '.')) ) OrderedDict.__setitem__(self, key, value) def __delitem__(self, key): if self.__keysCache.has_key(key): del self.__keysCache[key] OrderedDict.__delitem__(self, key) __delattr__ = __delitem__ def sortingFun(self, keys): def f(o1, o2, self=self): return cmp(self.__keysCache[o1], self.__keysCache[o2]) keys.sort(f) PK=o399pysnmp/smi/builder.pyc; 淫Kc@sdkZdkZdkZdkZdkZdkZdkZdklZdk l Z dfdYZ de fdYZ de fdYZ d fd YZdS( N(serror(sdebugs__AbstractMibSourcecBsMtZdZdZdZdddZdZdZdZRS( NcCs||_ti|_h|_x9tiD]+\}}}|t ||f|i|q>Wq Wt |iSdS(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|iSdS(N(sselfs_init(sself((s0build/bdist.linux-i686/egg/pysnmp/smi/builder.pysinit#scCs|iSdS(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 |||fSntddS(NiistitiddD]}|i t|i qWn|ioWxTti|idD]9}y|i t |i Wqtj oqXqWnh|_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|ifdS(NssetMibPath: new MIB sources %s(s mibSourcessselfs_MibBuilder__mibSourcessdebugsloggersflagBld(sselfs mibSources((s0build/bdist.linux-i686/egg/pysnmp/smi/builder.pys setMibSourcess cCs |iSdS(N(sselfs_MibBuilder__mibSources(sself((s0build/bdist.linux-i686/egg/pysnmp/smi/builder.pys getMibSourcesscGst|itt|dS(N(sapplysselfs setMibSourcessmaps DirMibSourcesmibPaths(sselfsmibPaths((s0build/bdist.linux-i686/egg/pysnmp/smi/builder.pys setMibPathscCsRg}x;|iD]-}t|to|i|iqqWt|SdS(N( slsselfs getMibSourcess mibSources isinstances DirMibSourcesappendsfullPathstuple(sselfs mibSourcesl((s0build/bdist.linux-i686/egg/pysnmp/smi/builder.pys getMibPaths  c Fsf| oKh}x2|iD]'}x|iD]}e|| 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) ) PKl1Qpysnmp/smi/__init__.py"""SNMP SMI""" 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 PKDzy= 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> 8) + chr(os.getpid() & 0xff) except: # ...otherwise, use rudimentary text ID defaultValue = '\x80\x00\x4f\xb8' + '\x05' t = int(time.time()) while t: defaultValue = defaultValue + chr(t & 0xff) t = t >> 8 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) PKz:tƉ33%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) PKz: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=%%&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 fdYZde efdYZdefdYZdefdYZde fd YZd!efd"YZ ed#d$d%d#d%d$d&fi!d'd(d)fZ"ei#oe"i$d*nei#oe"i%d+nei#oe"i&d,ned#d$d%d#d%d$d&d#fZ'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.fZ*ed#d$d%d#d%d$d&d.d#f Z+ed#d$d%d#d%d$d&d.d#d#f ei,d0Z-ei#oe-i&d1ned#d$d%d#d%d$d&d.d#d.f ei.d2ei/d#d3i,d0Z0ei#oe0i&d4ned#d$d%d#d%d$d&d.d#d$f ei.d2ei/d5d3i,d0i1d6Z2ei#oe2i&d7ned#d$d%d#d%d$d&d.d#d8f ei.d2ei/d9d3i,d0Z3ei#oe3i&d:ned#d$d%d#d%d$d&d$fZ4ed#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?fZ8ei9d;d@e"ei9d;dededededed!e ei9d;dAe"dBe'dCe(dDe)dEe*dFe+d<e-d=e0d?e2d>e3dGe4dHe5dIe6 ei9d;dJe8dS(KN(s constraintsnamedvalsASN1sIntegersObjectIdentifiers OctetStrings SNMPv2-CONFsModuleCompliances ObjectGroups SNMPv2-SMIsBitss Integer32sModuleIdentitys MibIdentifiersObjectIdentitys MibScalarsMibTables MibTableRowsMibTableColumns TimeTickss snmpModuless SNMPv2-TCsTextualConventionsSnmpAdminStringcBs'tZdZeieiddZRS(Ns255tii(s__name__s __module__s displayHints OctetStrings subtypeSpecs constraintsValueSizeConstraint(((s@build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-FRAMEWORK-MIB.pysSnmpAdminStringss SnmpEngineIDcBstZeieiddZymddeiedei e i e i dde eid?e eid @ZWnPddZeeiZx.eo"ee ed @Zed?ZqWnXRS( Nii sOscCstt|S(N(schrsintsx(sx((s@build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-FRAMEWORK-MIB.pys#ss.sii(s__name__s __module__s OctetStrings subtypeSpecs constraintsValueSizeConstraintsstringsjoinsmapssplitssockets gethostbynames gethostnameschrsossgetpids defaultValuesintstimest(((s@build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-FRAMEWORK-MIB.pys SnmpEngineIDs!6 sSnmpEngineTimecBstZeeedZRS(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.pysclone0s(s__name__s __module__sNonesclone(((s@build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-FRAMEWORK-MIB.pysSnmpEngineTime/ssSnmpMessageProcessingModelcBs!tZeieiddZRS(Nil(s__name__s __module__s Integer32s subtypeSpecs constraintsValueRangeConstraint(((s@build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-FRAMEWORK-MIB.pysSnmpMessageProcessingModel5ssSnmpSecurityLevelcBsKtZeieidddZeiddfddfddfZRS(Niiis noAuthNoPrivs authNoPrivsauthPriv( s__name__s __module__sIntegers subtypeSpecs constraintsSingleValueConstraintsnamedvals NamedValuess namedValues(((s@build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMP-FRAMEWORK-MIB.pysSnmpSecurityLevel8ssSnmpSecurityModelcBs!tZeieiddZRS(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 GroupsWG-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 sThe 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.sreadonlysAn 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 subtypeSpeclslThe 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.iisThe 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=) ) $pysnmp/smi/mibs/SNMP-USM-AES-MIB.pyc; %Ic @sudklZlZeidddd\ZZZeidd\Zeiddd d d d d d\Z Z Z Z Z ZZe ddddddddddf Zeioeidne dddddddfidfZeioeidneioeidneioeidneiddeeiddededS( (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=A/Z/Zpysnmp/smi/mibs/SNMPv2-MIB.pyc; %Ict@svdklZlZeidddd\ZZZeidddd\ZZ Z eid d d d d dddddddddd\Z Z Z ZZZZZZZZZZZeidddd\ZZZedddddddfZeddddddddfeideid d!id"Zei oei!d#neddddddddfeid"Z"ei oe"i!d$neddddddddfeid"Z#ei oe#i!d%nedddddddd&feideid d!id'Z$ei oe$i!d(nedddddddd)feideid d!id'Z%ei oe%i!d*neddddddddfeideid d!id'Z&ei oe&i!d+nedddddddd,fe idei'd d-id"Z(ei oe(i!d.nedddddddd/feid"Z)ei oe)i!d0nedddddddd1fZ*ei oe*i!d2nedddddddd1df i+d d3d4fZ,ei oe,i!d5nedddddddd1ddf e idei'dd6id7Z-ei oe-i!d8nedddddddd1ddf eid"Z.ei oe.i!d9nedddddddd1ddf eid"Z/ei oe/i!d:nedddddddd1dd&f eid"Z0ei oe0i!d;neddddddd<fZ1eddddddd<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!dAneddddddd<dfe id"Z7ei oe7i!dBneddddddd<d/fe id"Z8ei oe8i!dCneddddddd<d1fe id"Z9ei oe9i!dDneddddddd<dEfe id"Z:ei oe:i!dFneddddddd<d<fe id"Z;ei oe;i!dGneddddddd<dHfe id"Z<ei oe<i!dIneddddddd<dJfe id"Z=ei oe=i!dKneddddddd<dLfe id"Z>ei oe>i!dMneddddddd<dNfe id"Z?ei oe?i!dOneddddddd<dPfe id"Z@ei oe@i!dQneddddddd<dRfe id"ZAei oeAi!dSneddddddd<dTfe id"ZBei oeBi!dUneddddddd<dVfe id"ZCei oeCi!dWneddddddd<dXfe id"ZDei oeDi!dYneddddddd<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!daneddddddd<dbfe id"ZIei oeIi!dcneddddddd<ddfe id"ZJei oeJi!deneddddddd<dffe id"ZKei oeKi!dgneddddddd<dhfe id"ZLei oeLi!dineddddddd<djfeideiMddidkeiNdldfdmdfid'ZOei oeOi!dnneddddddd<dofe id"ZPei oePi!dpneddddddd<dqfe id"ZQei oeQi!drnedddddddfiRdsdtdufZSei oeSiTdvnei oeSiUdwnei oeSi!dxneddddddddfZVeddddddddd&f ZWeddddddddd&df eidyZXei oeXi!dzneddddddddd&df eidyZYei oeYi!d{neddddddddd)f ZZedddddddddf Z[eddddddddddf eid'Z\ei oe\i!d|neddddddddfZ]edddddddddf Z^edddddddddf Z_eddddddddd)d)f i`Zaeddddddddd)df i`Zbeddddddddd)df i`Zce dddddddddd/f i`d3d}fd3d~fd3dfd3dfd3dfd3dfZde dddddddddd<f i`d3dfZee ddddddddddEf i`d3dfd3dfd3dfd3dfd3dfd3dfd3dfd3dfd3dfd3dfd3dfd3dfd3dfd3dfd3dfd3dfd3dfd3dfd3dfd3dfd3dfd3dfZfe dddddddddd,f i`d3dfd3dfZge dddddddddd1f i`d3dfd3dfZhe ddddddddddHf i`d3dfd3dfZie ddddddddddf i`d3dfd3dfd3dfd3dfd3dfd3dfd3dfd3dfd3dfd3dfd3df Zje dddddddddd)f i`d3dfZkeild3deSeild3dedede"de#de$de%de&de(de)de*de,d4e-de.de/de0de1de2de3de4de5de6de7de8de9de:de;de<de=de>de?de@deAdeBdeCdeDdeEdeFdeGdeHdeIdeJdeKdeLd}eOd~ePdeQdeSdeVdeWdeXdeYdeZde[de\de]de^de_9eild3deadebdeceild3deddeedefdegdehdeidejdekdS((s constraintsnamedvalsASN1sIntegersObjectIdentifiers OctetStrings SNMPv2-CONFsModuleCompliancesNotificationGroups ObjectGroups SNMPv2-SMIsBitss Counter32s Integer32sModuleIdentitys MibIdentifiersNotificationTypes MibScalarsMibTables MibTableRowsMibTableColumns TimeTickssmib-2s snmpModuless SNMPv2-TCs DisplayStrings TestAndIncrs TimeStampiiiis subtypeSpeciisreadonlysA 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.sThe 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 readwritesThe 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.isAn 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.sThe physical location of this node (e.g., 'telephone closet, 3rd floor'). If the location is unknown, the value is the zero-length string.iisA 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.lsnoaccesss`The auxiliary variable used for identifying instances of the columnar objects in the sysORTable.sAn 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.sThe 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.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 `tooBig'.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 `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 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 `genErr'.i sThe 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.isThe 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.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 `tooBig.'isThe 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'.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 `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 namedValuessenabledsdisabledsIndicates 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.isThe 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 sThe 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 GroupsWG-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-1006sThe 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 notifyonlysThe authoritative identification of the notification currently being sent. This variable occurs as the second varbind in every SNMPv2-Trap-PDU and InformRequest-PDU.sThe 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 $''000f9BBB9dPK= M__+pysnmp/smi/mibs/SNMP-VIEW-BASED-ACM-MIB.pyc; %IcJ@sdklZlZeidddd\ZZZeidddd\ZZ Z eid d d \Z Z eid d ddddddddd \ Z ZZZZZZZZZeidddd\ZZZedddddddfidd d!fZeioeid"neioeid#neioeid$neddddddddfZ edddddddddf Z!eioe!id%neddddddddddf i"d&d'd(fZ#eioe#id)nedddddddddddf ei$d*ei%d&d+i&d,Z'eioe'id-neddddddddd.f Z(eioe(id/neddddddddd.df i"d&d'd0fd&d'd1fZ)eioe)id2neddddddddd.ddf e i$d*ei*dd3i&d4Z+eioe+id5neddddddddd.dd.f ei$d*ei%dd+i&d4Z,eioe,id6neddddddddd.ddf ei$d*ei%dd+i&d7Z-eioe-id8neddddddddd.dd9f ei.d:i&d7Z/eioe/id;neddddddddd.dd<f ei&d7Z0eioe0id=neddddddddd9f Z1eioe1id>neddddddddd9df i"d&d'd?fd&d'd@fd&d'dAfd&d'dBfZ2eioe2idCneddddddddd9ddf ei$d*ei%d&d+i&d4Z3eioe3idDneddddddddd9dd.f e i&d4Z4eioe4idEneddddddddd9ddf e i&d4Z5eioe5idFneddddddddd9dd9f ei$d*ei6d.di$dGei7dHdfdId.fi.di&d7Z8eioe8idJneddddddddd9dd<f ei$d*ei%d&d+i.dKi&d7Z9eioe9idLneddddddddd9ddf ei$d*ei%d&d+i.dKi&d7Z:eioe:idMneddddddddd9ddNf ei$d*ei%d&d+i.dKi&d7Z;eioe;idOneddddddddd9ddPf ei.d:i&d7Z<eioe<idQneddddddddd9ddRf ei&d7Z=eioe=idSneddddddddd<f Z>eddddddddd<df ei&dTZ?eioe?idUneddddddddd<d.f Z@eioe@idVneddddddddd<d.df i"d&d'dWfd&d'dXfZAeioeAidYneddddddddd<d.ddf ei$d*ei%dd+i&d4ZBeioeBidZneddddddddd<d.dd.f ei&d4ZCeioeCid[neddddddddd<d.ddf ei$d*ei%d&di.dKi&d7ZDeioeDid\neddddddddd<d.dd9f ei$d*ei6dd.i$dGei7d]dfd^d.fi.di&d7ZEeioeEid_neddddddddd<d.dd<f ei.d:i&d7ZFeioeFidQneddddddddd<d.ddf ei&d7ZGeioeGid`nedddddddd.fZHedddddddd.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'dmfZLeiMd'dneeiMd'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}eLd~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 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: 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-5260sThe 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 sreadonlysA human readable name identifying a particular context at a particular SNMP entity. The empty contextName (zero length) represents the default context.isThis 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.lsnoaccesssThe Security Model, by which the vacmSecurityName referenced by this entry is provided. Note, this object may not take the 'any' (0) value.sThe 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 nonVolatilesThe 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.ssThe 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.sThe 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.isThe 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.isThe 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.svacmViewTreeFamilyViewNamesvacmViewTreeFamilySubtreesInformation 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.sThe 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.sincludedsexcludedsIndicates 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 ? $''PKt,> 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=' 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 fid!d"fZeioeid#neioeid$neioei d%neddddddd dfZ!eddddddd ddf Z"eioe"i d&neddddddd dddf i#dd'd(fZ$eioe$i d)neddddddd ddddf ei%d*ei&dd+i'd,Z(eioe(i d-neddddddd dddd.f ei'd/Z)eioe)i d0neddddddd ddddf ei%d*ei&dd+i'd/Z*eioe*i d1neddddddd dddd2f e i'd/Z+eioe+i d3neddddddd dddd4f ei%d*ei&d5d+i,d6i'd/Z-eioe-i d7neddddddd ddddf e i,d6i'd/Z.eioe.i d8neddddddd dddd9f ei'd/Z/eioe/i d:neddddddd dddd;f ei'd/Z0eioe0i d<neddddddd dd.f Z1eioe1i d=neddddddd dd.df Z2eioe2i d>neddddddd dd.ddf ei%d*ei&d5d?i,d6i'd/Z3eioe3i d@neddddddd dd.dd.f ei%d*ei4ei5d5d5ei5dAdBi,dAi'd/Z6eioe6i dCneddddddd ddf ei'dDZ7eioe7i dEneddddddd dd2f ei'dDZ8eioe8i dFneddddddd d.fZ9eddddddd d.df Z:eddddddd d.d.f Z;eidd \Z e i<d'dGfe=e2i#e i>e ddddddd d.d.df i?d'dHfd'dIfZ@e ddddddd d.d.df i?d'dJfd'dKfd'dLfd'dMfd'dNfd'dOfd'dPfd'dQfd'dRf ZAeiBd'dSeeiBd'dTedUe!dVe"dWe$d(e(dPe)dOe*dLe+dNe-dRe.dJe/dMe0dXe1dGe2dKe3dQe6dHe7dIe8dYe9dZe:d[e;eiBd'd\e@d]eAd^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.iissThe 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.isThe 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.isThe 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.isThe 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.ilsSThe 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 $''BPK=_MY=~~pysnmp/smi/mibs/ASN1.pyc; 1Bc @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       PKu<%iQpysnmp/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, 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, 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, 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, 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 = {} # 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 # 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, 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 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, 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 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)): 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 PKz:Gopysnmp/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=7\BBpysnmp/smi/mibs/RFC1213-MIB.pyc; %Ic@sIdklZlZeidddd\ZZZeidd\Zeiddd d d d d d ddddddd\Z Z Z Z Z Z ZZZZZZZZdefdYZdefdYZeddddddfidZedddddddfZeddddddddfeideiddid Zeioeid!neddddddddfeid Z eioe id"neddddddddfeid Z!eioe!id#nedddddddd$feideiddid%Z"eioe"id&nedddddddd'feideiddid%Z#eioe#id(neddddddddfeideiddid%Z$eioe$id)nedddddddd*fe idei%dd+id Z&eioe&id,nedddddddfZ'eddddddddfe id Z(eioe(id-neddddddddfZ)eioe)id.nedddddddddf i*dd/d0fZ+eioe+id1neddddddddddf e id Z,eioe,id2neddddddddddf eideiddid Z-eioe-id3neddddddddddf eidei.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 Z0eioe0idnnedddddddddd$f e id Z1eioe1idonedddddddddd'f e id Z2eioe2idpneddddddddddf eid Z3eioe3idqnedddddddddd*f eidei.dddidMei/drdfdsdfdtdfid%Z4eioe4idunedddddddddd?f eidei.dddidMei/drdfdsdfdtdfid Z5eioe5idvneddddddddddHf eid Z6eioe6idwneddddddddddKf e id Z7eioe7idxneddddddddddFf e id Z8eioe8idynedddddddddd:f e id Z9eioe9idzneddddddddddEf 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>idneddddddddddIf e id Z?eioe?idneddddddddddCf e id Z@eioe@idneddddddddddAf e id ZAeioeAidneddddddddddBf e id ZBeioeBidnedddddddddd4f eid ZCeioeCidnedddddddfZDeddddddddfZEeioeEidnedddddddddf i*dd/dfdd/dfdd/dfZFeioeFidneddddddddddf e id%ZGeioeGidneddddddddddf eid%ZHeioeHidneddddddddddf e id%ZIeioeIidneddddddddddf edidZJeddddddd$fZKeddddddd$dfeidei.ddidMei/ddfddfid%ZLeioeLidneddddddd$dfe id%ZMeioeMidneddddddd$dfe id ZNeioeNidneddddddd$d$fe id ZOeioeOidneddddddd$d'fe id ZPeioePidneddddddd$dfe id ZQeioeQidneddddddd$d*fe id ZReioeRidneddddddd$d?fe id ZSeioeSidneddddddd$dHfe id ZTeioeTidneddddddd$dKfe id ZUeioeUidneddddddd$dFfe id ZVeioeVidneddddddd$d:fe id ZWeioeWidneddddddd$dEfe id ZXeioeXidneddddddd$d@fe id ZYeioeYidneddddddd$dDfe id ZZeioeZidneddddddd$d>fe id Z[eioe[idneddddddd$d=fe id Z\eioe\idneddddddd$dIfe id Z]eioe]idneddddddd$dCfe id Z^eioe^idneddddddd$dAfZ_eioe_idneddddddd$dAdf i*dd/dfZ`eioe`idneddddddd$dAddf e id Zaeioeaidneddddddd$dAddf e id Zbeioebidneddddddd$dAddf e id Zceioecidneddddddd$dAdd$f e id Zdeioedidneddddddd$dAdd'f e idei%ddid Zeeioeeidneddddddd$dBfZfeioefidneddddddd$dBdf i*dd/dfZgeioegidneddddddd$dBddf e id%Zheioehidneddddddd$dBddf e id%Zieioeiidneddddddd$dBddf e id%Zjeioejidneddddddd$dBdd$f e id%Zkeioekidneddddddd$dBdd'f e id%Zleioelidneddddddd$dBddf e id%Zmeioemidneddddddd$dBdd*f e id%Zneioenidneddddddd$dBdd?f eidei.d$dddidMei/dNdfddfddfdd$fid%Zoeioeoidneddddddd$dBddHf eidei.d@d:ddEd'd?dKdFddHd$dd*didMei/dNdfddKfddFfdd:fddEfdd@fddfddfdd$fdd'fddfdd*fdd?fddHfid Zpeioepidneddddddd$dBddKf e id%Zqeioeqidneddddddd$dBddFf e id%Zreioeridneddddddd$dBdd:f e id%Zseioesidneddddddd$dBddEf eid Zteioetidneddddddd$d4fZueioeuidneddddddd$d4df i*dd/dfdd/dfZveioevidneddddddd$d4ddf e id%Zweioewidneddddddd$d4ddf eid%Zxeioexidneddddddd$d4ddf e id%Zyeioeyidneddddddd$d4dd$f eidei.d$dddidMei/dNdfddfddfdd$fid%Zzeioezidneddddddd$d8fe id Z{eioe{idneddddddd'fZ|eddddddd'dfe id Z}eioe}idneddddddd'dfe id Z~eioe~idneddddddd'dfe id Zeioeidneddddddd'd$fe id Zeioeidneddddddd'd'fe id Zeioeidneddddddd'dfe id Zeioeidneddddddd'd*fe id Zeioeidneddddddd'd?fe id Zeioeidneddddddd'dHfe id Zeioeidneddddddd'dKfe id Zeioeidneddddddd'dFfe id Zeioeidneddddddd'd:fe id Zeioeidneddddddd'dEfe id Zeioeidneddddddd'd@fe id Zeioeidneddddddd'dDfe id Zeioeidneddddddd'd>fe id Zeioeidneddddddd'd=fe id Zeioeidneddddddd'dIfe id Zeioeidneddddddd'dCfe id Zeioeidneddddddd'dAfe id Zeioeidneddddddd'dBfe id Zeioeidneddddddd'd4fe id Zeioeidneddddddd'd8fe id Zeioeidneddddddd'd6fe id Zeioeidneddddddd'dGfe id Zeioeidneddddddd'd;fe id ZeioeidnedddddddfZeddddddddfeidei.d$dddidMei/dNdfddfddfdd$fid Zeioeidneddddddddfe id Zeioeidneddddddddfe id Zeioeidnedddddddd$fe id Zeioeidnedddddddd'fe id Zeioeidneddddddddfe id Zeioeidnedddddddd*fe id Zeioeidnedddddddd?fe id ZeioeidneddddddddHfe id ZeioeidneddddddddKfe id ZeioeidneddddddddFfe id Zeioeidnedddddddd:fe id ZeioeidneddddddddEfZeioeidneddddddddEdf i*dd/dfdd/dfdd/dfdd/dfZeioeidneddddddddEddf eidei.d$d'd*dFdHd?d:dddKdd idMei/ddfddKfddFfdd:fddfddfd d$fd d'fd dfd d*fd d?fddHf id%ZeioeidneddddddddEddf e id ZeioeidneddddddddEddf e idei%ddid ZeioeidneddddddddEdd$f e id ZeioeidneddddddddEdd'f e idei%ddid Zeioeidnedddddddd@fe id ZeioeidneddddddddDfe id Zeioeidneddddddd*fZeddddddd*dfe id Zeioeidneddddddd*dfe id Zeioeidneddddddd*dfe id Zeioeidneddddddd*d$fe id Zeioeidneddddddd*d'fZeioeidneddddddd*d'df i*dd/dfdd/dfZeioeidneddddddd*d'ddf e id Zeioeidneddddddd*d'ddf e idei%ddid Zeioeidneddddddd?fZeddddddd?dfe id Zeioeid neddddddd?dfe id Zeioeid!neddddddd?dfe id Zeioeid"neddddddd?d$fe id Zeioeid#neddddddd?d'fZeioeid$neddddddd?d'df i*dd/d%fZeioeid&neddddddd?d'ddf eidei.d$ddd'didMei/d'dfd(dfdsdfdrd$fd)d'fid Zeioeid*neddddddd?d'ddf e id Zeioeid+neddddddd?d'ddf e id Zeioeid,neddddddd?d'dd$f e id Zeioeid-neddddddd?d'dd'f e id Zeioeid.neddddddd?d'ddf e id Zeioeid/neddddddd?d'dd*f e id Zeioeid0neddddddd?d'dd?f e id Zeioeid1neddddddd?d'ddHf e id Zeioeid2neddddddd?d'ddKf e id Zeioeid3neddddddd?d'ddFf e id Zeioeid4neddddddd?d'dd:f e id Zeioeid5neddddddd?d'ddEf e id Zeioeid6neddddddd?d'dd@f eidei.ddidMei/d7dfd8dfid Zeioeid9neddddddd?d'ddDf eidei.ddidMei/d:dfd;dfid%Zeioeid<neddddddd?dfe id Zeioeid=nedddddddKfZedddddddFfZedddddddFdfe id Zeioeid>nedddddddFdfe id Zeioeid?nedddddddFdfe id Zeioeid@nedddddddFd$fe id ZeioeidAnedddddddFd'fe id ZeioeidBnedddddddFdfe id ZeioeidCnedddddddFd?fe id ZeioeidDnedddddddFdHfe id ZeioeidEnedddddddFdKfe id ZeioeidFnedddddddFdFfe id ZeioeidGnedddddddFd:fe id ZeioeidHnedddddddFdEfe id ZeioeidInedddddddFd@fe id ZeioeidJnedddddddFdDfe id ZeioeidKnedddddddFd>fe id ZeioeidLnedddddddFd=fe id ZeioeidMnedddddddFdIfe id ZeioeidNnedddddddFdCfe id ZeioeidOnedddddddFdAfe id ZeioeidPnedddddddFdBfe id ZeioeidQnedddddddFd4fe id ZeioeidRnedddddddFd6fe id ZeioeidSnedddddddFdGfe id ZeioeidTnedddddddFd;fe id ZeioeidUnedddddddFdJfe id ZeioeidVnedddddddFd9fe id ZeioeidWnedddddddFdLfe id ZeioeidXnedddddddFd7feidei.ddidMei/dYdfdZdfid%Zeioeid[neid/dedeeid/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~eDdeEdeFdeGdeHdeIdeJdeKdeLdeMdeNdeOdePdeQdeRdeSdeTdeUdeVdeWdeXdeYdeZde[de\de]de^de_de`deadebdecdeddeedefdegdehdeidejdekdeldemdendeodepdeqderdesdetdeudevdewdexdeydezde{de|de}de~dededededededededededededededededededededededededededededededededeeid/dedededededededededededededededededededededededededededededed%ededededededededededededededededededededededededededededededededed ed ed ed ed edededededededeKdS((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 subtypeSpeciisreadonlysA 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.sThe 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 readwritesThe 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').iisA 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.sA 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.sA 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-tokenRingsThe type of interface, distinguished according to the physical/link protocol(s) immediately `below' the network layer in the protocol stack.sThe 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.sAn 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.sThe 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.sThe 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.sThe 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.sThe total number of packets that higher-level protocols requested be transmitted to a subnetwork-unicast address, including those that were discarded or not sent.sThe 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.sThe 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).sA 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.sThe 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.sThe 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-forwardingsThe 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.sThe 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.sThe 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.sThe 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).sThe 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.sThe 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.sThe 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.sThe 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.sThe 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.isThe 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.sThe 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.sThe 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.sAn 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.sThe 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.)sinvalidsdirectsindirectsThe 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-issThe 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.sThe 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.sIndicate 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.sA 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.sThe 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.sThe total number of ICMP messages which the entity received. Note that this counter includes all those counted by icmpInErrors.sThe 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.sThe 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.sThe 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.sThe 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.sThe total number of segments received, including those received in error. This count includes segments received on currently established connections.sThe total number of segments sent, including those on current connections but excluding those containing only retransmitted octets.sThe 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.stcpConnLocalAddressstcpConnLocalPortstcpConnRemAddressstcpConnRemPortsInformation 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 closeWaitslastAcksThe 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).sThe 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.sThe 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.sThe 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 acquisitionsceasesThe 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.sThe 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.sThe interval between EGP Hello command retransmissions (in hundredths of a second). This represents the t1 timer as defined in RFC 904.sThe 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.sstartsstopsA 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.sThe total number of SNMP Messages delivered to the SNMP protocol entity which used a SNMP community name not known to said entity.sThe 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'.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 `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'.sThe 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.sThe 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.'sThe 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.senabledsdisabledsIndicates 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ݩ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) PKz:01zii*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) PKz:" 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=hM99)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&fi!d'd(d)fZ"ei#oe"i$d*nei#oe"i%d+nei#oe"i&d,ned#d$d%d#d%d$d&d#fZ'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/fZ*ei#oe*i&d0ned#d$d%d#d%d$d&d#d#d#d#f ei+d1ei,d#d2i-d3Z.ei#oe.i&d4ned#d$d%d#d%d$d&d#d#d#d5f e i/d6i-d7Z0ei#oe0i&d8ned#d$d%d#d%d$d&d#d#d#d$f ei+d1ei1d5d#i+d9ei2d:d#fd;d5fi/d#i-d7Z3ei#oe3i&d<ned#d$d%d#d%d$d&d#d#d#d=f e i/d>i-d7Z4ei#oe4i&d?ned#d$d%d#d%d$d&d#d#d#d@f ei-d7Z5ei#oe5i&dAned#d$d%d#d%d$d&d#d5f Z6ei#oe6i&dBned#d$d%d#d%d$d&d#d5d#f i)d#dd fZ7ei#oe7i&dCned#d$d%d#d%d$d&d#d5d#d#f ei+d1ei,d#d2i-d7Z8ei#oe8i&dDned#d$d%d#d%d$d&d#d5d#d5f e i/d>i-d7Z9ei#oe9i&d?ned#d$d%d#d%d$d&d#d5d#d$f ei-d7Z:ei#oe:i&dEned#d$d%d#d%d$d&d#d$f Z;ei#oe;i&dFned#d$d%d#d%d$d&d#d$d#f i)dGd.dHfd#d.dIfZ<ei#oe<i&dJned#d$d%d#d%d$d&d#d$d#d#f ei-d3Z=ei#oe=i&dKned#d$d%d#d%d$d&d#d$d#d5f ei+d1ei,dGdLi/d6i-d7Z>ei#oe>i&dMned#d$d%d#d%d$d&d#d$d#d$f ei+d1ei1d#d5i+d9ei2dNd#fdOd5fi/d#i-d7Z?ei#oe?i&dPned#d$d%d#d%d$d&d#d$d#d=f e i/d>i-d7Z@ei#oe@i&dQned#d$d%d#d%d$d&d#d$d#d@f ei-d7ZAei#oeAi&dAned#d$d%d#d%d$d&d$fZBed#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.dWfZFed#d$d%d#d%d$d&d$d5d#f iEd.dXfd.dYfd.dZfd.d[fZGeiHd.d\e"eiHd.d]e"d^e'd_e(d`e*d/e.dXe0d[e3dZe4dYe5dae6dbe7dHe8dSe9dWe:dce;dde<dIe=dVe>dTe?dUe@dReAdeeBdfeCdgeDeiHd.dheFdieGdjS(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.sThis 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 namedValuesstrapsinformsThis 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 nonVolatilesThe 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.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 snmpNotifyFilterProfileRowStatus column is 'notReady'. In particular, a newly created row cannot be made active until the corresponding instance of snmpNotifyFilterProfileName has been set.sThe 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].issnmpNotifyFilterProfileNamessnmpNotifyFilterSubtreesAn element of a filter profile. Entries in the snmpNotifyFilterTable are created and deleted using the snmpNotifyFilterRowStatus object.sThe 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.isThe 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.sincludedsexcludedsThis 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].sThe 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=opysnmp/smi/mibs/SNMPv2-TM.pyc; LKc@sdkZdkZdklZeidd\Zeidddddd d \ZZZ Z Z Z eid d \Z ee id fidfZe e idfZde efdYZe e idfZe e idfZde efdYZe e idfZdee fdYZe e idfZde efdYZee idfZeeidfZeiddeeiddededed ed!eded"eded#eded$ed%e dS(&N(s constraintsASN1s OctetStrings SNMPv2-SMIsModuleIdentitys MibIdentifiersObjectIdentitys snmpModuless snmpDomainss snmpProxyss SNMPv2-TCsTextualConventionis2002-10-16 00:00isSnmpUDPAddresscBs9tZeieiddZdZdZdZRS(Nis1d.1d.1d.1d/2dcCst|tijoXtdtdti|ddt|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 dt|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'tZeieiddZdZRS(NiiUs*1x:/1x:(s__name__s __module__s OctetStrings subtypeSpecs constraintsValueSizeConstraints displayHint(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TM.pysSnmpOSIAddress'sisSnmpNBPAddresscBs!tZeieiddZRS(Niic(s__name__s __module__s OctetStrings subtypeSpecs constraintsValueSizeConstraint(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TM.pysSnmpNBPAddress-sisSnmpIPXAddresscBs'tZeieiddZdZRS(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;@@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=y77pysnmp/smi/mibs/SNMPv2-TC.pyc; Ec$@sdklZlZdklZdklZlZdkl Z e i dddd\Z Z Ze i dd d d d \ZZZZd fdYZdee fdYZdee fdYZdee fdYZde efdYZde efdYZdeefdYZdeefdYZdeefdYZdeefd 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 Counter64sTextualConventioncBstZdZdZdZdZfZeZe Z e Z e ZeZeZeZdZdZdZdZdZRS(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;tddt |id\} } | djo d|Sq>| djo`y1dt | t|tdt | fSWqtj o}tid |qXq>| d jo d |Sq>| d joQ|}d g} x.|o&| idd|d@|d?}qNWt| dSq>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|in| d}| d} | o| dtjo| ddjo| d}| d} nd}| o|o |tj o| d}d}| d} nt}x]|oU|d}|djp |djo| || } n|ddd fjod} || }xi|oa| d>} y"| t%|dB} |d}Wqtj o"}tid||fqXqW|djo| d| } q|d jo| d| } q| d| } ntid||o|o| |} n||}qnW|o|o| |} n| o |i} qqW| 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 prettyOutsi'   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'tZeieiddZdZRS(Niis255a(s__name__s __module__s OctetStrings subtypeSpecs constraintsValueSizeConstraints displayHint(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pys DisplayStringss PhysAddresscBstZdZRS(Ns1x:(s__name__s __module__s displayHint(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pys PhysAddressss MacAddresscBs-tZeieiddZdZdZRS(Nis1x:(s__name__s __module__s OctetStrings subtypeSpecs constraintsValueSizeConstraints displayHints fixedLength(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pys MacAddressss TruthValuecBs?tZeieiddZeiddfddfZRS(Niistruesfalse( s__name__s __module__sIntegers subtypeSpecs constraintsSingleValueConstraintsnamedvals NamedValuess namedValues(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pys TruthValuess TestAndIncrcBs0tZeieiddZdZdZRS(NilcCs[||jotid|d|n|d}|djo d}n|i|SdS(Nsidxsnameiii(svaluesselfserrorsInconsistentValueErrorsidxsnamesclone(sselfsnamesvaluesidx((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pyssmiWrites     (s__name__s __module__sIntegers subtypeSpecs constraintsValueRangeConstraints defaultValuessmiWrite(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pys TestAndIncrssAutonomousTypecBstZRS(N(s__name__s __module__(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pysAutonomousTypessInstancePointercBstZdZRS(Nsobsolete(s__name__s __module__sstatus(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pysInstancePointerssVariablePointercBstZRS(N(s__name__s __module__(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pysVariablePointerss RowPointercBstZRS(N(s__name__s __module__(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pys RowPointerss RowStatusc BstZdZeieidddddddZeiddfd dfd dfd dfd dfd dfddfZ 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 RowStatuss (*!!G   s TimeStampcBstZRS(N(s__name__s __module__(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pys TimeStamp:ss TimeIntervalcBs!tZeieiddZRS(Nil(s__name__s __module__sIntegers subtypeSpecs constraintsValueRangeConstraint(((s7build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-TC.pys TimeInterval<ss DateAndTimecBs'tZeieiddZdZRS(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 StorageTypecBsctZeieidddddZeiddfddfddfd dfd dfZRS( 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!tZeieiddZRS(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=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(fi"d)d*d+fZ#ei$oe#i%d,nei$oe#i&d-nei$oe#i'd.ned%d&d'd%d'd&d(d%fZ(ed%d&d'd%d'd&d(d%d%f ei)d/Z*ei$oe*i'd0ned%d&d'd%d'd&d(d%d1f Z+ei$oe+i'd2ned%d&d'd%d'd&d(d%d1d%f i,d%d3d4fZ-ei$oe-i'd5ned%d&d'd%d'd&d(d%d1d%d%f ei.d6ei/d%d7i)d8Z0ei$oe0i'd9ned%d&d'd%d'd&d(d%d1d%d1f ei)d:Z1ei$oe1i'd;ned%d&d'd%d'd&d(d%d1d%d&f ei)d:Z2ei$oe2i'd<ned%d&d'd%d'd&d(d%d1d%d=f ei3d>i)d:Z4ei$oe4i'd?ned%d&d'd%d'd&d(d%d1d%d@f ei.d6ei5dAdBi3d&i)d:Z6ei$oe6i'dCned%d&d'd%d'd&d(d%d1d%d'f e i3dDi)d:Z7ei$oe7i'dEned%d&d'd%d'd&d(d%d1d%dFf ei.d6ei/d%d7i)d:Z8ei$oe8i'dGned%d&d'd%d'd&d(d%d1d%dHf ei3dIi)d:Z9ei$oe9i'dJned%d&d'd%d'd&d(d%d1d%dKf ei)d:Z:ei$oe:i'dLned%d&d'd%d'd&d(d%d&f Z;ei$oe;i'dMned%d&d'd%d'd&d(d%d&d%f i,d%d3dNfZ<ei$oe<i'dOned%d&d'd%d'd&d(d%d&d%d%f ei.d6ei/d%d7i)d8Z=ei$oe=i'dPned%d&d'd%d'd&d(d%d&d%d1f e i)d:Z>ei$oe>i'dQned%d&d'd%d'd&d(d%d&d%d&f e i.d6ei5d%dRi)d:Z?ei$oe?i'dSned%d&d'd%d'd&d(d%d&d%d=f ei)d:Z@ei$oe@i'dTned%d&d'd%d'd&d(d%d&d%d@f e i)d:ZAei$oeAi'dUned%d&d'd%d'd&d(d%d&d%d'f ei3dIi)d:ZBei$oeBi'dJned%d&d'd%d'd&d(d%d&d%dFf ei)d:ZCei$oeCi'dVned%d&d'd%d'd&d(d%d=f ei)dWZDei$oeDi'dXned%d&d'd%d'd&d(d%d@f ei)dWZEei$oeEi'dYned%d&d'd%d'd&d(d&fZFed%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[fZJe d%d&d'd%d'd&d(d&d1d&f iId3d\fd3d]fZKe 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]eEdreFdseGdteHeiMd3dueJdveKdweLdxS(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'tZdZeieiddZRS(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'tZdZeieiddZRS(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 readwritesThis 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-MIBssnmpTargetAddrNamesA 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.iisThis 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.iiisThis 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.isThe 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 nonVolatilesThe 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.lsThe 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.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 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.sreadonlysThe total number of packets received by the SNMP engine which were dropped because the context contained in the message was unavailable.sThe 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 $''BBPK=6wpysnmp/smi/mibs/SNMPv2-SMI.pyc; Z4LcN@sbdkZdklZdklZlZdklZdkl Z dk l Z l Z dk lZeiddd d \ZZZeiZeiZeiZeiZeiZeiZeiZeiZeiZeiZd efd YZd fdYZdefdYZ defdYZ!defdYZ"defdYZ#defdYZ$de$fdYZ%de%fdYZ&de%fdYZ'de&fd YZ(d!e%fd"YZ)d#e%fd$YZ*e!d%d%fZ+e%d&fZ,e#e,i-d'fZ.e#e.i-d(fZ/e#e/i-d&fZ0e#e0i-d&fZ1e#e0i-d)fZ2e#e2i-d&fZ3d*e3_4e#e3i-d+fZ5e#e0i-d'fZ6e#e0i-d,fZ7e#e7i-d&fZ8e#e0i-d-fZ9e#e0i-d(fZ:e#e:i-d&fZ;e#e:i-d)fZ<e#e:i-d'fZ=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 ExtUTCTimecBs9tZeieieiddeiddZRS(Ni i (s__name__s __module__s OctetStrings subtypeSpecs constraintsConstraintsUnionsValueSizeConstraint(((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys ExtUTCTimessMibNodecBsGtZdZdZdZdZdZdZedZ 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     sModuleIdentitycBsktZdZdZdZdZdZdZdZdZ d Z d Z d Z RS( NcCst|ddSdS(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|ddSdS(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|ddSdS(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|ddSdS(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|dfSdS(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|ititd|ifSdS(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          sObjectIdentitycBsGtZdZdZdZdZdZdZdZRS(NcCst|ddSdS(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|ddSdS(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|ddSdS(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|ifSdS(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      sNotificationTypecBsYtZdZdZdZdZdZdZdZdZ d Z RS( NcCst|dfSdS(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|ddSdS(Nsstatusscurrent(sgetattrsself(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys getStatusscCs||_|SdS(N(svsselfsstatus(sselfsv((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys setStatuss cCst|ddSdS(Ns descriptions(sgetattrsself(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pysgetDescriptionscCs||_|SdS(N(svsselfs description(sselfsv((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pyssetDescriptions cCst|dfSdS(Ns revisions(sgetattrsself(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys getRevisionsscCs||_|SdS(N(sargssselfs revisions(sselfsargs((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys setRevisionss cCsZdtd|iddf|i|ititd|ifSdS(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.pyssscCsd|S(NsREVISION "%s" (sx(sx((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pyss( sreducesselfs getObjectss getStatussgetDescriptionsstringsjoinsmaps getRevisions(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys asn1Prints( 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 MibIdentifiercBstZdZRS(NcCsdSdS(NsOBJECT IDENTIFIER((sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys asn1Prints(s__name__s __module__s asn1Print(((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys MibIdentifierss ObjectTypecBstZeZedZdZdZdZdZdZ dZ dZ d Z d Z d Zd Zd ZdZdZRS(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 getSyntaxscCst|ddSdS(Nsunitss(sgetattrsself(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pysgetUnitsscCs||_|SdS(N(svsselfsunits(sselfsv((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pyssetUnitss cCst|ddSdS(Ns maxAccesssnot-accessible(sgetattrsself(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys getMaxAccessscCs||_|SdS(N(svsselfs maxAccess(sselfsv((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys setMaxAccesss cCst|ddSdS(Nsstatusscurrent(sgetattrsself(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys getStatusscCs||_|SdS(N(svsselfsstatus(sselfsv((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys setStatuss cCst|ddSdS(Ns descriptions(sgetattrsself(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pysgetDescriptionscCs||_|SdS(N(svsselfs description(sselfsv((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pyssetDescriptions cCst|ddSdS(Ns references(sgetattrsself(sself((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys getReferencescCs||_|SdS(N(svsselfs reference(sselfsv((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pys setReferences cCsHd|iii|i|i|i|i|ifSdS(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 asn1Prints(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 ObjectTypes               sMibTreecBstZdZdZedZdZdZdZedZ edZ d Z d Z d Z d Zd ZdZdZdZRS(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|io tid|i|fn||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 setFromNames2_4  " '#20#cCs|ii|pI|ii|p6|ii|p#|ii|p|ii|ot|fSn,|i i|ot t t |Sn|i i|oP|p |io f}nt|f}tdt d||Sn|ii|o3|ot |Sqt|ift |SnY|ii|o,tdt d|t|fSntidt|dS(NcCs ||fS(N(sxsy(sxsy((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pysscCs t|S(N(sordsx(sx((s8build/bdist.linux-i686/egg/pysnmp/smi/mibs/SNMPv2-SMI.pysssUnknown 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 getAsNames _ #,cCs^|\}}|t|id} g} x~|iD]s\}}} t i || \} |i| i| |\}} |i| id jo| i| i|fq3q3W| otid|| fn| odSnxy|iiD]h\}} t i || \} titi@otid|| f| i|| ||||fqWdS(Niis5Excessive 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.pysannounceManagementEvent(s"   (cCs|\}}f}xp|iD]e\} } } ti | | \} x>|D]6\}} || i jo||i| | }qGqGWqW|oNtiti@otid||f|i|f|||||fndS(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.pysreceiveManagementEventAs   "(cGsnxc|D][\}}|ii||fo#tid|i||fnd|i||fed?ed@edAe"dBe#dCe$dDe&d-e(dEe)dFe*dGe+dHe,d<e-dIe.dJe/dKe0dLe1dMe2dNe3dOe4dPS(Q(s constraintsnamedvalsASN1sIntegersObjectIdentifiers OctetStrings PYSNMP-MIBspysnmpModuleIDssSNMP-FRAMEWORK-MIBsSnmpAdminStringsSNMP-USER-BASED-SM-MIBs usmUserEntrys SNMPv2-SMIsBitss Integer32sModuleIdentitys MibIdentifiers MibScalarsMibTables MibTableRowsMibTableColumns TimeTickss SNMPv2-TCs RowStatusiiiiiOs2005-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.iisCUser'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= pysnmp/smi/mibs/PYSNMP-MIB.pyc; "Ic@sFdklZlZeidddd\ZZZeiddddd d d \ZZ Z Z Z Z e d d dd dd dfidfZeioeidneioeidneioeidne d d dd dd dd fZe d d dd dd ddfZe d d dd dd dd fZe 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 ddfZe d d dd dd dddf Ze d d dd dd ddd f Ze d d dd dd ddfZe d d dd dd ddd f Ze d d dd dd dddf Ze d d dd dd ddfZ ei!ddeei!ddededededed ed!ed"ed#ed$ed%ed&ed'ed(e d)S(*(s constraintsnamedvalsASN1sIntegersObjectIdentifiers OctetStrings SNMPv2-SMIsBitss Integer32sModuleIdentitys MibIdentifiers TimeTickss enterprisesiiiiiOs2005-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-   $$$'''$''$''$PK0G6ܡ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 ) PKz:=bbpysnmp/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) PKz: !!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) PKo1pysnmp/smi/mibs/__init__.pyPK=!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-fi(d.d/d0fZ)ei"oe)i*d1nei"oe)i+d2nei"oe)i#d3ned#d$d%d#d%d$d-d#fZ,ed#d$d%d#d%d$d-d#d#f Z-ed#d$d%d#d%d$d-d#d#d#f ei.d4Z/ei"oe/i#d5ned#d$d%d#d%d$d-d#d#d(f ei.d4Z0ei"oe0i#d6ned#d$d%d#d%d$d-d#d#d$f ei.d4Z1ei"oe1i#d7ned#d$d%d#d%d$d-d#d#d8f ei.d4Z2ei"oe2i#d9ned#d$d%d#d%d$d-d#d#d:f ei.d4Z3ei"oe3i#d;ned#d$d%d#d%d$d-d#d#d%f ei.d4Z4ei"oe4i#d<ned#d$d%d#d%d$d-d#d(f Z5ed#d$d%d#d%d$d-d#d(d#f ei.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@dAdCfZ9ei"oe9i#dDned#d$d%d#d%d$d-d#d(d(d#d#f e i.dEZ:ei"oe:i#dFned#d$d%d#d%d$d-d#d(d(d#d(f ei;dGei<d#dHi.dEZ=ei"oe=i#dIndJefdKYZ>e>d#d$d%d#d%d$d-d#d(d(d#d$f ei.d4Z?ei"oe?i#dLned#d$d%d#d%d$d-d#d(d(d#d8f ei.dMZ@ei"oe@i#dNned#d$d%d#d%d$d-d#d(d(d#d:f eiAdOi.dMZBei"oeBi#dPned#d$d%d#d%d$d-d#d(d(d#d%f e iAdQi.dMZCei"oeCi#dRned#d$d%d#d%d$d-d#d(d(d#dSf e iAdQi.dMZDei"oeDi#dTned#d$d%d#d%d$d-d#d(d(d#dUf eiAdVi.dMZEei"oeEi#dWned#d$d%d#d%d$d-d#d(d(d#dXf e iAdQi.dMZFei"oeFi#dYned#d$d%d#d%d$d-d#d(d(d#d&f e iAdQi.dMZGei"oeGi#dZned#d$d%d#d%d$d-d#d(d(d#d[f ei;dGei<d@dHiAdQi.dMZHei"oeHi#d\ned#d$d%d#d%d$d-d#d(d(d#d]f eiAd^i.dMZIei"oeIi#d_ned#d$d%d#d%d$d-d#d(d(d#d`f ei.dMZJei"oeJi#daned#d$d%d#d%d$d-d(fZKed#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 iNdAdbfdAdcfdAddfdAdefdAdffdAdgfdAdhfdAdifdAdjfdAdkfdAdlfdAdmfdAdnfdAdofdAdpfdAdqfdAdrfdAdsfZOeiPdAdte)eiPdAd!e eiPdAdue!dve$dwe%dxe&dye'dze)d{e,d|e-dge/dde0dee1dbe2dre3dhe4d}e5dme6d~e7de9dBe:dCe=dfe?doe@dqeBdneCdceDdpeEdjeFdkeGdseHdleIdieJdeKdeLdeM"eiPdAdeOdS((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 GroupsWG-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-685sThe 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.sreadonlysThe 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.sThe 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.isThe 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.sThe 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.snoaccesssAn 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.sUsmUserSecurityNamecBs5tZdZdZdZdZdZRS(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||||fSdS(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||||fSdS(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||||fSdS(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||||fSdS(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 readcreatesA 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.1sAn 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 sAn 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 sA 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=G77)pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.pyc; LKc&@sdkZdkZdklZlZeidddd\ZZZ eidddd d d d d \Z Z Z Z ZZZeidd\Zde fdYZdee fdYZdee fdYZdee fdYZdee fdYZdee fdYZdee fdYZdefdYZd efd!YZe d"d#d$d"d%d"d&fid'fZeioeid(neioeid)neioei d*ne d"d#d$d"d%d"d&d"fZ!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 d1ned"d#d$d"d%d"d&d"d$f Z'eioe'i d2ned"d#d$d"d%d"d&d"d3f Z(eioe(i d4ned"d#d$d"d%d"d&d"d5f Z)eioe)i d6ned"d#d$d"d%d"d&d"d7f Z*eioe*i d8ned"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 dBned"d#d$d"d%d"d&d"dCf Z0eioe0i dDned"d#d$d"d%d"d&d"dEf Z1eioe1i dFnei2dGdHeei2dGdedededededededed e ei2dGdIedJe!dKe"dLe#dMe$dNe%dOe&dPe'dQe(dRe)dSe*dTe+dUe,dVe-dWe.dXe/dYe0dZe1dS([N(s constraintsnamedvalsASN1sIntegersObjectIdentifiers OctetStrings SNMPv2-SMIsBitss Integer32sModuleIdentitys MibIdentifiersObjectIdentitys TimeTickssmib-2s SNMPv2-TCsTextualConventionsTransportAddresscBs!tZeieiddZRS(Nii(s__name__s __module__s OctetStrings subtypeSpecs constraintsValueSizeConstraint(((sCbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.pysTransportAddressssTransportAddressDnscBs'tZdZeieiddZRS(Ns1aii(s__name__s __module__s displayHints OctetStrings subtypeSpecs constraintsValueSizeConstraint(((sCbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.pysTransportAddressDnsssTransportAddressIPv4cBs?tZdZeieiddZdZdZdZ RS(Ns1d.1d.1d.1d:2dicCst|tijoXtdtdti|ddt|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 dt|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-tZdZeieiddZdZRS(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?tZdZeieiddZdZdZdZ RS(Ns 0a[2x:2x:2x:2x:2x:2x:2x:2x]0a:2dicCsmt|tijoCtiti|dt|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-tZdZeieiddZdZRS(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'tZdZeieiddZRS(Ns1aii(s__name__s __module__s displayHints OctetStrings subtypeSpecs constraintsValueSizeConstraint(((sCbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/TRANSPORT-ADDRESS-MIB.pysTransportAddressLocalQssTransportAddressTypecBstZeieiddddddddd d d d d ddddZeiddfddfddfdd fddfddfddfdd fdd fddfdd fdd fddfddfd dfd!dfd"dfZRS(#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.pysTransportAddressTypeVsFsTransportDomaincBstZRS(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 AreasJuergen 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 .sThis 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.sThe UDP over IPv4 transport domain. The corresponding transport address is of type TransportAddressIPv4 for global IPv4 addresses.sThe UDP over IPv6 transport domain. The corresponding transport address is of type TransportAddressIPv6 for global IPv6 addresses.sThe UDP over IPv4 transport domain. The corresponding transport address is of type TransportAddressIPv4z for scoped IPv4 addresses with a zone index.isThe UDP over IPv6 transport domain. The corresponding transport address is of type TransportAddressIPv6z for scoped IPv6 addresses with a zone index.isThe TCP over IPv4 transport domain. The corresponding transport address is of type TransportAddressIPv4 for global IPv4 addresses.sThe TCP over IPv6 transport domain. The corresponding transport address is of type TransportAddressIPv6 for global IPv6 addresses.isThe TCP over IPv4 transport domain. The corresponding transport address is of type TransportAddressIPv4z for scoped IPv4 addresses with a zone index.isThe TCP over IPv6 transport domain. The corresponding transport address is of type TransportAddressIPv6z for scoped IPv6 addresses with a zone index.i sThe 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 sThe 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 sThe 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 sThe 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 sThe 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.isThe UDP transport domain using fully qualified domain names. The corresponding transport address is of type TransportAddressDns.isThe 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-   $' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' CPKz:*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) 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 ) PKj [33q pysnmp/smi/mibs/SNMPv2-CONF.py ( MibNode, NotificationType ) = mibBuilder.importSymbols('SNMPv2-SMI','MibNode','NotificationType') class ObjectGroup(NotificationType): pass class NotificationGroup(NotificationType): pass class ModuleCompliance(MibNode): pass class AgentCapabilities(MibNode): pass mibBuilder.exportSymbols('SNMPv2-CONF', ObjectGroup=ObjectGroup, NotificationGroup=NotificationGroup, ModuleCompliance=ModuleCompliance, AgentCapabilities=AgentCapabilities) PKR 4Cwjj+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 ) 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 ) 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 ) PK= 86pysnmp/smi/mibs/instances/__SNMP-USER-BASED-SM-MIB.pyc; ZDc@seidd\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 ed 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=̇;mm2pysnmp/smi/mibs/instances/__SNMP-FRAMEWORK-MIB.pyc; XEc @sdkZeidd\Zeiddddd\ZZZZeeidfei Z eeidfei i d Z eeidfei i e eiZeeidfei i d Zeid de de dededS( 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$ PKl9$,@@)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 ) PK=^Cؐ&pysnmp/smi/mibs/instances/__init__.pyc; _Cc@sdS(N((((s@build/bdist.linux-i686/egg/pysnmp/smi/mibs/instances/__init__.pys?sPKR 4M6nn-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 ) PK=-C,pysnmp/smi/mibs/instances/__SNMP-MPD-MIB.pyc; ZDc@seidd\Zeidddd\ZZZeeidfeiidZ eeidfeiidZ eeidfeiidZ 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   $$$ PK={6/pysnmp/smi/mibs/instances/__SNMP-TARGET-MIB.pyc; ZDc@seidd\Zeidddd\ZZZeeidfeiidZ eeidfeiidZ eeidfeiidZ ei dde de de dS( s SNMPv2-SMIsMibScalarInstancesSNMP-TARGET-MIBssnmpTargetSpinLockssnmpUnavailableContextsssnmpUnknownContextsis__SNMP-TARGET-MIBN( s mibBuilders importSymbolssMibScalarInstancessnmpTargetSpinLockssnmpUnavailableContextsssnmpUnknownContextssnamessyntaxsclones__snmpTargetSpinLocks__snmpUnavailableContextss__snmpUnknownContextss exportSymbols(ssnmpUnknownContextss__snmpTargetSpinLocks__snmpUnknownContextssMibScalarInstances__snmpUnavailableContextsssnmpUnavailableContextsssnmpTargetSpinLock((sIbuild/bdist.linux-i686/egg/pysnmp/smi/mibs/instances/__SNMP-TARGET-MIB.pys?s   $$$ 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 ) PK=6.pysnmp/smi/mibs/instances/__PYSNMP-USM-MIB.pyc; ZDc@seidd\Zeiddd\ZZeeidfeiZeeidfeiZei ddededS(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__.pyPKR 4|bff5pysnmp/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=_II7pysnmp/smi/mibs/instances/__SNMP-VIEW-BASED-ACM-MIB.pyc; ZDc@s\eidd\Zeidd\ZeeidfeiZeiddedS(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= DY*pysnmp/smi/mibs/instances/__SNMPv2-MIB.pyc; IcN@sdklZdklZdklZeiddd\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/eefZ3ee i0d.fe i1i2d0d1d2d0d3d0d4fZ4d5efd6YZ5ee i0d.fe5d.Z6ee i0d.fe i1i2d7Z7ee i0d.fe i1i2d7Z8eei0d.fei1i2d7Z9eei0d.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*i1i2d0ZUee+i0d.fe+i1i2d.ZVee,i0d.fe,i1i2d.ZWee-i0d.fe-i1i2e.i0ZXee/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 %siiiiiOs SysUpTimecBstZeZdZRS(NcKsR|idtjo"tt|id|dtZededZdZdZdZdZRS(NicCs|tjot|_n ||_htit<tit<tit<|_ht i t <t i t <t i t <|_ htit<|_t|_|iitjotidn|iiiidd\}|ii||_|iiiidd\}|id|_|tj o7|iiiidd\}|ii||_ndS(Ns&MIB instrumentation does not yet exists__SNMP-FRAMEWORK-MIBssnmpEngineMaxMessageSizessnmpEngineBootsis snmpEngineID(s msgAndPduDspsNonesMsgAndPduDispatchersselfsSnmpV1MessageProcessingModelsmessageProcessingModelIDsSnmpV2cMessageProcessingModelsSnmpV3MessageProcessingModelsmessageProcessingSubsystemssSnmpV1SecurityModelssecurityModelIDsSnmpV2cSecurityModelsSnmpUSMSecurityModelssecurityModelssrfc3415s accessModelIDsaccessControlModelstransportDispatchersmibInstrumControllerserrors PySnmpErrors mibBuilders importSymbolsssnmpEngineMaxMessageSizessyntaxsclonesmaxMessageSizessnmpEngineBootss snmpEngineIDsorigSnmpEngineID(sselfs snmpEngineIDsmaxMessageSizes msgAndPduDspssnmpEngineMaxMessageSizessnmpEngineBootssorigSnmpEngineID((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__receiveMessageCbFun4scCsk|ii||x'|iiD]}|i||q#Wx'|iiD]}|i||qMWdS(N( sselfs msgAndPduDspsreceiveTimerTickstimeNowsmessageProcessingSubsystemssvaluess mpHandlerssecurityModelss smHandler(sselfstimeNows mpHandlers smHandler((s2build/bdist.linux-i686/egg/pysnmp/entity/engine.pys__receiveTimerTickCbFun?scCsP|itj otidn|i|i|i|i||_dS(Ns'Transport dispatcher already registered( sselfstransportDispatchersNoneserrors ProtocolErrorsregisterRecvCbFuns _SnmpEngine__receiveMessageCbFunsregisterTimerCbFuns"_SnmpEngine__receiveTimerTickCbFun(sselfstransportDispatcher((s2build/bdist.linux-i686/egg/pysnmp/entity/engine.pysregisterTransportDispatcherFs cCsJ|itjotidn|ii|iit|_dS(Ns#Transport dispatcher not registered(sselfstransportDispatchersNoneserrors ProtocolErrorsunregisterRecvCbFunsunregisterTimerCbFun(sself((s2build/bdist.linux-i686/egg/pysnmp/entity/engine.pysunregisterTransportDispatcherSs   (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.acmodsrfc3415spysnmpserrors SnmpEngine( sSnmpV1MessageProcessingModelsSnmpV1SecurityModelserrorsSnmpV2cSecurityModels SnmpEnginesSnmpV2cMessageProcessingModelsSnmpV3MessageProcessingModelsMsgAndPduDispatchersSnmpUSMSecurityModelsrfc3415((s2build/bdist.linux-i686/egg/pysnmp/entity/engine.pys?s     PK='„pysnmp/entity/__init__.pyc; Bc@sdS(N((((s4build/bdist.linux-i686/egg/pysnmp/entity/__init__.pys?sPK=ܿoopysnmp/entity/config.pyc; $)Lc@sdkZdklZdklZlZydklZeiZWnej 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-dZ.dZ/e$e,e*e,e,dZ0e,dZ1dZ2ddZ3dZ4dZ5e,e,ddZ6dZ7dZ8dZ9dZ:dZ;dZ<dZ=d Z>d!Z?d"Z@d#ZAd$ZBd%ZCd&ZDfffdd'ZEfffd(ZFd)ZGd*ZHd+ZId,ZJd-ZKd.ZLe,d/ZMe,e,e,e,d0ZNe,d1ZOd2ZPdS(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 ffdS( 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|dffdS(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  cCst|||\}} }}}|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| |}qti d |fn2|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||ffdS(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|dffdS(Ni sdestroyi( s__cookV3UserInfos snmpEngines securityNamescontextEngineIds snmpEngineIDs usmUserEntrystblIdx1spysnmpUsmSecretEntrystblIdx2s msgAndPduDspsmibInstrumControllers writeVarssname(s snmpEngines securityNamescontextEngineIds usmUserEntrystblIdx2s snmpEngineIDstblIdx1spysnmpUsmSecretEntry((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys delV3Users!*cCs;|iiiidd\}|i|}||fSdS(NsSNMP-TARGET-MIBssnmpTargetParamsEntry( s snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolsssnmpTargetParamsEntrysgetInstIdFromIndicessnamestblIdx(s snmpEnginesnamestblIdxssnmpTargetParamsEntry((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys__cookTargetParamsInfosicCsE|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||ffdS( 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.pysaddTargetParamss     *cCsCt||\}}|iii|idf|dffdS(Nisdestroy(s__cookTargetParamsInfos snmpEnginesnamessnmpTargetParamsEntrystblIdxs msgAndPduDspsmibInstrumControllers writeVars(s snmpEnginesnamestblIdxssnmpTargetParamsEntry((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pysdelTargetParamsscCs;|iiiidd\}|i|}||fSdS(NsSNMP-TARGET-MIBssnmpTargetAddrEntry( s snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolsssnmpTargetAddrEntrysgetInstIdFromIndicessaddrNamestblIdx(s snmpEnginesaddrNamessnmpTargetAddrEntrystblIdx((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys__cookTargetAddrInfossc Cst||\} } |tjo.|iii i dd\} | |}n<|t jo.|iii i dd\}||}n|iii| idf| dff|iii| idf| df| idf| |f| id f| |f| id f| |f| id f| |f| id f| |f| id f| d||ff| idf| |ffdS(Ns SNMPv2-TMsSnmpUDPAddresssTRANSPORT-ADDRESS-MIBsTransportAddressIPv6i sdestroys createAndGoiiiiiis%s %si(s__cookTargetAddrInfos snmpEnginesaddrNamessnmpTargetAddrEntrystblIdxstransportDomains snmpUDPDomains msgAndPduDspsmibInstrumControllers mibBuilders importSymbolssSnmpUDPAddressstransportAddressssnmpUDP6DomainsTransportAddressIPv6s writeVarssnamestimeouts retryCountstagListsparams( s snmpEnginesaddrNamestransportDomainstransportAddresssparamsstimeouts retryCountstagListsTransportAddressIPv6stblIdxsSnmpUDPAddressssnmpTargetAddrEntry((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys addTargetAddrs   *cCsCt||\}}|iii|idf|dffdS(Ni sdestroy( s__cookTargetAddrInfos snmpEnginesaddrNamessnmpTargetAddrEntrystblIdxs msgAndPduDspsmibInstrumControllers writeVarssname(s snmpEnginesaddrNamessnmpTargetAddrEntrystblIdx((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys delTargetAddrscCs9|i o|itin|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||idS(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||ffdS(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=scCst|||\}}|iii|i df|dff|iii|i df|df|i df||f|i df||f|i df||ffdS(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|dffdS(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| |ffdS( 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|dffdS(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__cookVacmViewInfoscCst|||\}}|iii|i df|dff|iii|i df|df|i df||f|i df||f|i df||f|i df||ffdS(Nisdestroys createAndGoiiii( s__cookVacmViewInfos snmpEnginesviewNamessubTreesvacmViewTreeFamilyEntrystblIdxs msgAndPduDspsmibInstrumControllers writeVarssnamesmasksviewType(s snmpEnginesviewNamesviewTypessubTreesmasksvacmViewTreeFamilyEntrystblIdx((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys addVacmViews*cCsFt|||\}}|iii|i df|dffdS(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__cookVacmUserInfos c Cst||||\} }} } }t || ||t || |||d| | | |ot || d|dn|ot || d|dn|ot ||d|dndS(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 addVacmUsers$ c Cst||||\} }} }}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 delVacmUsers$cCst|||||dS(N(s addVacmUsers snmpEngines securityModels securityNames securityLevelssubTree(s snmpEngines securityModels securityNames securityLevelssubTree((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys addRoUserscCst|||||dS(N(s delVacmUsers snmpEngines securityModels securityNames securityLevelssubTree(s snmpEngines securityModels securityNames securityLevelssubTree((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys delRoUserscCst||||||dS(N(s addVacmUsers snmpEngines securityModels securityNames securityLevelssubTree(s snmpEngines securityModels securityNames securityLevelssubTree((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys addRwUserscCst||||||dS(N(s delVacmUsers snmpEngines securityModels securityNames securityLevelssubTree(s snmpEngines securityModels securityNames securityLevelssubTree((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys delRwUserscCs t||||ff|dS(N(s addVacmUsers snmpEngines securityModels securityNames securityLevelssubTree(s snmpEngines securityModels securityNames securityLevelssubTree((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pys addTrapUserscCs 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 cCst||||\} } } } }} }|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||ffdS(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 Cst||||\}}}}} } }|i i i|idf|dff|i i i|idf|dff| odSn|i i i| idf|dffdS(Nisdestroyi(s__cookNotificationTargetInfos snmpEnginesnotificationNames paramsNames filterSubtreessnmpNotifyEntrystblIdx1ssnmpNotifyFilterProfileEntrystblIdx2s profileNamessnmpNotifyFilterEntrystblIdx3s msgAndPduDspsmibInstrumControllers writeVarssname( s snmpEnginesnotificationNames paramsNames filterSubtreessnmpNotifyEntryssnmpNotifyFilterProfileEntrystblIdx2stblIdx3stblIdx1s profileNamessnmpNotifyFilterEntry((s2build/bdist.linux-i686/egg/pysnmp/entity/config.pysdelNotificationTargetIs ***c Cst|dt|dddt|ddddddtd t|dddddddd t|dddd dddd t|dd d dd d fdt|dd d dd d d d d fdt|dd d dd d d d dfdt|dd d dd d d ddd d f dt|dd d dd d d ddd d f dt|dd d dd d d ddd d f ddS(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<eepysnmp/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 == snmpUDPDomain: SnmpUDPAddress, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('SNMPv2-TM', 'SnmpUDPAddress') transportAddress = SnmpUDPAddress(transportAddress) elif transportDomain == 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),"") PK9j2pysnmp/entity/__init__.pyPKE8rrpysnmp/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 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 = { 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.ProtocolError( '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.ProtocolError( 'Transport dispatcher not registered' ) self.transportDispatcher.unregisterRecvCbFun() self.transportDispatcher.unregisterTimerCbFun() self.transportDispatcher = None PK=m22 pysnmp/entity/rfc3413/cmdrsp.pyc; X=Lc@sdklZlZlZlZdklZdklZdk Z dk l Z dZ dfdYZ de fd YZd e fd YZd e fd YZde fdYZdS((srfc1157srfc1905srfc3411serror(sv2c(srfc2576N(sdebugisCommandResponderBasecBshtZfZdZdZdZdZeii Z ei i Z ei i ZdZdZRS(NcCs5|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 snmpEnginescontextMibInstrumCtlsPDUs.8sacFunsacCtx((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdrsp.pys_handleManagementOperations cCs |ii|ii|idS(N(s snmpEngines msgAndPduDspsunregisterContextEngineIdsselfs snmpContextscontextEngineIdspduTypes(sselfs snmpEngine((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdrsp.pysclosesc Csf|i|\ } }}}}} }} } }|i|=t it i@ot id||||ftii| |tii| |tii| || djoti| } ny5|ii|| ||||| || | || Wnntij o_}t it i@ot id||f|ii i!i"dd\} | i$d| _$nXdS(NsM__sendResponse: stateReference %s, errorStatus %s, errorIndex %s, varBinds %sis7__sendResponse: stateReference %s, statusInformation %ss __SNMPv2-MIBssnmpSilentDropsi(%sselfs"_CommandResponderBase__pendingReqssstateReferencesmessageProcessingModels securityModels securityNames securityLevelscontextEngineIds contextNames pduVersionsPDUsmaxSizeResponseScopedPDUsstatusInformationsdebugsloggersflagApps errorStatuss errorIndexsvarBindssv2csapiPDUssetErrorStatuss setErrorIndexs setVarBindssrfc2576sv2ToV1s snmpEngines msgAndPduDspsreturnResponsePduserrorsStatusInformationswhysmibInstrumControllers mibBuilders importSymbolsssnmpSilentDropsssyntax(sselfs snmpEngines errorStatuss errorIndexsvarBindssstateReferencesstatusInformations securityModelscontextEngineIdsmessageProcessingModelsmaxSizeResponseScopedPDUs contextNamessnmpSilentDropssPDUs pduVersionswhys securityLevels securityName((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdrsp.pys__sendResponses2+ .   (c  Cs|djoti| } ntii| io d}n7ti i| io d}nt i d| it i i| }h} ||||||||| | f |i| <|||||f}t i i| }ddf\}} t!i"t!i#@ot!i"d| |fy:|i$||i%i&|| |i'|f\}} }Wn.t(i)i i*j oa}t!i"t!i#@ot!i"d| |f|ido |d| d<|d | d 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| doQ|i| d \}}}|i i ||\} ||f| i|fSn]| o||f|fSnA|dfjo||ftfSntdd|| ifdS(Ns createTestiisstrs&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|do|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=.!B!B pysnmp/entity/rfc3413/cmdgen.pyc; K8;Lc@sdkZdkZdklZlZlZdklZdkl Z dkl Z dk l Z dk l Z e idZdZd fd YZd efd YZd efdYZdefdYZdefdYZdS(N(srfc1157srfc1905sapi(sconfig(srfc2576(serror(snextid(sdebugicCs2|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  sCommandGeneratorBasecBs5tZdZdZeeddZdZRS(NcCs h|_dS(N(sselfs"_CommandGeneratorBase__pendingReqs(sself((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdgen.pys__init__sc Cs| \} }|i| \}}}}}}}}}}}}}}|i| =|iit|| otiti@otid| | f||joMtiti@otid| |f| || dddf|dSn|i||||||||||||||d||i| |ffdSn||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+||||||||||||||| || |fdS( 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 ( ( \" %"  scCstiddS(NsMethod not implemented(serrors ProtocolError(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|sii($scbFunscbCtxspModsapiPDUsgetVarBindTablesPDUsrspPDUs varBindTablessendRequestHandlesNonesgetErrorStatuss getErrorIndexsdebugsloggersflagApps setRequestIDsgetNextRequestIDs setVarBindssmapsNullsselfs_sendPdus snmpEnginestransportDomainstransportAddresssmessageProcessingModels securityModels securityNames securityLevelscontextEngineIds contextNames pduVersionstimeouts retryCounts getNextHandlesprocessResponsePdu(sselfs snmpEnginestransportDomainstransportAddresssmessageProcessingModels securityModels securityNames securityLevelscontextEngineIds contextNames pduVersionsPDUstimeouts retryCountspModsrspPDUssendRequestHandles.34scbFunscbCtxs varBindTable((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdgen.pys_handleResponses2  "/ (s__name__s __module__sNonessendReqs_handleResponse(((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdgen.pysNextCommandGeneratords1sBulkCommandGeneratorcBs#tZeeddZdZRS(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 ProtocolErrorsGetBulkRequestPDUsreqPDUs 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.pyssendReqs6 *    cCs|\}}|ii| |}||t |ii ||ii ||| o*t i t i@ot i d|dSn|ii| |i|ii| t|idd|d|i||||||||| | | | | dt"|i#||ffdS(Ns?_handleResponse: sendRequestHandle %s, app says to stop walkingscCs|\}}||fS(N(sxsysn(s.0snsxsy((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdgen.pys#sii($scbFunscbCtxspMods apiBulkPDUsgetVarBindTablesPDUsrspPDUs varBindTablessendRequestHandlesNonesgetErrorStatuss getErrorIndexsdebugsloggersflagApps setRequestIDsgetNextRequestIDs setVarBindssmapsNullsselfs_sendPdus snmpEnginestransportDomainstransportAddresssmessageProcessingModels securityModels securityNames securityLevelscontextEngineIds contextNames pduVersionstimeouts retryCounts getNextHandlesprocessResponsePdu(sselfs snmpEnginestransportDomainstransportAddresssmessageProcessingModels securityModels securityNames securityLevelscontextEngineIds contextNames pduVersionsPDUstimeouts retryCountspModsrspPDUssendRequestHandles.34scbFunscbCtxs varBindTable((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdgen.pys_handleResponses2  "/ (s__name__s __module__sNonessendReqs_handleResponse(((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdgen.pysBulkCommandGenerators8(stypesstimes pysnmp.protosrfc1157srfc1905sapispysnmp.entity.rfc3413sconfigspysnmp.proto.proxysrfc2576serrorspysnmpsnextidsdebugsIntegers getNextHandlesgetVersionSpecificssCommandGeneratorBasesGetCommandGeneratorsSetCommandGeneratorsNextCommandGeneratorsBulkCommandGenerator(sBulkCommandGeneratorserrorsNextCommandGeneratorsrfc1905s getNextHandlesrfc2576sgetVersionSpecificssapisCommandGeneratorBasestimesdebugsSetCommandGeneratorsrfc1157sconfigsnextidstypessGetCommandGenerator((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/cmdgen.pys?s      MRgPKH no-op # 3.2.4 rspPDU = v2c.apiPDU.getResponse(PDU) statusInformation = {} self.__pendingReqs[stateReference] = ( messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, rspPDU, maxSizeResponseScopedPDU, statusInformation ) acCtx = ( snmpEngine, securityModel, securityName, securityLevel, contextName ) # 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: errorStatus,errorIndex,varBinds = self._handleManagementOperation( snmpEngine, self.snmpContext.getMibInstrum(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', 1 except pysnmp.error.PySnmpError, errorIndication: errorStatus, errorIndex = 'genErr', 1 self.__sendResponse( snmpEngine, errorStatus, errorIndex, varBinds, stateReference ) def __verifyAccess(self, name, idx, viewType, (snmpEngine, securityModel, securityName, securityLevel, contextName) ): try: snmpEngine.accessControlModel[vacmID].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 ) class GetCommandResponder(CommandResponderBase): pduTypes = ( rfc1905.GetRequestPDU.tagSet, ) # rfc1905: 4.2.1 def _handleManagementOperation( self, snmpEngine, contextMibInstrumCtl, PDU, (acFun, acCtx) ): # rfc1905: 4.2.1.1 return 0, 0, contextMibInstrumCtl.readVars( v2c.apiPDU.getVarBinds(PDU), (acFun, acCtx) ) class NextCommandResponder(CommandResponderBase): pduTypes = ( rfc1905.GetNextRequestPDU.tagSet, ) # rfc1905: 4.2.2 def _handleManagementOperation(self, snmpEngine, contextMibInstrumCtl, PDU, (acFun, acCtx)): # rfc1905: 4.2.1.1 return 0, 0, contextMibInstrumCtl.readNextVars( v2c.apiPDU.getVarBinds(PDU), (acFun, acCtx) ) class BulkCommandResponder(CommandResponderBase): pduTypes = ( rfc1905.GetBulkRequestPDU.tagSet, ) maxVarBinds = 64 # rfc1905: 4.2.3 def _handleManagementOperation(self, snmpEngine, contextMibInstrumCtl, 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(nonRepeaters, len(reqVarBinds)) M = int(maxRepetitions) R = max(len(reqVarBinds)-N, 0) debug.logger & debug.flagApp and debug.logger('_handleManagementOperation: N %d, M %d, R %d' % (N, M, R)) if nonRepeaters: rspVarBinds = contextMibInstrumCtl.readNextVars( reqVarBinds[:int(nonRepeaters)], (acFun, acCtx) ) else: rspVarBinds = [] if M and R: for i in range(N, R): varBind = reqVarBinds[i] for r in range(1, M): rspVarBinds.extend(contextMibInstrumCtl.readNextVars( (varBind,), (acFun, acCtx) )) varBind = rspVarBinds[-1] if len(rspVarBinds) > self.maxVarBinds: rspVarBinds = rspVarBinds[:self.maxVarBinds] return 0, 0, rspVarBinds class SetCommandResponder(CommandResponderBase): pduTypes = ( rfc1905.SetRequestPDU.tagSet, ) # rfc1905: 4.2.5 def _handleManagementOperation( self, snmpEngine, contextMibInstrumCtl, PDU, (acFun, acCtx) ): # rfc1905: 4.2.5.1-13 try: return 0, 0, contextMibInstrumCtl.writeVars( 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 PK<_|*?*?pysnmp/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.proto import error from pysnmp import nextid from pysnmp import debug getNextHandle = nextid.Integer(0x7fffffff) def getVersionSpecifics(snmpVersion): if snmpVersion == 0: pduVersion = 0 else: pduVersion = 1 return pduVersion, api.protoModules[pduVersion] class CommandGeneratorBase: 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.ProtocolError('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 not cbFun(sendRequestHandle, None, 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 pMod.apiPDU.setRequestID(PDU, pMod.getNextRequestID()) pMod.apiPDU.setVarBinds( PDU, map(lambda (x,y),n=pMod.Null(''): (x,n), 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.ProtocolError('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 not cbFun(sendRequestHandle, None, 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()) pMod.apiBulkPDU.setVarBinds( PDU, map(lambda (x,y),n=pMod.Null(''): (x,n), varBindTable[-1]) ) self._sendPdu( snmpEngine, transportDomain, transportAddress, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, PDU, timeout, retryCount, 0, getNextHandle(), (self.processResponsePdu, (cbFun, cbCtx)) ) PK=o'"pysnmp/entity/rfc3413/__init__.pyc; 렮Bc@sdS(N((((s<build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/__init__.pys?sPK=3koA pysnmp/entity/rfc3413/config.pyc; iKc@spdkZdklZlZdklZdklZdZdZ dZ dZ dZ 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|tijo4|iiiid d \} t| | } nE|tijo4|iiiid d \}t|| } n|| ||| fSdS( NsSNMP-TARGET-MIBssnmpTargetAddrEntryiiiiisTarget %s not configured at SMIs SNMPv2-TMsSnmpUDPAddresssTRANSPORT-ADDRESS-MIBsTransportAddressIPv6(s snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolsssnmpTargetAddrEntrysgetInstIdFromIndicesssnmpTargetAddrNamestblIdxsreadVarssnamesNonesvssnmpTargetAddrTDomainssnmpTargetAddrTAddressssnmpTargetAddrTimeoutssnmpTargetAddrRetryCountssnmpTargetAddrParamssnoSuchInstancesisSameTypeWithsSmiErrorsconfigs 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}xnoy|i |}Wnt j oPnX|tit|ijo4|it|i}|i|i|dn|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.pysgetTargetNamess  (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=7rz  pysnmp/entity/rfc3413/ntforg.pyc; ?8Lc@sdkZydklZWnej oddfZnXdklZdklZdkl Z dk l Z dk l Z dk lZd Ze id Zd fd YZdS( N(s version_infoi(sconfig(srfc2576(sv2c(serror(snextid(sdebugiisNotificationOriginatorcBs8tZdZdZdZeeeddZRS(NcCsh|_||_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=|||||dtEf|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_infoslistsextendsvarNamesvarValsaccessControlModelsvacmIDsisAccessAllowedserrorsSmiErrorsv2cs 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.pyssendNotificationws (! &             /(@(s__name__s __module__s__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.smiserrorspysnmpsnextidsdebugsvacmIDsIntegers getNextHandlesNotificationOriginator( sv2cs version_infoserrors getNextHandlesNotificationOriginatorsrfc2576svacmIDstimesdebugsnextidsconfig((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/ntforg.pys?s       PKl<mԈ%%pysnmp/entity/rfc3413/ntforg.pyimport time try: from sys import version_info except ImportError: version_info = ( 0, 0 ) # a really early version from pysnmp.entity.rfc3413 import config from pysnmp.proto.proxy import rfc2576 from pysnmp.proto.api import v2c from pysnmp.smi import error from pysnmp import nextid from pysnmp import debug vacmID = 3 getNextHandle = nextid.Integer(0x7fffffff) class NotificationOriginator: def __init__(self, snmpContext): self.__pendingReqs = {} self.__context = snmpContext def processResponsePdu( self, snmpEngine, messageProcessingModel, securityModel, securityName, securityLevel, contextEngineId, contextName, pduVersion, PDU, statusInformation, sendPduHandle, (cbFun, cbCtx) ): # 3.3.6d ( 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)) 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)) self._handleResponse( origSendRequestHandle, statusInformation['errorIndication'], cbFun, cbCtx) return # 3.3.6a sendPduHandle = snmpEngine.msgAndPduDsp.sendPdu( snmpEngine, origTransportDomain, origTransportAddress, origMessageProcessingModel, origSecurityModel, origSecurityName, origSecurityLevel, origContextEngineId, origContextName, origPduVersion, origPdu, (self.processResponsePdu, float(origTimeout)/100 + time.time(), (cbFun, cbCtx)) ) snmpEngine.transportDispatcher.jobStarted(id(self)) debug.logger & debug.flagApp and debug.logger('processResponsePdu: sendPduHandle %s, timeout %d, retry %d of %d' % (sendPduHandle, origTimeout, origRetries, origRetryCount)) # 3.3.6b self.__pendingReqs[sendPduHandle] = ( origTransportDomain, origTransportAddress, origMessageProcessingModel, origSecurityModel, origSecurityName, origSecurityLevel, origContextEngineId, origContextName, origPduVersion, origPdu, origTimeout, origRetryCount, origRetries + 1, sendPduHandle ) return # 3.3.6c self._handleResponse(origSendRequestHandle, None, cbFun, cbCtx) def _handleResponse( self, sendRequestHandle, errorIndication, cbFun, cbCtx): cbFun(sendRequestHandle, errorIndication, cbCtx) def sendNotification( self, snmpEngine, notificationTarget, notificationName, additionalVarBinds=None, cbFun=None, cbCtx=None, contextName='' ): # 3.3 ( notifyTag, notifyType ) = config.getNotificationInfo( snmpEngine, notificationTarget ) debug.logger & debug.flagApp and debug.logger('sendNoification: notifyTag %s notifyType %s' % (notifyTag, notifyType)) contextMibInstrumCtl = self.__context.getMibInstrum( contextName ) for targetAddrName in config.getTargetNames(snmpEngine, notifyTag): ( transportDomain, transportAddress, timeout, retryCount, params ) = config.getTargetAddr(snmpEngine, targetAddrName) ( messageProcessingModel, securityModel, securityName, securityLevel ) = config.getTargetParams(snmpEngine, params) # 3.3.1 XXX # XXX filtering's yet to be implemented # filterProfileName = config.getNotifyFilterProfile(params) # ( filterSubtree, # filterMask, # filterType ) = config.getNotifyFilter(filterProfileName) varBinds = [] # 3.3.2 & 3.3.3 sysUpTime, = contextMibInstrumCtl.mibBuilder.importSymbols( '__SNMPv2-MIB', 'sysUpTime' ) varBinds.append( (sysUpTime.name, sysUpTime.syntax.clone()) # for actual value ) snmpTrapOid, = contextMibInstrumCtl.mibBuilder.importSymbols( '__SNMPv2-MIB', 'snmpTrapOID' ) if notificationName: varBinds.append( (snmpTrapOid.name, snmpTrapOid.syntax.clone(notificationName)) ) else: varBinds.append((snmpTrapOid.name, snmpTrapOid.syntax)) # XXX it's still not clear how to instantiate OBJECTS clause # # Get notification objects names # for notificationObject in snmpTrapVal.getObjects(): # mibNode, = apply( # contextMibInstrumCtl.mibBuilder.importSymbols, # notificationObject # ) # try: # objectInstance = mibNode.getNode(mibNode.name + (0,)) # except error.SmiError: # return # varBinds.append((objectInstance.name, objectInstance.syntax)) if additionalVarBinds: if version_info < (1, 6): additionalVarBinds = list(additionalVarBinds) varBinds.extend(additionalVarBinds) for varName, varVal in varBinds: try: snmpEngine.accessControlModel[vacmID].isAccessAllowed( snmpEngine, securityModel, securityName, securityLevel, 'notify', contextName, varName ) except error.SmiError: return # 3.3.4 if notifyType == 1: pdu = v2c.SNMPv2TrapPDU() elif notifyType == 2: pdu = v2c.InformRequestPDU() else: raise RuntimeError() v2c.apiPDU.setDefaults(pdu) v2c.apiPDU.setVarBinds(pdu, varBinds) # User-side API assumes SMIv2 if messageProcessingModel == 0: pdu = rfc2576.v2ToV1(pdu) pduVersion = 0 else: pduVersion = 1 # 3.3.5 if notifyType == 1: snmpEngine.msgAndPduDsp.sendPdu( snmpEngine, transportDomain, transportAddress, messageProcessingModel, securityModel, securityName, securityLevel, self.__context.contextEngineId, contextName, pduVersion, pdu, None ) else: # 3.3.6a sendPduHandle = snmpEngine.msgAndPduDsp.sendPdu( snmpEngine, transportDomain, transportAddress, messageProcessingModel, securityModel, securityName, securityLevel, self.__context.contextEngineId, contextName, pduVersion, pdu, (self.processResponsePdu, float(timeout)/100 + time.time(), (cbFun, cbCtx)) ) debug.logger & debug.flagApp and debug.logger('sendNoification: sendPduHandle %s, timeout %d' % (sendPduHandle, timeout)) # 3.3.6b self.__pendingReqs[sendPduHandle] = ( transportDomain, transportAddress, messageProcessingModel, securityModel, securityName, securityLevel, self.__context.contextEngineId, contextName, pduVersion, pdu, timeout, retryCount, 1, getNextHandle() ) snmpEngine.transportDispatcher.jobStarted(id(self)) return sendPduHandle # XXX # move/group/implement config setting/retrieval at a stand-alone module PKC 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) 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 ) PKQj2!pysnmp/entity/rfc3413/__init__.pyPK$5 9S 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=T pysnmp/entity/rfc3413/ntfrcv.pyc; &=Lc@sWdklZlZdklZlZdklZdkl Z dfdYZ dS((srfc3411serror(sv1sv2c(srfc2576(sdebugsNotificationReceivercBsGtZeiieiieiifZe dZ dZ dZ RS(NcCs;|iid|i|id|_||_||_ 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|idS(Ns(s snmpEngines msgAndPduDspsunregisterContextEngineIdsselfspduTypes(sselfs snmpEngine((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/ntfrcv.pysclosesc  Cs|djoti| } nd}d} tii| }t i t i @ot i d| |ftii| ioItii| }tii||tii|| tii||t i t i @ot i d| |if|djoti|}nh} y5|ii|||||||||| | | Wqt$i%j o_}t i t i @ot i d| |f|ii'i(i)dd\}|i+d|_+qXn1ti,i| iont$i-d | it i t i @o#t i d | |i/|i0|f|i1o#|i/|| ||||i0n_y |i/|||||i0Wn;t2j o/d|_1|i/|| ||||i0nXdS( 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(3smessageProcessingModelsrfc2576sv1ToV2sPDUs 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 errorIndexsstatusInformations errorStatussvarBindsssnmpSilentDropsswhysrspPDU((s:build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/ntfrcv.pys processPdusZ  (.   (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=kI !pysnmp/entity/rfc3413/context.pyc; "%Lc@s1dklZdklZdfdYZdS((serror(sdebugs SnmpContextcBs2tZedZedZdZdZRS(NcCs|tjo+|iiiidd\}|i}n||_t i t i @ot i dt |hd|ii<|_ dS(Ns__SNMP-FRAMEWORK-MIBs snmpEngineIDs!SnmpContext: contextEngineId "%s"s(scontextEngineIdsNones snmpEngines msgAndPduDspsmibInstrumControllers mibBuilders importSymbolsssyntaxsselfsdebugsloggersflagInssreprs contextNames(sselfs snmpEnginescontextEngineId((s;build/bdist.linux-i686/egg/pysnmp/entity/rfc3413/context.pys__init__s    (cCs|ii|otid|ntiti@otid||f|t jo|id|i|, %s)(sselfs __class__s__name__s securityNamesmpModel(sself((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys__repr__"scCs |iSdS(N(sselfs_CommunityData__hash(sself((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys__hash__(scCst|i|SdS(N(scmpsselfs_CommunityData__cmpsother(sselfsother((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys__cmp__)s( s__name__s __module__smpModels securityModels securityLevelsNones__init__s__repr__s__hash__s__cmp__(((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys CommunityDatas   s UsmUserDatacBs`tZeZZeZeZdZ dZ dZ eeeedZ dZ dZdZRS(Ns noAuthNoPriviicCs||_|tj oM||_|tjo t|_n ||_|idjo d|_qcn|tj o\||_|itjot i dnd|_|tjo t |_ q||_ n|i |i|i|i|i|i|i |if|_t|i|_dS(NsauthPrivs authNoPrivsPrivacy implies authenticity(s securityNamesselfsauthKeysNones authProtocolsusmHMACMD5AuthProtocols securityLevelsprivKeysusmNoAuthProtocolserrors PySnmpErrors privProtocolsusmDESPrivProtocolsmpModels securityModels_UsmUserData__cmpshashs_UsmUserData__hash(sselfs securityNamesauthKeysprivKeys authProtocols privProtocol((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys__init__2s$            9cCs'd|ii|i|i|ifSdS(Ns&%s("%s", , , %s, %s)(sselfs __class__s__name__s securityNames authProtocols privProtocol(sself((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys__repr__MscCs |iSdS(N(sselfs_UsmUserData__hash(sself((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys__hash__TscCst|i|SdS(N(scmpsselfs_UsmUserData__cmpsother(sselfsother((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys__cmp__Us(s__name__s __module__sNonesauthKeysprivKeysusmNoAuthProtocols authProtocolsusmNoPrivProtocols privProtocols securityLevels securityModelsmpModels__init__s__repr__s__hash__s__cmp__(((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys UsmUserData+s   sUdpTransportTargetcBsDtZeiZdddZdZdZdZdZ RS(NiicCs6ti|d|df|_||_||_dS(Nii(ssockets gethostbynames transportAddrsselfstimeoutsretries(sselfs transportAddrstimeoutsretries((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys__init__Ys  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__`scCst|iSdS(N(shashsselfs transportAddr(sself((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys__hash__fscCst|i|SdS(N(scmpsselfs transportAddrsother(sselfsother((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys__cmp__gscCs tii|_|iSdS(N(sudpsUdpSocketTransportsopenClientModesselfs transport(sself((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pysopenClientModeis( s__name__s __module__sudps domainNamestransportDomains__init__s__repr__s__hash__s__cmp__sopenClientMode(((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pysUdpTransportTargetWs     sAsynCommandGeneratorcBsetZeidZedZdZddZdZ dZ dZ dZ 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__os     cCs|idS(N(sselfs uncfgCmdGen(sself((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys__del__{sc Cst|tod||if}n|ii|o|i|}ndt }t|toKt i |i |i|i d|t i|i ||i|i|inqt|toQt i|i |i|i|i|i|it i|i ||i|intid||i|<|ii|i o9|i}t i|i |i|||i|ix|iiD]\}}t|to-ti|i |i ti |i |qt|t o-ti |i |i ti |i |qtidqW|iix:|iiD])\}}ti|i ||iqW|iix*|iiD]}ti|i |qW|iidS(NsUnsupported SNMP version(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 uncfgCmdGens(      c Cs|\}}|i||\}} g} xC|D];} t i |i | \}} | i|| |ifq1Wtii|i|| ||SdS(N(scbFunscbCtxsselfs cfgCmdGensauthDatastransportTargetsaddrNames paramsNamesvarBindssvarNamessvarNamesmibvars mibNameToOidsmibViewControllersnamesoidsappends_nullscmdgensGetCommandGeneratorssendReqs snmpEngine( sselfsauthDatastransportTargetsvarNamess.8scbFunscbCtxsaddrNamesnamesvarBindssvarNames paramsNamesoid((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys asyncGetCmds cCs-|\}}|i||\} } g}x|D]\}} t i |i|\}}t| tij o}t i|i||\\}} }t i|i| || } | tjotidt|n| i| } n|i||| fq1Wt i!i"|i#| |||SdS(Ns#Value type MIB lookup failed for %s($scbFunscbCtxsselfs cfgCmdGensauthDatastransportTargetsaddrNames paramsNames_AsynCommandGenerator__varBindssvarBindssvarNamesvarValsmibvars mibNameToOidsmibViewControllersnamesoidstypestypess InstanceTypes oidToMibNamessymNamesmodNamessuffixscloneFromMibValuessyntaxsNoneserrors PySnmpErrorsreprsclonesappendscmdgensSetCommandGeneratorssendReqs snmpEngine(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|| |ifq1Wtii|i|| ||SdS(N(scbFunscbCtxsselfs cfgCmdGensauthDatastransportTargetsaddrNames paramsNamesvarBindssvarNamessvarNamesmibvars mibNameToOidsmibViewControllersnamesoidsappends_nullscmdgensNextCommandGeneratorssendReqs snmpEngine( sselfsauthDatastransportTargetsvarNamess.8scbFunscbCtxsaddrNamesnamesvarBindssvarNames paramsNamesoid((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys asyncNextCmd s cCs|\}}|i||\} } g} xC|D];} t i |i | \} }| i| ||ifq1Wtii|i| ||| ||SdS(N(scbFunscbCtxsselfs cfgCmdGensauthDatastransportTargetsaddrNames paramsNamesvarBindssvarNamessvarNamesmibvars mibNameToOidsmibViewControllersnamesoidsappends_nullscmdgensBulkCommandGeneratorssendReqs snmpEngines nonRepeaterssmaxRepetitions(sselfsauthDatastransportTargets nonRepeaterssmaxRepetitionssvarNamess.12scbFunscbCtxsvarBindssnamesvarNames paramsNamesaddrNamesoid((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pys asyncBulkCmds (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.pysAsynCommandGeneratorms  = $   sCommandGeneratorcBs,tZdZdZdZdZRS(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.pysnextCmdYs !!c Gsd}tdt|d|}h}|i|||||||g|ff|i i i |d|d|d|dfSdS(Nc Cs|\}}}|p|o0||d<||d<||d<||dscCsti|i|S(N(smibvars mibNameToOidsselfsmibViewControllersx(sxsself((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pyssserrorIndications 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.pysbulkCmds !(s__name__s __module__sgetCmdssetCmdsnextCmdsbulkCmd(((sCbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/cmdgen.pysCommandGenerator,s   3(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$         ,PKQs, %s)' % ( self.__class__.__name__, self.securityName, self.mpModel ) 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 def __init__(self, securityName, authKey=None, privKey=None, authProtocol=None, privProtocol=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.__cmp = self.mpModel, self.securityModel, self.securityLevel, self.securityName, self.authProtocol, self.authKey, self.privProtocol, self.privKey self.__hash = hash(self.__cmp) def __repr__(self): return '%s("%s", , , %s, %s)' % ( self.__class__.__name__, self.securityName, self.authProtocol, self.privProtocol ) 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, transportTag=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 ) config.addTargetParams( self.snmpEngine, paramsName, authData.securityName, authData.securityLevel ) else: raise error.PySnmpError('Unsupported SNMP version') 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 SNMP version') 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 ) 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 ) 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 ) 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 ) class CommandGenerator(AsynCommandGenerator): 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, (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 val is not None and 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): univ.ObjectIdentifier(x+y), map(lambda x,self=self: mibvar.mibNameToOid(self.mibViewController, x), varNames)) appReturn = {} self.asyncNextCmd( authData, transportTarget, varNames, (__cbFun, (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, (varBindHead, varBindTotalTable, appReturn) ): if errorIndication or errorStatus: appReturn['errorIndication'] = errorIndication appReturn['errorStatus'] = errorStatus appReturn['errorIndex'] = errorIndex appReturn['varBindTable'] = varBindTable return else: varBindTotalTable.extend(varBindTable) # XXX out of table # rows possible varBindTableRow = varBindTable[-1] for idx in range(len(varBindTableRow)): name, val = varBindTableRow[idx] if val is not None and 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): univ.ObjectIdentifier(x+y), map(lambda x,self=self: mibvar.mibNameToOid(self.mibViewController, x), varNames)) appReturn = {} self.asyncBulkCmd( authData, transportTarget, nonRepeaters, maxRepetitions, varNames, (__cbFun, (varBindHead, [], appReturn)) ) self.snmpEngine.transportDispatcher.runDispatcher() return ( appReturn['errorIndication'], appReturn['errorStatus'], appReturn['errorIndex'], appReturn['varBindTable'] ) PK=,iVW+pysnmp/entity/rfc3413/oneliner/__init__.pyc; MBc@sdS(N((((sEbuild/bdist.linux-i686/egg/pysnmp/entity/rfc3413/oneliner/__init__.pys?sPK=9AA)pysnmp/entity/rfc3413/oneliner/ntforg.pyc; 4Lc@sdkZdkZdklZdklZlZlZdkl Z e i Z e i Z e i Z e i Z e iZe iZe iZe iZe iZde ifdYZdefdYZdS(N(sconfig(sntforgscontextsmibvar(scmdgensAsynNotificationOriginatorcBsGtZeedZdZdZdZeeefdZRS(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|idS(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||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.0cCstiddS(NsMethod not implemented(serrors CarrierError(sselfstimeout((s1build/bdist.linux-i686/egg/pysnmp/carrier/base.pys runDispatchernscCsPx5|iiD]$}|i|i|i|qW|i|idS(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 PKSn2pysnmp/carrier/__init__.pyPKo2ʴFFpysnmp/carrier/error.pyfrom pysnmp import error class CarrierError(error.PySnmpError): pass PK==$pysnmp/carrier/asynsock/dispatch.pyc; Kc@sydklZWnej oddfZnXdklZdklZdklZdklZeddfjo dZ 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 qXqWdS(NcCs |iS(N(sxsreadable(sx((s>build/bdist.linux-i686/egg/pysnmp/carrier/asynsock/dispatch.pysscCs |iS(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$ (spollsAsynsockDispatchercBsStZdZdZdZedZdZdZdZ ddZ 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|idS(N(sAbstractTransportDispatchersregisterTransportsselfstDomainstsregisterSockets_AsynsockDispatcher__sockMap(sselfstDomainst((s>build/bdist.linux-i686/egg/pysnmp/carrier/asynsock/dispatch.pysregisterTransport,scCs-|i|i|iti||dS(N(sselfs getTransportstDomainsunregisterSockets_AsynsockDispatcher__sockMapsAbstractTransportDispatchersunregisterTransport(sselfstDomain((s>build/bdist.linux-i686/egg/pysnmp/carrier/asynsock/dispatch.pysunregisterTransport0scCs7x,|iiD]}|iodSqqWdSdS(Nii(sselfs_AsynsockDispatcher__sockMapsvaluess transportswritable(sselfs transport((s>build/bdist.linux-i686/egg/pysnmp/carrier/asynsock/dispatch.pystransportsAreWorking4s   f0.0cCsWxP|ip |io5t|o|p|i|i|itqWdS(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      PK7Abuild/bdist.linux-i686/egg/pysnmp/carrier/asynsock/__init__.pys?sPK=#<< pysnmp/carrier/asynsock/base.pyc; 5gKc@s~dZydklZWnej oddfZnXdkZdkZdkZdklZdeifdYZ dS(s0Defines standard API to asyncore-based transport(s version_infoiN(serrorsAbstractSocketTransportcBstZeZZdZdZeedZeddfjoedZ edZ nedZ edZ edZ ed Zd Zd Zd Zd ZdZdZRS(NicCs,|tjo|itjotid|iin|itjotid|iinyt i |i|i}Wqt ij o}tid|qXn|tjo h}nt ddfjo3||_ |i ||i idd|_ntii|||dS(NsAddress family %s not supportedsSocket type %s not supportedssocket() failed: %siii(ssocksNonesselfs sockFamilyserrors CarrierErrors __class__s__name__ssockTypessocketswhyssockMaps version_infos add_channels setblockings connectedsasyncores dispatchers__init__(sselfssockssockMapswhy((s:build/bdist.linux-i686/egg/pysnmp/carrier/asynsock/base.pys__init__ s"      icCs(|tjo ti}n|||>%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=nH,&pysnmp/carrier/asynsock/dgram/base.pyc; LKc@sdZdkZdkZdklZdklZdklZhei d<ei d<ei d<ei d<ei d<eidtZdZdZdZddZdZdZRS(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|itdS(N(sselfshandleTimerTickstime(sself((s=build/bdist.linux-i686/egg/pysnmp/carrier/twisted/dispatch.pys handleTimeoutsf0.0cCsHti o9ytiWqDtj 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|idtnti||||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: Dpysnmp/carrier/twisted/base.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: 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=s#pysnmp/carrier/twisted/__init__.pyc; LsJc@sdS(N((((s=build/bdist.linux-i686/egg/pysnmp/carrier/twisted/__init__.pys?sPK=hhpysnmp/carrier/twisted/base.pyc; LsJc@sdfdYZdS(sAbstractTwistedTransportcBs2tZdZdZdZdZdZRS(s9Base Twisted Transport, to be used with TwistedDispatchercCs g|_dS(N(sselfs_writeQ(sself((s9build/bdist.linux-i686/egg/pysnmp/carrier/twisted/base.pys__init__scCs ||_dS(N(scbFunsselfs_cbFun(sselfscbFun((s9build/bdist.linux-i686/egg/pysnmp/carrier/twisted/base.pys registerCbFunscCs t|_dS(N(sNonesselfs_cbFun(sself((s9build/bdist.linux-i686/egg/pysnmp/carrier/twisted/base.pysunregisterCbFunscCs|idS(N(sselfsunregisterCbFun(sself((s9build/bdist.linux-i686/egg/pysnmp/carrier/twisted/base.pyscloseTransports(s__name__s __module__s__doc__s__init__s registerCbFunsunregisterCbFunscloseTransport(((s9build/bdist.linux-i686/egg/pysnmp/carrier/twisted/base.pysAbstractTwistedTransport s    N(sAbstractTwistedTransport(sAbstractTwistedTransport((s9build/bdist.linux-i686/egg/pysnmp/carrier/twisted/base.pys? sPK:"pysnmp/carrier/twisted/__init__.pyPK=$pysnmp/carrier/twisted/dgram/udp.pyc; LsJc@sldZdklZdklZdklZdddddddfZZdefdYZ e Z d S( s&Implements twisted-based UDP transport(sreactor(sDgramTwistedTransport(serroriiisUdpTwistedTransportcBs tZddZedZRS(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: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: 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=Aٓ)pysnmp/carrier/twisted/dgram/__init__.pyc; LsJc@sdS(N((((sCbuild/bdist.linux-i686/egg/pysnmp/carrier/twisted/dgram/__init__.pys?sPK: ;;$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=k %pysnmp/carrier/twisted/dgram/base.pyc; LsJc@sqdZdklZdklZdklZdklZdkl Z dk l Z deefdYZ d S( s0Implements twisted-based generic DGRAM transport(stime(sDatagramProtocol(sreactor(sAbstractTwistedTransport(serror(sdebugsDgramTwistedTransportcBs2tZdZdZdZdZdZRS(sBBase Twisted datagram Transport, to be used with TwistedDispatchercCsC|itjotidntid|i|||dS(NsUnable to call cbFuni( sselfs_cbFunsNoneserrors CarrierErrorsreactors callLatersaddresssdatagram(sselfsdatagramsaddress((s?build/bdist.linux-i686/egg/pysnmp/carrier/twisted/dgram/base.pysdatagramReceivedscCstiti@o tidx|io|iid\}}titi@otid|t|fy|i i ||Wq!t j o}t id|fq!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|idS(NsstopProtocol: invoked(sdebugsloggersflagIOsselfscloseTransport(sself((s?build/bdist.linux-i686/egg/pysnmp/carrier/twisted/dgram/base.pys stopProtocol scCstiti@o7tid|itjodpd|t|f|itjo|i i ||fnFy|ii ||Wn+t j o}tid|fnXdS(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=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 tZddZedZRS(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    %PK:(pysnmp/carrier/twisted/dgram/__init__.pyPK= M?:::EGG-INFO/SOURCES.txtPK=GlEGG-INFO/top_level.txtPK=KRvEGG-INFO/PKG-INFOPK=2EGG-INFO/not-zip-safePK=2EGG-INFO/dependency_links.txtPK=>XX*EGG-INFO/scripts/libsmi2pysnmpPK-m<@U!nEGG-INFO/scripts/build-pysnmp-mibPKz:qݚvpysnmp/nextid.pyPK=7e zpysnmp/debug.pycPK=H~Яfpysnmp/__init__.pycPK0k>Xpysnmp/proto/rfc3412.pycPK=qepysnmp/proto/rfc1905.pycPK=sD.D."pysnmp/proto/rfc1902.pycPK= 2QQqQpysnmp/proto/__init__.pycPKy78rRpysnmp/proto/rfc3411.pyPKd<>JJXpysnmp/proto/rfc3412.pyPK=:'k apysnmp/proto/error.pycPK2DK pysnmp/proto/rfc1157.pyPK=KFdCpysnmp/proto/rfc1155.pycPK.3`6;'pysnmp/proto/rfc1905.pyPK=c"?-pysnmp/proto/rfc1157.pycPKl1LEpysnmp/proto/__init__.pyPKr)>XQ{pysnmp/proto/mpmod/base.pyPK=ppysnmp/proto/mpmod/__init__.pycPKz<hrhrǒpysnmp/proto/mpmod/rfc3412.pyPK={{jpysnmp/proto/mpmod/base.pycPKau2$pysnmp/proto/mpmod/__init__.pyPK<Џ99Z$pysnmp/proto/mpmod/rfc2576.pyPK="Rv#v#a^pysnmp/proto/api/v2c.pycPKEw;,T pysnmp/proto/api/v1.pyPK=spysnmp/proto/api/__init__.pycPKu2^ո<pysnmp/proto/api/verdec.pyPK=D;0:0:Ipysnmp/proto/api/v1.pycPK= EEpysnmp/proto/api/verdec.pycPKr;C!X,pysnmp/proto/api/v2c.pyPKu2ΩFpysnmp/proto/api/__init__.pyPK=W##pysnmp/proto/secmod/rfc2576.pycPKF4544pysnmp/proto/secmod/base.pyPK=$Ev pysnmp/proto/secmod/__init__.pycPK=څn N pysnmp/proto/secmod/base.pycPKl12.pysnmp/proto/secmod/__init__.pyPK:E<-yж,,o.pysnmp/proto/secmod/rfc2576.pyPK=OOT(a[pysnmp/proto/secmod/rfc3826/__init__.pycPK6'9\pysnmp/proto/secmod/rfc3826/__init__.pyPK=X-~\pysnmp/proto/secmod/rfc3826/priv/__init__.pycPK=m::(`]pysnmp/proto/secmod/rfc3826/priv/aes.pycPKM-!pysnmp/proto/secmod/rfc3414/priv/__init__.pycPK=+)pysnmp/proto/secmod/rfc3414/priv/base.pycPK\v2,pysnmp/proto/secmod/rfc3414/priv/__init__.pyPK=%v0pysnmp/proto/proxy/rfc2576.pycPK=dxɉ:pysnmp/proto/proxy/__init__.pycPKo2pysnmp/proto/proxy/__init__.pyPK>%pysnmp/carrier/asynsock/dgram/unix.pyPK=nH,&opysnmp/carrier/asynsock/dgram/base.pycPK= iJJ&pysnmp/carrier/asynsock/dgram/unix.pycPKl1)pysnmp/carrier/asynsock/dgram/__init__.pyPK-< ii%Zpysnmp/carrier/asynsock/dgram/udp6.pyPK=e'' #pysnmp/carrier/twisted/dispatch.pycPK: Dpysnmp/carrier/twisted/base.pyPK:ž"+pysnmp/carrier/twisted/dispatch.pyPK=s#Rpysnmp/carrier/twisted/__init__.pycPK=hh pysnmp/carrier/twisted/base.pycPK:"Žpysnmp/carrier/twisted/__init__.pyPK=$pysnmp/carrier/twisted/dgram/udp.pycPK:E#pysnmp/carrier/twisted/dgram/udp.pyPK: VV$jpysnmp/carrier/twisted/dgram/base.pyPK=Aٓ)pysnmp/carrier/twisted/dgram/__init__.pycPK: ;;$pysnmp/carrier/twisted/dgram/unix.pyPK=k %Ypysnmp/carrier/twisted/dgram/base.pycPK=x%pysnmp/carrier/twisted/dgram/unix.pycPK:(pysnmp/carrier/twisted/dgram/__init__.pyPKF