# Path: pysnmp/entity/rfc3413/cmdgen.py
# def getVersionSpecifics(snmpVersion):
# def getNextVarBinds(origVarBinds, varBinds):
#     def __init__(self):
#     def processResponsePdu(
#         self,
#         snmpEngine,
#         messageProcessingModel,
#         securityModel,
#         securityName,
#         securityLevel,
#         contextEngineId,
#         contextName,
#         pduVersion,
#         PDU,
#         statusInformation,
#         sendPduHandle,
#         cbInfo
#         ):
#     def sendReq(
#         self,
#         snmpEngine,
#         addrName,
#         varBinds,
#         cbFun,
#         cbCtx=None,
#         contextEngineId=None,
#         contextName=''
#         ):
#     def _sendPdu(
#         self,
#         snmpEngine,
#         transportDomain,
#         transportAddress,
#         messageProcessingModel,
#         securityModel,
#         securityName,
#         securityLevel,
#         contextEngineId,
#         contextName,
#         pduVersion,
#         reqPDU,
#         timeout,
#         retryCount,
#         retries,
#         sendRequestHandle,
#         cbInfo
#         ):
#     def _handleResponse(
#         self,
#         snmpEngine,
#         transportDomain,
#         transportAddress,
#         messageProcessingModel,
#         securityModel,
#         securityName,
#         securityLevel,
#         contextEngineId,
#         contextName,
#         pduVersion,
#         PDU,
#         timeout,
#         retryCount,
#         pMod,
#         rspPDU,
#         sendRequestHandle,
#         cbInfo
#         ):
#     def sendReq(
#         self,
#         snmpEngine,
#         addrName,
#         varBinds,
#         cbFun,
#         cbCtx=None,
#         contextEngineId=None,
#         contextName=''
#         ):
#     def sendReq(
#         self,
#         snmpEngine,
#         addrName,
#         varBinds,
#         cbFun,
#         cbCtx=None,
#         contextEngineId=None,
#         contextName=''
#         ):
#     def sendReq(
#         self,
#         snmpEngine,
#         addrName,
#         varBinds,
#         cbFun,
#         cbCtx=None,
#         contextEngineId=None,
#         contextName=''
#         ):
#     def _handleResponse(
#         self,
#         snmpEngine,
#         transportDomain,
#         transportAddress,
#         messageProcessingModel,
#         securityModel,
#         securityName,
#         securityLevel,
#         contextEngineId,
#         contextName,
#         pduVersion,
#         PDU,
#         timeout,
#         retryCount,
#         pMod,
#         rspPDU,
#         sendRequestHandle,
#         cbInfo
#         ):
#     def sendReq(
#         self,
#         snmpEngine,
#         addrName,
#         nonRepeaters,
#         maxRepetitions,
#         varBinds,
#         cbFun,
#         cbCtx=None,
#         contextEngineId=None,
#         contextName=''
#         ):
#     def _handleResponse(
#         self,
#         snmpEngine,
#         transportDomain,
#         transportAddress,
#         messageProcessingModel,
#         securityModel,
#         securityName,
#         securityLevel,
#         contextEngineId,
#         contextName,
#         pduVersion,
#         PDU,
#         timeout,
#         retryCount,
#         pMod,
#         rspPDU,
#         sendRequestHandle,
#         cbInfo
#         ):
# class CommandGeneratorBase:
# class GetCommandGenerator(CommandGeneratorBase):
# class SetCommandGenerator(CommandGeneratorBase):
# class NextCommandGeneratorSingleRun(CommandGeneratorBase):
# class NextCommandGenerator(NextCommandGeneratorSingleRun):
# class BulkCommandGeneratorSingleRun(CommandGeneratorBase):
# class BulkCommandGenerator(BulkCommandGeneratorSingleRun):
#             PDU = rfc2576.v1ToV2(PDU, origPdu)


from twisted.internet import defer
from pysnmp.entity.rfc3413 import cmdgen
from pyasn1.compat.octets import null

def _cbFun(sendRequestHandle, errorIndication,
           errorStatus, errorIndex, varBinds, cbCtx):
    cbCtx.callback((errorIndication, errorStatus, errorIndex, varBinds))


# Path: pysnmp/entity/rfc3413/cmdgen.py
# def getVersionSpecifics(snmpVersion):
# def getNextVarBinds(origVarBinds, varBinds):
#     def __init__(self):
#     def processResponsePdu(
#         self,
#         snmpEngine,
#         messageProcessingModel,
#         securityModel,
#         securityName,
#         securityLevel,
#         contextEngineId,
#         contextName,
#         pduVersion,
#         PDU,
#         statusInformation,
#         sendPduHandle,
#         cbInfo
#         ):
#     def sendReq(
#         self,
#         snmpEngine,
#         addrName,
#         varBinds,
#         cbFun,
#         cbCtx=None,
#         contextEngineId=None,
#         contextName=''
#         ):
#     def _sendPdu(
#         self,
#         snmpEngine,
#         transportDomain,
#         transportAddress,
#         messageProcessingModel,
#         securityModel,
#         securityName,
#         securityLevel,
#         contextEngineId,
#         contextName,
#         pduVersion,
#         reqPDU,
#         timeout,
#         retryCount,
#         retries,
#         sendRequestHandle,
#         cbInfo
#         ):
#     def _handleResponse(
#         self,
#         snmpEngine,
#         transportDomain,
#         transportAddress,
#         messageProcessingModel,
#         securityModel,
#         securityName,
#         securityLevel,
#         contextEngineId,
#         contextName,
#         pduVersion,
#         PDU,
#         timeout,
#         retryCount,
#         pMod,
#         rspPDU,
#         sendRequestHandle,
#         cbInfo
#         ):
#     def sendReq(
#         self,
#         snmpEngine,
#         addrName,
#         varBinds,
#         cbFun,
#         cbCtx=None,
#         contextEngineId=None,
#         contextName=''
#         ):
#     def sendReq(
#         self,
#         snmpEngine,
#         addrName,
#         varBinds,
#         cbFun,
#         cbCtx=None,
#         contextEngineId=None,
#         contextName=''
#         ):
#     def sendReq(
#         self,
#         snmpEngine,
#         addrName,
#         varBinds,
#         cbFun,
#         cbCtx=None,
#         contextEngineId=None,
#         contextName=''
#         ):
#     def _handleResponse(
#         self,
#         snmpEngine,
#         transportDomain,
#         transportAddress,
#         messageProcessingModel,
#         securityModel,
#         securityName,
#         securityLevel,
#         contextEngineId,
#         contextName,
#         pduVersion,
#         PDU,
#         timeout,
#         retryCount,
#         pMod,
#         rspPDU,
#         sendRequestHandle,
#         cbInfo
#         ):
#     def sendReq(
#         self,
#         snmpEngine,
#         addrName,
#         nonRepeaters,
#         maxRepetitions,
#         varBinds,
#         cbFun,
#         cbCtx=None,
#         contextEngineId=None,
#         contextName=''
#         ):
#     def _handleResponse(
#         self,
#         snmpEngine,
#         transportDomain,
#         transportAddress,
#         messageProcessingModel,
#         securityModel,
#         securityName,
#         securityLevel,
#         contextEngineId,
#         contextName,
#         pduVersion,
#         PDU,
#         timeout,
#         retryCount,
#         pMod,
#         rspPDU,
#         sendRequestHandle,
#         cbInfo
#         ):
# class CommandGeneratorBase:
# class GetCommandGenerator(CommandGeneratorBase):
# class SetCommandGenerator(CommandGeneratorBase):
# class NextCommandGeneratorSingleRun(CommandGeneratorBase):
# class NextCommandGenerator(NextCommandGeneratorSingleRun):
# class BulkCommandGeneratorSingleRun(CommandGeneratorBase):
# class BulkCommandGenerator(BulkCommandGeneratorSingleRun):
#             PDU = rfc2576.v1ToV2(PDU, origPdu)


# Path: pysnmp/entity/rfc3413/twisted/cmdgen.py
from twisted.internet import defer
from pysnmp.entity.rfc3413 import cmdgen
from pyasn1.compat.octets import null


def _cbFun(sendRequestHandle, errorIndication,
           errorStatus, errorIndex, varBinds, cbCtx):
    cbCtx.callback((errorIndication, errorStatus, errorIndex, varBinds))


class GetCommandGenerator(cmdgen.GetCommandGenerator):