# 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/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 pysnmp.proto import rfc1905, rfc3411, error
from pysnmp.proto.api import v1, v2c
from pysnmp import debug
    (1,3,6,1,6,3,1,1,5,6): 5
    }

# 4.3

__v2ToV1ErrorMap = {
    0:  0,
    1:  1,
    5:  5,
    10: 3,
    9:  3,
    7:  3,
    8:  3,
    12: 3,
    6:  2,
    17: 2,
    11: 2,
    18: 2,
    13: 5,
    14: 5,
    15: 5,
    16: 2
    }

__zeroInt = v1.Integer(0)

def v1ToV2(v1Pdu, origV2Pdu=None):
    pduType = v1Pdu.tagSet
    v2Pdu = __v1ToV2PduMap[pduType].clone()


# 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/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/proto/proxy/rfc2576.py
from pysnmp.proto import rfc1905, rfc3411, error
from pysnmp.proto.api import v1, v2c
from pysnmp import debug

    (1,3,6,1,6,3,1,1,5,6): 5
    }

# 4.3

__v2ToV1ErrorMap = {
    0:  0,
    1:  1,
    5:  5,
    10: 3,
    9:  3,
    7:  3,
    8:  3,
    12: 3,
    6:  2,
    17: 2,
    11: 2,
    18: 2,
    13: 5,
    14: 5,
    15: 5,
    16: 2
    }

__zeroInt = v1.Integer(0)

def v1ToV2(v1Pdu, origV2Pdu=None):
    pduType = v1Pdu.tagSet
    v2Pdu = __v1ToV2PduMap[pduType].clone()


    debug.logger & debug.flagPrx and debug.logger('v1ToV2: v1Pdu %s' % v1Pdu.prettyPrint())