Overview | Package | Class | Tree | Deprecated | Index | Help
| SNMP Stack 5_1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.co.westhawk.snmp.stack
Interface UsmAgent

All Known Implementing Classes:
  Agent, DefaultUsmAgent, SimpleUsmAgent

public interface UsmAgent

This interface provides the SNMPv3 USM (User-Based Security Model) authoritative details.

When the stack is used as authoritative SNMP engine it has to send its Engine ID and clock (i.e. Engine Boots and Engine Time) with each message. The engine who sends a Response, a Trapv2 or a Report is authoritative.

Since this stack has no means in providing this information, this interface has to be implemented by the user.

See SNMP-USER-BASED-SM-MIB.

Version:
  $Revision: 3.8 $ $Date: 2006/03/23 14:54:10 $
Author:
  Birgit Arkesteijn
See Also:
  `SnmpContextv3Basis.setUsmAgent(uk.co.westhawk.snmp.stack.UsmAgent)`

Field Summary
`static java.lang.String` | `MYFAKEHOSTNAME` This name ("_myusmagent") is used to create an entry in the TimeWindow for the stack to act as authoritative engine.
`static java.lang.String` | `version_id`

Method Summary
`int` | `getSnmpEngineBoots()` Returns the authoritative Engine Boots.
`java.lang.String` | `getSnmpEngineId()` Returns the authoritative SNMP Engine ID.
`int` | `getSnmpEngineTime()` Returns the authoritative Engine Time.
`long` | `getUsmStatsNotInTimeWindows()` Returns the value of the usmStatsNotInTimeWindows counter.
`long` | `getUsmStatsUnknownEngineIDs()` Returns the value of the usmStatsUnknownEngineIDs counter.
`void` | `setSnmpContext(SnmpContextv3Basis context)` Sets the current snmp context.

Field Detail

### version_id

    public static final java.lang.String version_id

See Also:
  Constant Field Values

### MYFAKEHOSTNAME

    public static final java.lang.String MYFAKEHOSTNAME

  This name ("_myusmagent") is used to create an entry in the TimeWindow for the stack to act as authoritative engine.

  See Also:
    Constant Field Values

Method Detail

### getSnmpEngineId

    public java.lang.String getSnmpEngineId()

  Returns the authoritative SNMP Engine ID. It uniquely and unambiguously identifies the SNMP engine, within an administrative domain.

  The Engine ID is the (case insensitive) string representation of a hexadecimal number, without any prefix, for example 010000a1d41e4946.

  See Also:
    `SnmpUtilities.toBytes(String)`

### getSnmpEngineBoots

    public int getSnmpEngineBoots()

  Returns the authoritative Engine Boots. It is a count of the number of times the SNMP engine has re-booted/re-initialized since snmpEngineID was last configured.

### getSnmpEngineTime

    public int getSnmpEngineTime()

  Returns the authoritative Engine Time. It is the number of seconds since the snmpEngineBoots counter was last incremented.

### getUsmStatsUnknownEngineIDs

    public long getUsmStatsUnknownEngineIDs()

  Returns the value of the usmStatsUnknownEngineIDs counter. The stack needs this when responding to a discovery request.

### getUsmStatsNotInTimeWindows

    public long getUsmStatsNotInTimeWindows()

  Returns the value of the usmStatsNotInTimeWindows counter. The stack needs this when responding to a discovery request.

### setSnmpContext

    public void setSnmpContext(SnmpContextv3Basis context)

  Sets the current snmp context.

Overview | Package | Class | Tree | Deprecated | Index | Help
| SNMP Stack 5_1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD