org.snmp4j.mp
Class SnmpConstants

java.lang.Object
  extended by org.snmp4j.mp.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 Summary
static OID authenticationFailure
           
static OID coldStart
           
static int DEFAULT_COMMAND_RESPONDER_PORT
           
static int DEFAULT_NOTIFICATION_RECEIVER_PORT
           
static OID linkDown
           
static OID linkUp
           
static int MIN_PDU_LENGTH
           
static java.lang.String[][] MP_ERROR_MESSAGES
           
static int SNMP_ERROR_AUTHORIZATION_ERROR
           
static int SNMP_ERROR_BAD_VALUE
           
static int SNMP_ERROR_COMMIT_FAILED
           
static int SNMP_ERROR_GENERAL_ERROR
           
static int SNMP_ERROR_INCONSISTENT_NAME
           
static int SNMP_ERROR_INCONSISTENT_VALUE
           
static java.lang.String[] SNMP_ERROR_MESSAGES
           
static int SNMP_ERROR_NO_ACCESS
           
static int SNMP_ERROR_NO_CREATION
           
static int SNMP_ERROR_NO_SUCH_NAME
           
static int SNMP_ERROR_NOT_WRITEABLE
           
static int SNMP_ERROR_READ_ONLY
           
static int SNMP_ERROR_RESOURCE_UNAVAILABLE
           
static int SNMP_ERROR_SUCCESS
           
static int SNMP_ERROR_TOO_BIG
           
static int SNMP_ERROR_UNDO_FAILED
           
static int SNMP_ERROR_WRONG_ENCODING
           
static int SNMP_ERROR_WRONG_LENGTH
           
static int SNMP_ERROR_WRONG_TYPE
           
static int SNMP_ERROR_WRONG_VALUE
           
static int SNMP_MP_BUILD_ERROR
           
static int SNMP_MP_COMMUNITY_ERROR
           
static int SNMP_MP_DOUBLED_MESSAGE
           
static int SNMP_MP_ERROR
           
static int SNMP_MP_INVALID_ENGINEID
           
static int SNMP_MP_INVALID_MESSAGE
           
static int SNMP_MP_MATCH_ERROR
           
static int SNMP_MP_NOT_IN_TIME_WINDOW
           
static int SNMP_MP_NOT_INITIALIZED
           
static int SNMP_MP_OK
           
static int SNMP_MP_PARSE_ERROR
           
static int SNMP_MP_REPORT_SENT
           
static int SNMP_MP_UNAVAILABLE_CONTEXT
           
static int SNMP_MP_UNKNOWN_CONTEXT
           
static int SNMP_MP_UNKNOWN_MSGID
           
static int SNMP_MP_UNKNOWN_PDU_HANDLERS
           
static int SNMP_MP_UNSUPPORTED_SECURITY_MODEL
           
static int SNMP_MP_USM_ERROR
           
static int SNMP_MP_WRONG_USER_NAME
           
static OID snmpInASNParseErrs
           
static OID snmpInBadCommunityNames
           
static OID snmpInBadCommunityUses
           
static OID snmpInBadVersions
           
static OID snmpInPkts
           
static OID snmpInvalidMsgs
           
static OID snmpProxyDrops
           
static OID snmpSetSerialNo
           
static OID snmpSilentDrops
           
static OID snmpTrapAddress
           
static OID snmpTrapCommunity
           
static OID snmpTrapEnterprise
           
static OID snmpTrapOID
           
static OID snmpTraps
           
static OID snmpUnavailableContexts
           
static OID snmpUnknownContexts
           
static OID snmpUnknownPDUHandlers
           
static OID snmpUnknownSecurityModels
           
static int SNMPv1v2c_CSM_BAD_COMMUNITY_NAME
           
static int SNMPv1v2c_CSM_BAD_COMMUNITY_USE
           
static int SNMPv1v2c_CSM_OK
           
static int SNMPv3_USM_ADDRESS_ERROR
           
static int SNMPv3_USM_AUTHENTICATION_ERROR
           
static int SNMPv3_USM_AUTHENTICATION_FAILURE
           
static int SNMPv3_USM_DECRYPTION_ERROR
           
static int SNMPv3_USM_ENCRYPTION_ERROR
           
static int SNMPv3_USM_ERROR
           
static int SNMPv3_USM_NOT_IN_TIME_WINDOW
           
static int SNMPv3_USM_OK
           
static int SNMPv3_USM_PARSE_ERROR
           
static int SNMPv3_USM_UNKNOWN_ENGINEID
           
static int SNMPv3_USM_UNKNOWN_SECURITY_NAME
           
static int SNMPv3_USM_UNSUPPORTED_AUTHPROTOCOL
           
static int SNMPv3_USM_UNSUPPORTED_PRIVPROTOCOL
           
static int SNMPv3_USM_UNSUPPORTED_SECURITY_LEVEL
           
static OID sysContact
           
static OID sysDescr
           
static OID sysLocation
           
static OID sysName
           
static OID sysObjectID
           
static OID sysOREntry
           
static OID sysServices
           
static OID sysUpTime
           
static java.lang.String[][] USM_ERROR_MESSAGES
           
static OID usmStatsDecryptionErrors
           
static OID usmStatsNotInTimeWindows
           
static OID usmStatsUnknownEngineIDs
           
static OID usmStatsUnknownUserNames
           
static OID usmStatsUnsupportedSecLevels
           
static OID usmStatsWrongDigests
           
static int version1
           
static int version2c
           
static int version3
           
static OID warmStart
           
static OID zeroDotZero
           
 
Constructor Summary
SnmpConstants()
           
 
Method Summary
static int getGenericTrapID(OID oid)
          Gets the generic trap ID from a notification OID.
static OID getTrapOID(OID enterprise, int genericID, int specificID)
           
static java.lang.String mpErrorMessage(int status)
           
static java.lang.String usmErrorMessage(int status)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

MIN_PDU_LENGTH

public static final int MIN_PDU_LENGTH
See Also:
Constant Field Values

version1

public static final int version1
See Also:
Constant Field Values

version2c

public static final int version2c
See Also:
Constant Field Values

version3

public static final int version3
See Also:
Constant Field Values

SNMP_ERROR_SUCCESS

public static final int SNMP_ERROR_SUCCESS
See Also:
Constant Field Values

SNMP_ERROR_TOO_BIG

public static final int SNMP_ERROR_TOO_BIG
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_BAD_VALUE

public static final int SNMP_ERROR_BAD_VALUE
See Also:
Constant Field Values

SNMP_ERROR_READ_ONLY

public static final int SNMP_ERROR_READ_ONLY
See Also:
Constant Field Values

SNMP_ERROR_GENERAL_ERROR

public static final int SNMP_ERROR_GENERAL_ERROR
See Also:
Constant Field Values

SNMP_ERROR_NO_ACCESS

public static final int SNMP_ERROR_NO_ACCESS
See Also:
Constant Field Values

SNMP_ERROR_WRONG_TYPE

public static final int SNMP_ERROR_WRONG_TYPE
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_WRONG_VALUE

public static final int SNMP_ERROR_WRONG_VALUE
See Also:
Constant Field Values

SNMP_ERROR_NO_CREATION

public static final int SNMP_ERROR_NO_CREATION
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_UNDO_FAILED

public static final int SNMP_ERROR_UNDO_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_OK

public static final int SNMP_MP_OK
See Also:
Constant Field Values

SNMP_MP_ERROR

public static final int SNMP_MP_ERROR
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_PARSE_ERROR

public static final int SNMP_MP_PARSE_ERROR
See Also:
Constant Field Values

SNMP_MP_UNKNOWN_MSGID

public static final int SNMP_MP_UNKNOWN_MSGID
See Also:
Constant Field Values

SNMP_MP_MATCH_ERROR

public static final int SNMP_MP_MATCH_ERROR
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_BUILD_ERROR

public static final int SNMP_MP_BUILD_ERROR
See Also:
Constant Field Values

SNMP_MP_USM_ERROR

public static final int SNMP_MP_USM_ERROR
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

SNMP_MP_REPORT_SENT

public static final int SNMP_MP_REPORT_SENT
See Also:
Constant Field Values

SNMPv1v2c_CSM_OK

public static final int SNMPv1v2c_CSM_OK
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_OK

public static final int SNMPv3_USM_OK
See Also:
Constant Field Values

SNMPv3_USM_ERROR

public static final int SNMPv3_USM_ERROR
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_PARSE_ERROR

public static final int SNMPv3_USM_PARSE_ERROR
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

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

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

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

snmpSetSerialNo

public static final OID snmpSetSerialNo

SNMP_ERROR_MESSAGES

public static final java.lang.String[] SNMP_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 value >= 0 will be returned that denotes the generic trap ID.

getTrapOID

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

Copyright 2005-2010 Frank Fock (SNMP4J.org)

Copyright © 2011 SNMP4J.org. All Rights Reserved.