# Path: pysnmp/proto/api/v1.py
# class VarBindAPI:
# class PDUAPI:
# class TrapPDUAPI:
# class MessageAPI:
#     def setOIDVal(self, varBind, oidVal):
#     def getOIDVal(self, varBind):
#     def setDefaults(self, pdu):
#     def getRequestID(self, pdu): return pdu.getComponentByPosition(0)
#     def setRequestID(self, pdu, value): pdu.setComponentByPosition(0, value)
#     def getErrorStatus(self, pdu): return pdu.getComponentByPosition(1)
#     def setErrorStatus(self, pdu, value): pdu.setComponentByPosition(1, value)
#     def getErrorIndex(self, pdu):
#     def setErrorIndex(self, pdu, value):
#     def setEndOfMibError(self, pdu, errorIndex):
#     def setNoSuchInstanceError(self, pdu, errorIndex):
#     def getVarBindList(self, pdu):
#     def setVarBindList(self, pdu, varBindList):
#     def getVarBinds(self, pdu):
#     def setVarBinds(self, pdu, varBinds):
#     def getResponse(self, reqPDU):
#     def getVarBindTable(self, reqPDU, rspPDU):
#     def setDefaults(self, pdu):
#     def getEnterprise(self, pdu): return pdu.getComponentByPosition(0)
#     def setEnterprise(self, pdu, value): pdu.setComponentByPosition(0, value)
#     def getAgentAddr(self, pdu):
#     def setAgentAddr(self, pdu, 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):
#     def setVarBindList(self, pdu, varBindList):
#     def getVarBinds(self, pdu):
#     def setVarBinds(self, pdu, varBinds):
#     def setDefaults(self, 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):
#     def getResponse(self, reqMsg):
# 
# Path: pysnmp/proto/api/v2c.py
# class PDUAPI(v1.PDUAPI):
# class BulkPDUAPI(PDUAPI):
# class TrapPDUAPI(v1.PDUAPI):
# class MessageAPI(v1.MessageAPI):
#     def getResponse(self, reqPDU):
#     def getVarBindTable(self, reqPDU, rspPDU):
#     def setEndOfMibError(self, pdu, errorIndex):
#     def setNoSuchInstanceError(self, pdu, errorIndex):
#     def setDefaults(self, pdu):
#     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):
#     def setDefaults(self, pdu):
#     def setDefaults(self, msg):
#     def getResponse(self, reqMsg):
#         N = min(int(nonRepeaters), len(reqVarBinds))
#         M = int(maxRepetitions)
#         R = max(len(reqVarBinds)-N, 0)
# 
# Path: pysnmp/proto/proxy/rfc2576.py
# def v1ToV2(v1Pdu, origV2Pdu=None):
# def v2ToV1(v2Pdu, origV1Pdu=None):
# 
# Path: pysnmp/debug.py
# class Debug:
#     def __init__(self, *flags):
#     def __str__(self):
#     def __call__(self, msg):
#     def __and__(self, flag):
#     def __rand__(self, flag):
# def setLogger(l):
# def hexdump(octets):


from pyasn1.compat.octets import null
from pysnmp.proto import rfc3411, error
from pysnmp.proto.api import v1, v2c  # backend is always SMIv2 compliant
from pysnmp.proto.proxy import rfc2576
from pysnmp import debug
    def close(self, snmpEngine):
        snmpEngine.msgAndPduDsp.unregisterContextEngineId(
            null, self.pduTypes
            )

    def processPdu(
        self,
        snmpEngine,
        messageProcessingModel,
        securityModel,
        securityName,
        securityLevel,
        contextEngineId,
        contextName,
        pduVersion,
        PDU,
        maxSizeResponseScopedPDU,
        stateReference
        ):

        # Agent-side API complies with SMIv2
        if messageProcessingModel == 0:
            origPdu = PDU
            PDU = rfc2576.v1ToV2(PDU)
        else:
            origPdu = None

        errorStatus = 'noError'; errorIndex = 0
        varBinds = v2c.apiPDU.getVarBinds(PDU)


# Path: pysnmp/proto/api/v1.py
# class VarBindAPI:
# class PDUAPI:
# class TrapPDUAPI:
# class MessageAPI:
#     def setOIDVal(self, varBind, oidVal):
#     def getOIDVal(self, varBind):
#     def setDefaults(self, pdu):
#     def getRequestID(self, pdu): return pdu.getComponentByPosition(0)
#     def setRequestID(self, pdu, value): pdu.setComponentByPosition(0, value)
#     def getErrorStatus(self, pdu): return pdu.getComponentByPosition(1)
#     def setErrorStatus(self, pdu, value): pdu.setComponentByPosition(1, value)
#     def getErrorIndex(self, pdu):
#     def setErrorIndex(self, pdu, value):
#     def setEndOfMibError(self, pdu, errorIndex):
#     def setNoSuchInstanceError(self, pdu, errorIndex):
#     def getVarBindList(self, pdu):
#     def setVarBindList(self, pdu, varBindList):
#     def getVarBinds(self, pdu):
#     def setVarBinds(self, pdu, varBinds):
#     def getResponse(self, reqPDU):
#     def getVarBindTable(self, reqPDU, rspPDU):
#     def setDefaults(self, pdu):
#     def getEnterprise(self, pdu): return pdu.getComponentByPosition(0)
#     def setEnterprise(self, pdu, value): pdu.setComponentByPosition(0, value)
#     def getAgentAddr(self, pdu):
#     def setAgentAddr(self, pdu, 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):
#     def setVarBindList(self, pdu, varBindList):
#     def getVarBinds(self, pdu):
#     def setVarBinds(self, pdu, varBinds):
#     def setDefaults(self, 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):
#     def getResponse(self, reqMsg):
# 
# Path: pysnmp/proto/api/v2c.py
# class PDUAPI(v1.PDUAPI):
# class BulkPDUAPI(PDUAPI):
# class TrapPDUAPI(v1.PDUAPI):
# class MessageAPI(v1.MessageAPI):
#     def getResponse(self, reqPDU):
#     def getVarBindTable(self, reqPDU, rspPDU):
#     def setEndOfMibError(self, pdu, errorIndex):
#     def setNoSuchInstanceError(self, pdu, errorIndex):
#     def setDefaults(self, pdu):
#     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):
#     def setDefaults(self, pdu):
#     def setDefaults(self, msg):
#     def getResponse(self, reqMsg):
#         N = min(int(nonRepeaters), len(reqVarBinds))
#         M = int(maxRepetitions)
#         R = max(len(reqVarBinds)-N, 0)
# 
# Path: pysnmp/proto/proxy/rfc2576.py
# def v1ToV2(v1Pdu, origV2Pdu=None):
# def v2ToV1(v2Pdu, origV1Pdu=None):
# 
# Path: pysnmp/debug.py
# class Debug:
#     def __init__(self, *flags):
#     def __str__(self):
#     def __call__(self, msg):
#     def __and__(self, flag):
#     def __rand__(self, flag):
# def setLogger(l):
# def hexdump(octets):


# Path: pysnmp/entity/rfc3413/ntfrcv.py
from pyasn1.compat.octets import null
from pysnmp.proto import rfc3411, error
from pysnmp.proto.api import v1, v2c  # backend is always SMIv2 compliant
from pysnmp.proto.proxy import rfc2576
from pysnmp import debug

    def close(self, snmpEngine):
        snmpEngine.msgAndPduDsp.unregisterContextEngineId(
            null, self.pduTypes
            )

    def processPdu(
        self,
        snmpEngine,
        messageProcessingModel,
        securityModel,
        securityName,
        securityLevel,
        contextEngineId,
        contextName,
        pduVersion,
        PDU,
        maxSizeResponseScopedPDU,
        stateReference
        ):

        # Agent-side API complies with SMIv2
        if messageProcessingModel == 0:
            origPdu = PDU
            PDU = rfc2576.v1ToV2(PDU)
        else:
            origPdu = None

        errorStatus = 'noError'; errorIndex = 0
        varBinds = v2c.apiPDU.getVarBinds(PDU)


        debug.logger & debug.flagApp and debug.logger('processPdu: stateReference %s, varBinds %s' % (stateReference, varBinds))