Module org.snmp4j
Package org.snmp4j.mp

Class SnmpConstants


  • public final class SnmpConstants
    extends java.lang.Object
    The SnmpConstants class holds constants, ObjectIDs and Message strings used within SNMP4J.
    Version:
    1.8
    Author:
    Frank Fock
    • Field Detail

      • DEFAULT_COMMAND_RESPONDER_PORT

        public static final int DEFAULT_COMMAND_RESPONDER_PORT
        See Also:
        Constant Field Values
      • DEFAULT_NOTIFICATION_RECEIVER_PORT

        public static final int DEFAULT_NOTIFICATION_RECEIVER_PORT
        See Also:
        Constant Field Values
      • MILLISECOND_TO_NANOSECOND

        public static final int MILLISECOND_TO_NANOSECOND
        See Also:
        Constant Field Values
      • HUNDREDTHS_TO_NANOSECOND

        public static final int HUNDREDTHS_TO_NANOSECOND
        See Also:
        Constant Field Values
      • SNMP_ERROR_TIMEOUT

        public static final int SNMP_ERROR_TIMEOUT
        Command responders did not respond within specified timeout interval.
        See Also:
        Constant Field Values
      • SNMP_ERROR_LEXICOGRAPHIC_ORDER

        public static final int SNMP_ERROR_LEXICOGRAPHIC_ORDER
        OIDs returned from a GETNEXT or GETBULK are less or equal than the requested one (which is not allowed by SNMP).
        See Also:
        Constant Field Values
      • SNMP_ERROR_REPORT

        public static final int SNMP_ERROR_REPORT
        A unresolvable REPORT message was received while processing a request.
        See Also:
        Constant Field Values
      • SNMP_ERROR_IO

        public static final int SNMP_ERROR_IO
        An IOException occurred during request processing.
        See Also:
        Constant Field Values
      • SNMP_ERROR_NO_SUCH_NAME

        public static final int SNMP_ERROR_NO_SUCH_NAME
        See Also:
        Constant Field Values
      • SNMP_ERROR_GENERAL_ERROR

        public static final int SNMP_ERROR_GENERAL_ERROR
        See Also:
        Constant Field Values
      • SNMP_ERROR_WRONG_LENGTH

        public static final int SNMP_ERROR_WRONG_LENGTH
        See Also:
        Constant Field Values
      • SNMP_ERROR_WRONG_ENCODING

        public static final int SNMP_ERROR_WRONG_ENCODING
        See Also:
        Constant Field Values
      • SNMP_ERROR_INCONSISTENT_VALUE

        public static final int SNMP_ERROR_INCONSISTENT_VALUE
        See Also:
        Constant Field Values
      • SNMP_ERROR_RESOURCE_UNAVAILABLE

        public static final int SNMP_ERROR_RESOURCE_UNAVAILABLE
        See Also:
        Constant Field Values
      • SNMP_ERROR_COMMIT_FAILED

        public static final int SNMP_ERROR_COMMIT_FAILED
        See Also:
        Constant Field Values
      • SNMP_ERROR_AUTHORIZATION_ERROR

        public static final int SNMP_ERROR_AUTHORIZATION_ERROR
        See Also:
        Constant Field Values
      • SNMP_ERROR_NOT_WRITEABLE

        public static final int SNMP_ERROR_NOT_WRITEABLE
        See Also:
        Constant Field Values
      • SNMP_ERROR_INCONSISTENT_NAME

        public static final int SNMP_ERROR_INCONSISTENT_NAME
        See Also:
        Constant Field Values
      • SNMP_MP_UNSUPPORTED_SECURITY_MODEL

        public static final int SNMP_MP_UNSUPPORTED_SECURITY_MODEL
        See Also:
        Constant Field Values
      • SNMP_MP_NOT_IN_TIME_WINDOW

        public static final int SNMP_MP_NOT_IN_TIME_WINDOW
        See Also:
        Constant Field Values
      • SNMP_MP_DOUBLED_MESSAGE

        public static final int SNMP_MP_DOUBLED_MESSAGE
        See Also:
        Constant Field Values
      • SNMP_MP_INVALID_MESSAGE

        public static final int SNMP_MP_INVALID_MESSAGE
        See Also:
        Constant Field Values
      • SNMP_MP_INVALID_ENGINEID

        public static final int SNMP_MP_INVALID_ENGINEID
        See Also:
        Constant Field Values
      • SNMP_MP_NOT_INITIALIZED

        public static final int SNMP_MP_NOT_INITIALIZED
        See Also:
        Constant Field Values
      • SNMP_MP_COMMUNITY_ERROR

        public static final int SNMP_MP_COMMUNITY_ERROR
        See Also:
        Constant Field Values
      • SNMP_MP_WRONG_USER_NAME

        public static final int SNMP_MP_WRONG_USER_NAME
        See Also:
        Constant Field Values
      • SNMP_MP_UNKNOWN_PDU_HANDLERS

        public static final int SNMP_MP_UNKNOWN_PDU_HANDLERS
        See Also:
        Constant Field Values
      • SNMP_MP_UNAVAILABLE_CONTEXT

        public static final int SNMP_MP_UNAVAILABLE_CONTEXT
        See Also:
        Constant Field Values
      • SNMP_MP_UNKNOWN_CONTEXT

        public static final int SNMP_MP_UNKNOWN_CONTEXT
        See Also:
        Constant Field Values
      • SNMPv1v2c_CSM_BAD_COMMUNITY_NAME

        public static final int SNMPv1v2c_CSM_BAD_COMMUNITY_NAME
        See Also:
        Constant Field Values
      • SNMPv1v2c_CSM_BAD_COMMUNITY_USE

        public static final int SNMPv1v2c_CSM_BAD_COMMUNITY_USE
        See Also:
        Constant Field Values
      • SNMPv3_USM_UNSUPPORTED_SECURITY_LEVEL

        public static final int SNMPv3_USM_UNSUPPORTED_SECURITY_LEVEL
        See Also:
        Constant Field Values
      • SNMPv3_USM_UNKNOWN_SECURITY_NAME

        public static final int SNMPv3_USM_UNKNOWN_SECURITY_NAME
        See Also:
        Constant Field Values
      • SNMPv3_USM_ENCRYPTION_ERROR

        public static final int SNMPv3_USM_ENCRYPTION_ERROR
        See Also:
        Constant Field Values
      • SNMPv3_USM_DECRYPTION_ERROR

        public static final int SNMPv3_USM_DECRYPTION_ERROR
        See Also:
        Constant Field Values
      • SNMPv3_USM_AUTHENTICATION_ERROR

        public static final int SNMPv3_USM_AUTHENTICATION_ERROR
        See Also:
        Constant Field Values
      • SNMPv3_USM_AUTHENTICATION_FAILURE

        public static final int SNMPv3_USM_AUTHENTICATION_FAILURE
        See Also:
        Constant Field Values
      • SNMPv3_USM_UNKNOWN_ENGINEID

        public static final int SNMPv3_USM_UNKNOWN_ENGINEID
        See Also:
        Constant Field Values
      • SNMPv3_USM_NOT_IN_TIME_WINDOW

        public static final int SNMPv3_USM_NOT_IN_TIME_WINDOW
        See Also:
        Constant Field Values
      • SNMPv3_USM_UNSUPPORTED_AUTHPROTOCOL

        public static final int SNMPv3_USM_UNSUPPORTED_AUTHPROTOCOL
        See Also:
        Constant Field Values
      • SNMPv3_USM_UNSUPPORTED_PRIVPROTOCOL

        public static final int SNMPv3_USM_UNSUPPORTED_PRIVPROTOCOL
        See Also:
        Constant Field Values
      • SNMPv3_USM_ADDRESS_ERROR

        public static final int SNMPv3_USM_ADDRESS_ERROR
        See Also:
        Constant Field Values
      • SNMPv3_USM_ENGINE_ID_TOO_LONG

        public static final int SNMPv3_USM_ENGINE_ID_TOO_LONG
        See Also:
        Constant Field Values
      • SNMPv3_USM_SECURITY_NAME_TOO_LONG

        public static final int SNMPv3_USM_SECURITY_NAME_TOO_LONG
        See Also:
        Constant Field Values
      • SNMPv3_TSM_UNKNOWN_PREFIXES

        public static final int SNMPv3_TSM_UNKNOWN_PREFIXES
        See Also:
        Constant Field Values
      • SNMPv3_TSM_INVALID_CACHES

        public static final int SNMPv3_TSM_INVALID_CACHES
        See Also:
        Constant Field Values
      • SNMPv3_TSM_INADEQUATE_SECURITY_LEVELS

        public static final int SNMPv3_TSM_INADEQUATE_SECURITY_LEVELS
        See Also:
        Constant Field Values
      • SNMP_MD_UNSUPPORTED_MP_MODEL

        public static final int SNMP_MD_UNSUPPORTED_MP_MODEL
        See Also:
        Constant Field Values
      • SNMP_MD_UNSUPPORTED_ADDRESS_CLASS

        public static final int SNMP_MD_UNSUPPORTED_ADDRESS_CLASS
        See Also:
        Constant Field Values
      • SNMP_MD_UNSUPPORTED_SNMP_VERSION

        public static final int SNMP_MD_UNSUPPORTED_SNMP_VERSION
        See Also:
        Constant Field Values
      • usmNoAuthProtocol

        public static final OID usmNoAuthProtocol
      • usmHMACMD5AuthProtocol

        public static final OID usmHMACMD5AuthProtocol
      • usmHMACSHAAuthProtocol

        public static final OID usmHMACSHAAuthProtocol
      • usmNoPrivProtocol

        public static final OID usmNoPrivProtocol
      • usmDESPrivProtocol

        public static final OID usmDESPrivProtocol
      • usm3DESEDEPrivProtocol

        public static final OID usm3DESEDEPrivProtocol
      • usmAesCfb128Protocol

        public static final OID usmAesCfb128Protocol
      • oosnmpUsmAesCfb192Protocol

        public static final OID oosnmpUsmAesCfb192Protocol
      • oosnmpUsmAesCfb256Protocol

        public static final OID oosnmpUsmAesCfb256Protocol
      • oosnmpUsmAesCfb192ProtocolWith3DESKeyExtension

        public static final OID oosnmpUsmAesCfb192ProtocolWith3DESKeyExtension
      • oosnmpUsmAesCfb256ProtocolWith3DESKeyExtension

        public static final OID oosnmpUsmAesCfb256ProtocolWith3DESKeyExtension
      • usmStatsUnsupportedSecLevels

        public static final OID usmStatsUnsupportedSecLevels
      • usmStatsNotInTimeWindows

        public static final OID usmStatsNotInTimeWindows
      • usmStatsUnknownUserNames

        public static final OID usmStatsUnknownUserNames
      • usmStatsUnknownEngineIDs

        public static final OID usmStatsUnknownEngineIDs
      • usmStatsWrongDigests

        public static final OID usmStatsWrongDigests
      • usmStatsDecryptionErrors

        public static final OID usmStatsDecryptionErrors
      • snmpEngineID

        public static final OID snmpEngineID
      • snmpUnknownSecurityModels

        public static final OID snmpUnknownSecurityModels
      • snmpInvalidMsgs

        public static final OID snmpInvalidMsgs
      • snmpUnknownPDUHandlers

        public static final OID snmpUnknownPDUHandlers
      • snmpInPkts

        public static final OID snmpInPkts
      • snmpInBadVersions

        public static final OID snmpInBadVersions
      • snmpInBadCommunityNames

        public static final OID snmpInBadCommunityNames
      • snmpInBadCommunityUses

        public static final OID snmpInBadCommunityUses
      • snmpInASNParseErrs

        public static final OID snmpInASNParseErrs
      • snmpSilentDrops

        public static final OID snmpSilentDrops
      • snmpProxyDrops

        public static final OID snmpProxyDrops
      • snmpTrapOID

        public static final OID snmpTrapOID
      • snmpTrapEnterprise

        public static final OID snmpTrapEnterprise
      • snmpTraps

        public static final OID snmpTraps
      • coldStart

        public static final OID coldStart
      • warmStart

        public static final OID warmStart
      • authenticationFailure

        public static final OID authenticationFailure
      • linkDown

        public static final OID linkDown
      • linkUp

        public static final OID linkUp
      • sysDescr

        public static final OID sysDescr
      • sysObjectID

        public static final OID sysObjectID
      • sysUpTime

        public static final OID sysUpTime
      • sysContact

        public static final OID sysContact
      • sysName

        public static final OID sysName
      • sysLocation

        public static final OID sysLocation
      • sysServices

        public static final OID sysServices
      • sysOREntry

        public static final OID sysOREntry
      • system

        public static final OID system
      • snmpUnavailableContexts

        public static final OID snmpUnavailableContexts
      • snmpUnknownContexts

        public static final OID snmpUnknownContexts
      • snmpTrapAddress

        public static final OID snmpTrapAddress
      • snmpTrapCommunity

        public static final OID snmpTrapCommunity
      • zeroDotZero

        public static final OID zeroDotZero
      • snmpTsmInvalidCaches

        public static final OID snmpTsmInvalidCaches
      • snmpTsmInadequateSecurityLevels

        public static final OID snmpTsmInadequateSecurityLevels
      • snmpTsmUnknownPrefixes

        public static final OID snmpTsmUnknownPrefixes
      • snmpTsmInvalidPrefixes

        public static final OID snmpTsmInvalidPrefixes
      • snmpTsmConfigurationUsePrefix

        public static final OID snmpTsmConfigurationUsePrefix
      • snmpTlstmSessionOpens

        public static final OID snmpTlstmSessionOpens
      • snmpTlstmSessionClientCloses

        public static final OID snmpTlstmSessionClientCloses
      • snmpTlstmSessionOpenErrors

        public static final OID snmpTlstmSessionOpenErrors
      • snmpTlstmSessionAccepts

        public static final OID snmpTlstmSessionAccepts
      • snmpTlstmSessionServerCloses

        public static final OID snmpTlstmSessionServerCloses
      • snmpTlstmSessionNoSessions

        public static final OID snmpTlstmSessionNoSessions
      • snmpTlstmSessionInvalidClientCertificates

        public static final OID snmpTlstmSessionInvalidClientCertificates
      • snmpTlstmSessionUnknownServerCertificate

        public static final OID snmpTlstmSessionUnknownServerCertificate
      • snmpTlstmSessionInvalidServerCertificates

        public static final OID snmpTlstmSessionInvalidServerCertificates
      • snmpTlstmSessionInvalidCaches

        public static final OID snmpTlstmSessionInvalidCaches
      • snmpSshtmSessionOpens

        public static final OID snmpSshtmSessionOpens
      • snmpSshtmSessionCloses

        public static final OID snmpSshtmSessionCloses
      • snmpSshtmSessionOpenErrors

        public static final OID snmpSshtmSessionOpenErrors
      • snmpSshtmSessionUserAuthFailures

        public static final OID snmpSshtmSessionUserAuthFailures
      • snmpSshtmSessionNoChannels

        public static final OID snmpSshtmSessionNoChannels
      • snmpSshtmSessionNoSubsystems

        public static final OID snmpSshtmSessionNoSubsystems
      • snmpSshtmSessionNoSessions

        public static final OID snmpSshtmSessionNoSessions
      • snmpSshtmSessionInvalidCaches

        public static final OID snmpSshtmSessionInvalidCaches
      • snmp4jStatsRequestTimeouts

        public static final OID snmp4jStatsRequestTimeouts
        The total number of requests that timed out (Counter32).
      • snmp4jStatsRequestRetries

        public static final OID snmp4jStatsRequestRetries
        The total number of retries sent on behalf of requests. The first message, thus the request itself is not counted (Counter32).
      • snmp4jStatsRequestWaitTime

        public static final OID snmp4jStatsRequestWaitTime
        The total number of milliseconds this SNMP entity spend waiting for responses on its own requests (Counter64).
      • snmp4jStatsRequestRuntime

        public static final OID snmp4jStatsRequestRuntime
        The number of milliseconds a successful request took from sending the request to receiving the corresponding response with the same msgID. Note, for community based SNMP version, only the same request ID is used to correlate request and response. Thus, only for SNMPv3 the counter can distinguish which retry has been successfully responded.
      • snmp4jStatsReqTableTimeouts

        public static final OID snmp4jStatsReqTableTimeouts
        The total number of requests that timed out for this target (Counter32).
      • snmp4jStatsReqTableRetries

        public static final OID snmp4jStatsReqTableRetries
        The total number of retries sent on behalf of requests to this target. The first message, thus the request itself is not counted.
      • snmp4jStatsReqTableWaitTime

        public static final OID snmp4jStatsReqTableWaitTime
        The total number of milliseconds this SNMP entity spend waiting for responses on its own requests to this target.
      • snmp4jStatsReqTableRuntime

        public static final OID snmp4jStatsReqTableRuntime
        The number of milliseconds a successful request took from sending the request to receiving the corresponding response with the same msgID for this target. Note, for community based SNMP version, only the same request ID is used to correlate request and response. Thus, only for SNMPv3 the counter can distinguish which retry has been successfully responded.
      • snmp4jStatsResponseTimeouts

        public static final OID snmp4jStatsResponseTimeouts
        The number of response processings that ended due to an internal timeout before that maximum number of response variables (GETBULK) has been reached. For other request types than GETBULK, an internal timeout would return a SNMP error (e.g. genErr) to the command sender.
      • snmp4jStatsResponseIgnoredRetries

        public static final OID snmp4jStatsResponseIgnoredRetries
        The total number of retries ignored by the command responder while processing requests.
      • snmp4jStatsResponseProcessTime

        public static final OID snmp4jStatsResponseProcessTime
        The total number of milliseconds the command responder took to process a request.
      • snmpSetSerialNo

        public static final OID snmpSetSerialNo
      • SNMP_TP_ERROR_MESSAGES

        public static final java.lang.String[] SNMP_TP_ERROR_MESSAGES
      • SNMP_ERROR_MESSAGES

        public static final java.lang.String[] SNMP_ERROR_MESSAGES
      • MD_ERROR_MESSAGES

        public static java.lang.String[][] MD_ERROR_MESSAGES
      • MP_ERROR_MESSAGES

        public static java.lang.String[][] MP_ERROR_MESSAGES
      • USM_ERROR_MESSAGES

        public static java.lang.String[][] USM_ERROR_MESSAGES
    • Constructor Detail

      • SnmpConstants

        public SnmpConstants()
    • Method Detail

      • mpErrorMessage

        public static java.lang.String mpErrorMessage​(int status)
      • usmErrorMessage

        public static java.lang.String usmErrorMessage​(int status)
      • getGenericTrapID

        public static int getGenericTrapID​(OID oid)
        Gets the generic trap ID from a notification OID.
        Parameters:
        oid - an OID.
        Returns:
        -1 if the supplied OID is not a generic trap, otherwise a zero or positive value will be returned that denotes the generic trap ID.
      • getTrapOID

        public static OID getTrapOID​(OID enterprise,
                                     int genericID,
                                     int specificID)