⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 snmp-user-based-sm-mib

📁 很不错java的SNMP应用例子
💻
📖 第 1 页 / 共 3 页
字号:
usmStatsUnknownEngineIDs OBJECT-TYPE    SYNTAX       Counter32    MAX-ACCESS   read-only    STATUS       current    DESCRIPTION "The total number of packets received by the SNMP                 engine which were dropped because they referenced an                 snmpEngineID that was not known to the SNMP engine.                "    ::= { usmStats 4 }usmStatsWrongDigests OBJECT-TYPE    SYNTAX       Counter32    MAX-ACCESS   read-only    STATUS       current    DESCRIPTION "The total number of packets received by the SNMP                 engine which were dropped because they didn't                 contain the expected digest value.                "    ::= { usmStats 5 }usmStatsDecryptionErrors OBJECT-TYPE    SYNTAX       Counter32    MAX-ACCESS   read-only    STATUS       current    DESCRIPTION "The total number of packets received by the SNMP                 engine which were dropped because they could not be                 decrypted.                "    ::= { usmStats 6 }-- The usmUser Group ************************************************usmUser          OBJECT IDENTIFIER ::= { usmMIBObjects 2 }usmUserSpinLock  OBJECT-TYPE    SYNTAX       TestAndIncr    MAX-ACCESS   read-write    STATUS       current    DESCRIPTION "An advisory lock used to allow several cooperating                 Command Generator Applications to coordinate their                 use of facilities to alter secrets in the                 usmUserTable.                "    ::= { usmUser 1 }-- The table of valid users for the User-based Security Model ********usmUserTable     OBJECT-TYPE    SYNTAX       SEQUENCE OF UsmUserEntry    MAX-ACCESS   not-accessible    STATUS       current    DESCRIPTION "The table of users configured in the SNMP engine's                 Local Configuration Datastore (LCD).                 To create a new user (i.e., to instantiate a new                 conceptual row in this table), it is recommended to                 follow this procedure:                   1)  GET(usmUserSpinLock.0) and save in sValue.                   2)  SET(usmUserSpinLock.0=sValue,                           usmUserCloneFrom=templateUser,                           usmUserStatus=createAndWait)                       You should use a template user to clone from                       which has the proper auth/priv protocol defined.                 If the new user is to use privacy:                   3)  generate the keyChange value based on the secret                       privKey of the clone-from user and the secret key                       to be used for the new user. Let us call this                       pkcValue.                   4)  GET(usmUserSpinLock.0) and save in sValue.                   5)  SET(usmUserSpinLock.0=sValue,                           usmUserPrivKeyChange=pkcValue                           usmUserPublic=randomValue1)                   6)  GET(usmUserPulic) and check it has randomValue1.                       If not, repeat steps 4-6.                 If the new user will never use privacy:                   7)  SET(usmUserPrivProtocol=usmNoPrivProtocol)                 If the new user is to use authentication:                   8)  generate the keyChange value based on the secret                       authKey of the clone-from user and the secret key                       to be used for the new user. Let us call this                       akcValue.                   9)  GET(usmUserSpinLock.0) and save in sValue.                   10) SET(usmUserSpinLock.0=sValue,                           usmUserAuthKeyChange=akcValue                           usmUserPublic=randomValue2)                   11) GET(usmUserPulic) and check it has randomValue2.                       If not, repeat steps 9-11.                 If the new user will never use authentication:                   12) SET(usmUserAuthProtocol=usmNoAuthProtocol)                 Finally, activate the new user:                   13) SET(usmUserStatus=active)                 The new user should now be available and ready to be                 used for SNMPv3 communication. Note however that access                 to MIB data must be provided via configuration of the                 SNMP-VIEW-BASED-ACM-MIB.                 The use of usmUserSpinlock is to avoid conflicts with                 another SNMP command generator application which may                 also be acting on the usmUserTable.                "    ::= { usmUser 2 }usmUserEntry     OBJECT-TYPE    SYNTAX       UsmUserEntry    MAX-ACCESS   not-accessible    STATUS       current    DESCRIPTION "A user configured in the SNMP engine's Local                 Configuration Datastore (LCD) for the User-based                 Security Model.                "    INDEX       { usmUserEngineID,                  usmUserName                }    ::= { usmUserTable 1 }UsmUserEntry ::= SEQUENCE    {        usmUserEngineID         SnmpEngineID,        usmUserName             SnmpAdminString,        usmUserSecurityName     SnmpAdminString,        usmUserCloneFrom        RowPointer,        usmUserAuthProtocol     AutonomousType,        usmUserAuthKeyChange    KeyChange,        usmUserOwnAuthKeyChange KeyChange,        usmUserPrivProtocol     AutonomousType,        usmUserPrivKeyChange    KeyChange,        usmUserOwnPrivKeyChange KeyChange,        usmUserPublic           OCTET STRING,        usmUserStorageType      StorageType,        usmUserStatus           RowStatus    }usmUserEngineID  OBJECT-TYPE    SYNTAX       SnmpEngineID    MAX-ACCESS   not-accessible    STATUS       current    DESCRIPTION "An SNMP engine's administratively-unique identifier.                 In a simple agent, this value is always that agent's                 own snmpEngineID value.                 The value can also take the value of the snmpEngineID                 of a remote SNMP engine with which this user can                 communicate.                "    ::= { usmUserEntry 1 }usmUserName      OBJECT-TYPE    SYNTAX       SnmpAdminString (SIZE(1..32))    MAX-ACCESS   not-accessible    STATUS       current    DESCRIPTION "A human readable string representing the name of                 the user.                 This is the (User-based Security) Model dependent                 security ID.                "    ::= { usmUserEntry 2 }usmUserSecurityName OBJECT-TYPE    SYNTAX       SnmpAdminString    MAX-ACCESS   read-only    STATUS       current    DESCRIPTION "A human readable string representing the user in                 Security Model independent format.                 The default transformation of the User-based Security                 Model dependent security ID to the securityName and                 vice versa is the identity function so that the                 securityName is the same as the userName.                "    ::= { usmUserEntry 3 }usmUserCloneFrom OBJECT-TYPE    SYNTAX       RowPointer    MAX-ACCESS   read-create    STATUS       current    DESCRIPTION "A pointer to another conceptual row in this                 usmUserTable.  The user in this other conceptual                 row is called the clone-from user.                 When a new user is created (i.e., a new conceptual                 row is instantiated in this table), the privacy and                 authentication parameters of the new user must be                 cloned from its clone-from user. These parameters are:                   - authentication protocol (usmUserAuthProtocol)                   - privacy protocol (usmUserPrivProtocol)                 They will be copied regardless of what the current                 value is.                 Cloning also causes the initial values of the secret                 authentication key (authKey) and the secret encryption                 key (privKey) of the new user to be set to the same                 values as the corresponding secrets of the clone-from                 user to allow the KeyChange process to occur as                 required during user creation.                 The first time an instance of this object is set by                 a management operation (either at or after its                 instantiation), the cloning process is invoked.                 Subsequent writes are successful but invoke no                 action to be taken by the receiver.                 The cloning process fails with an 'inconsistentName'                 error if the conceptual row representing the                 clone-from user does not exist or is not in an active                 state when the cloning process is invoked.                 When this object is read, the ZeroDotZero OID                 is returned.                "    ::= { usmUserEntry 4 }usmUserAuthProtocol OBJECT-TYPE    SYNTAX       AutonomousType    MAX-ACCESS   read-create    STATUS       current    DESCRIPTION "An indication of whether messages sent on behalf of                 this user to/from the SNMP engine identified by                 usmUserEngineID, can be authenticated, and if so,                 the type of authentication protocol which is used.                 An instance of this object is created concurrently                 with the creation of any other object instance for                 the same user (i.e., as part of the processing of                 the set operation which creates the first object                 instance in the same conceptual row).                 If an initial set operation (i.e. at row creation time)                 tries to set a value for an unknown or unsupported                 protocol, then a 'wrongValue' error must be returned.                 The value will be overwritten/set when a set operation                 is performed on the corresponding instance of                 usmUserCloneFrom.                 Once instantiated, the value of such an instance of                 this object can only be changed via a set operation to                 the value of the usmNoAuthProtocol.                 If a set operation tries to change the value of an                 existing instance of this object to any value other                 than usmNoAuthProtocol, then an 'inconsistentValue'                 error must be returned.                 If a set operation tries to set the value to the                 usmNoAuthProtocol while the usmUserPrivProtocol value                 in the same row is not equal to usmNoPrivProtocol,                 then an 'inconsistentValue' error must be returned.                 That means that an SNMP command generator application                 must first ensure that the usmUserPrivProtocol is set                 to the usmNoPrivProtocol value before it can set                 the usmUserAuthProtocol value to usmNoAuthProtocol.                "    DEFVAL      { usmNoAuthProtocol }    ::= { usmUserEntry 5 }usmUserAuthKeyChange OBJECT-TYPE    SYNTAX       KeyChange   -- typically (SIZE (0 | 32)) for HMACMD5                             -- typically (SIZE (0 | 40)) for HMACSHA    MAX-ACCESS   read-create    STATUS       current    DESCRIPTION "An object, which when modified, causes the secret                 authentication key used for messages sent on behalf                 of this user to/from the SNMP engine identified by                 usmUserEngineID, to be modified via a one-way                 function.                 The associated protocol is the usmUserAuthProtocol.                 The associated secret key is the user's secret                 authentication key (authKey). The associated hash                 algorithm is the algorithm used by the user's                 usmUserAuthProtocol.                 When creating a new user, it is an 'inconsistentName'                 error for a set operation to refer to this object                 unless it is previously or concurrently initialized                 through a set operation on the corresponding instance                 of usmUserCloneFrom.                 When the value of the corresponding usmUserAuthProtocol                 is usmNoAuthProtocol, then a set is successful, but                 effectively is a no-op.                 When this object is read, the zero-length (empty)                 string is returned.                 The recommended way to do a key change is as follows:

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -