SourceForge.net Logo

org.netsnmp
Class NetSNMP

java.lang.Object
  |
  +--org.netsnmp.NetSNMP

public class NetSNMP
extends Object

The NetSNMP class contains useful fields and methods. Similar to the java.lang.System class.


Field Summary
static SecurityLevel authNoPriv
           
static SecurityLevel authPriv
           
static HostLister defaultHostList
           
static PDU.PDU_COMMAND MSG_GET
          Command type to construct pdu to be sent to a remote agent to perform a GET operation.
static PDU.PDU_COMMAND MSG_GETBULK
          Command type to construct a pdu to be sent to a remote agent to perform a GETBULK operation(i.e.
static PDU.PDU_COMMAND MSG_GETNEXT
          Command type to construct a pdu to be sent to a remote agent to perform a GETNEXT operation (i.e.
static PDU.PDU_COMMAND MSG_INFORM
           
static PDU.PDU_COMMAND MSG_REPORT
           
static PDU.PDU_COMMAND MSG_RESPONSE
           
static PDU.PDU_COMMAND MSG_SET
          Command type to construct a pdu to be sent to a remote agent to perform a SET operation.
static PDU.PDU_COMMAND MSG_TRAP
           
static PDU.PDU_COMMAND MSG_TRAP2
           
static SecurityLevel noAuth
           
static SNMPVersion SNMPv1
          SNMPVersion object to use to request a SNMP Version 1 session
static SNMPVersion SNMPv2c
          SNMPVersion object to use to request a SNMP Version 2c session
static SNMPVersion SNMPv3
          SNMPVersion object to use to request a SNMP Version 3 session
static int STAT_TIMEOUT
          Result code indicating that there was no response from the agent TDB transfer this to a type-safe enum
static OID usmDESPrivOID
           
static OID usmMD5AuthOID
           
static OID usmNoAuthOID
           
static OID usmNoPrivOID
           
static OID usmSHAAuthOID
           
 
Method Summary
static void doDebugging(boolean flag)
          Enables net-snmp stderr debugging
static void enableStderrLogging(boolean flag)
          Method enableStderrLogging Enables or disables the stderrlogging Equivalent to the netsnmplib calls snmp_disable_stderrlog and snmp_enable_stderrlog
static String getNetSNMPVersion()
          Retrieves the version of net-snmp that the native library is is using.
static String getReleaseVersion()
          Retrieves the netsnmpj release name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

authNoPriv

public static final SecurityLevel authNoPriv

authPriv

public static final SecurityLevel authPriv

defaultHostList

public static HostLister defaultHostList

MSG_GET

public static final PDU.PDU_COMMAND MSG_GET
Command type to construct pdu to be sent to a remote agent to perform a GET operation. (i.e. sending a pdu to a remote agent in order to have it send back a pdu containing information)


MSG_GETBULK

public static final PDU.PDU_COMMAND MSG_GETBULK
Command type to construct a pdu to be sent to a remote agent to perform a GETBULK operation(i.e. large request is made to an agent, and the agent can reply with multiple PDUs instead of one large one.)


MSG_GETNEXT

public static final PDU.PDU_COMMAND MSG_GETNEXT
Command type to construct a pdu to be sent to a remote agent to perform a GETNEXT operation (i.e. sending a pdu to remote agent in order to retrieve the next object from the object(s) contained in the pdu.


MSG_INFORM

public static final PDU.PDU_COMMAND MSG_INFORM

MSG_REPORT

public static final PDU.PDU_COMMAND MSG_REPORT

MSG_RESPONSE

public static final PDU.PDU_COMMAND MSG_RESPONSE

MSG_SET

public static final PDU.PDU_COMMAND MSG_SET
Command type to construct a pdu to be sent to a remote agent to perform a SET operation. (i.e. sending a pdu to a remote agent to set values internally).

NOTE: SNMPv2 and above compliant agents may require extra privelages in order to successfully perform this operation. In addtion not all fields have write access, and agent configurations can restrict write access to certain OID trees while granting others. Consult the documentation for the remote agent.

See Also:
PDU.PDU(PDU.PDU_COMMAND), snmpd.conf

MSG_TRAP

public static final PDU.PDU_COMMAND MSG_TRAP

MSG_TRAP2

public static final PDU.PDU_COMMAND MSG_TRAP2

noAuth

public static final SecurityLevel noAuth

SNMPv1

public static final SNMPVersion SNMPv1
SNMPVersion object to use to request a SNMP Version 1 session
  NetSNMPSession sess = new NetSNMPSession() ;
     sess.setSNMPVersion(NetSNMP.SNMPv1) ;
     sess.setPeerName("localhost") ;
     sess.setCommunityName("public") ;
     sess.open() ;
 


SNMPv2c

public static final SNMPVersion SNMPv2c
SNMPVersion object to use to request a SNMP Version 2c session


SNMPv3

public static final SNMPVersion SNMPv3
SNMPVersion object to use to request a SNMP Version 3 session


STAT_TIMEOUT

public static final int STAT_TIMEOUT
Result code indicating that there was no response from the agent TDB transfer this to a type-safe enum

See Also:
Constant Field Values

usmDESPrivOID

public static final OID usmDESPrivOID

usmMD5AuthOID

public static final OID usmMD5AuthOID

usmNoAuthOID

public static final OID usmNoAuthOID

usmNoPrivOID

public static final OID usmNoPrivOID

usmSHAAuthOID

public static final OID usmSHAAuthOID
Method Detail

doDebugging

public static void doDebugging(boolean flag)
Enables net-snmp stderr debugging


enableStderrLogging

public static void enableStderrLogging(boolean flag)
Method enableStderrLogging Enables or disables the stderrlogging Equivalent to the netsnmplib calls snmp_disable_stderrlog and snmp_enable_stderrlog

Parameters:
flag - whether or not to enable stderr logging

getNetSNMPVersion

public static String getNetSNMPVersion()
Retrieves the version of net-snmp that the native library is is using.


getReleaseVersion

public static String getReleaseVersion()
Retrieves the netsnmpj release name


SourceForge.net Logo