com.adventnet.snmp.snmp2.agent
Class SnmpV3

java.lang.Object
  extended by com.adventnet.snmp.snmp2.agent.SnmpV3

 class SnmpV3
extends java.lang.Object

snmpgw acts as a gateway between a SNMPv3 management application and a SNMP v1/v2c/v3 agent system. The gateway can forward the requests to any of the agents configured in the gateway configuration file gateway.conf Each remote agent is associated with a contextEngineID. The manager making a request should specify the contextEngineID. The requests will be forwarded to the agent with the specified contextEngineID. If the contextEngineID is not specified, then the requests are forwarded to a default agent specified in gateway.conf. When you start the snmpgw application, you have to specify the port number on which it should listen and also its engineID. The gateway.conf has the agentRouting information and USMUser information. The agentRouting consists of the contextEngineID community, version, remotehost, remoteport and engineID in case the remote agent is a v3 agent. The USMUser information consists of the security parameters like the user name on whose behalf the requests will be accepted, the authentication and privacy parameters for the specified user. Usage: snmpgw [-d] [-f vacmFileName] port engineID ; Options: -d To get detailed debug output. Currently not a very usefule option Default : DEBUG is disabled -f vacmConfigurationFile. The filename from which to get the vacm configuration port. The local UDP port on which the gateway application listens for SNMPv3 requests engineID. Specify the engineID of the snmpgw.


Field Summary
(package private)  SnmpAPI api
           
(package private)  SnmpCommunityTable communityTable
           
(package private) static java.lang.String constFileName
           
(package private)  VacmContextTable contextTable
           
(package private)  int engineBoots
           
(package private)  int engineTime
           
(package private) static java.lang.String fileName
           
(package private)  VacmGroupAccessTable groupAccessTable
           
(package private)  VacmGroupTable groupTable
           
(package private)  java.lang.String localAddress
           
(package private)  SnmpNotifyFilterProfileTable notifyFilterProfileTable
           
(package private)  SnmpNotifyFilterTable notifyFilterTable
           
(package private)  SnmpNotifyTable notifyTable
           
(package private)  int port
           
(package private)  SnmpTargetAddrExtTable targetAddrExtTable
           
(package private)  SnmpTargetAddrTable targetAddrTable
           
(package private)  SnmpTargetParamsTable targetParamsTable
           
(package private)  USMUserTable USMTable
           
(package private)  VacmViewTreeTable viewTable
           
 
Constructor Summary
SnmpV3(int port, java.lang.String localAddress, SnmpAPI api)
          Constructor that takes the port, address and API as the arguments.
 
Method Summary
(package private)  byte[] genEngineID(java.lang.String localAddress, int port)
          Generates Engine id with the set localAddress and port
(package private)  void setLocalAddress(java.lang.String localAddress)
          set the local Address for this agent
(package private)  void setPort(int port)
          set the port on which the agent runs
(package private)  void setSerializeFileName(java.lang.String fileName)
          Set the serialize file name
(package private)  void setSnmpEngineBoots(int boots)
          set the engineBoots
(package private)  void setSnmpEngineTime(int time)
          set the engineTime
(package private)  void updateUSMTable(byte[] engineID, int boots)
          update the USMTable entries w.r.t the engineID generated Modifies the USM users' authKey and privKey w.r.t the engineID generated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fileName

static java.lang.String fileName

constFileName

static java.lang.String constFileName

communityTable

SnmpCommunityTable communityTable

targetAddrTable

SnmpTargetAddrTable targetAddrTable

targetAddrExtTable

SnmpTargetAddrExtTable targetAddrExtTable

targetParamsTable

SnmpTargetParamsTable targetParamsTable

notifyTable

SnmpNotifyTable notifyTable

notifyFilterTable

SnmpNotifyFilterTable notifyFilterTable

notifyFilterProfileTable

SnmpNotifyFilterProfileTable notifyFilterProfileTable

api

SnmpAPI api

localAddress

java.lang.String localAddress

port

int port

USMTable

USMUserTable USMTable

contextTable

VacmContextTable contextTable

groupTable

VacmGroupTable groupTable

groupAccessTable

VacmGroupAccessTable groupAccessTable

viewTable

VacmViewTreeTable viewTable

engineBoots

int engineBoots

engineTime

int engineTime
Constructor Detail

SnmpV3

public SnmpV3(int port,
              java.lang.String localAddress,
              SnmpAPI api)
Constructor that takes the port, address and API as the arguments.

Parameters:
port - port of the SnmpAgent
localAddress - localAddress of the SnmpAgent
api - SnmpAPI instance used by the SnmpAgent.
Method Detail

genEngineID

byte[] genEngineID(java.lang.String localAddress,
                   int port)
Generates Engine id with the set localAddress and port


setSnmpEngineBoots

void setSnmpEngineBoots(int boots)
set the engineBoots


setSnmpEngineTime

void setSnmpEngineTime(int time)
set the engineTime


updateUSMTable

void updateUSMTable(byte[] engineID,
                    int boots)
update the USMTable entries w.r.t the engineID generated Modifies the USM users' authKey and privKey w.r.t the engineID generated.


setSerializeFileName

void setSerializeFileName(java.lang.String fileName)
                    throws SnmpException
Set the serialize file name

Throws:
SnmpException

setLocalAddress

void setLocalAddress(java.lang.String localAddress)
set the local Address for this agent


setPort

void setPort(int port)
set the port on which the agent runs