com.sun.management.snmp
Class SnmpPdu

java.lang.Object
  extended by com.sun.management.snmp.SnmpPdu
All Implemented Interfaces:
SnmpDefinitions, Serializable
Direct Known Subclasses:
SnmpPduPacket, SnmpScopedPduPacket

public abstract class SnmpPdu
extends Object
implements SnmpDefinitions, Serializable

Is the fully decoded representation of an SNMP packet.

Classes are derived from SnmpPdu to represent the different forms of SNMP packets (SnmpPduPacket, SnmpScopedPduPacket)
The SnmpPdu class defines the attributes common to every form of SNMP packets.

Since:
Java DMK 5.1
See Also:
SnmpMessage, SnmpPduFactory, Serialized Form

Field Summary
 InetAddress address
          Source or destination address.
 int port
          Source or destination port.
 int requestId
          Request identifier.
 int type
          PDU type.
 SnmpVarBind[] varBindList
          List of variables.
 int version
          Protocol version.
 
Fields inherited from interface com.sun.management.snmp.SnmpDefinitions
authMask, authNoPriv, authPriv, authPrivMask, CtxtConsFlag, noAuthNoPriv, noGroupName, noSuchContext, noSuchView, notInView, pduGetBulkRequestPdu, pduGetNextRequestPdu, pduGetRequestPdu, pduGetResponsePdu, pduInformRequestPdu, pduReportPdu, pduSetRequestPdu, pduV1TrapPdu, pduV2TrapPdu, pduWalkRequest, privMask, reportableFlag, snmpAuthNotSupported, snmpBadSecurityLevel, snmpPrivNotSupported, snmpReqAborted, snmpReqEncodingError, snmpReqHandleTooBig, snmpReqInternalError, snmpReqPacketOverflow, snmpReqRefireAfterVbFix, snmpReqSocketIOError, snmpReqTimeout, snmpReqTooBigImpossible, snmpReqUnknownError, snmpRspAuthorizationError, snmpRspBadValue, snmpRspCommitFailed, snmpRspDecodingError, snmpRspEndOfTable, snmpRspGenErr, snmpRspInconsistentName, snmpRspInconsistentValue, snmpRspNoAccess, snmpRspNoCreation, snmpRspNoError, snmpRspNoSuchName, snmpRspNotWritable, snmpRspReadOnly, snmpRspResourceUnavailable, snmpRspTooBig, snmpRspUndoFailed, snmpRspWrongEncoding, snmpRspWrongLength, snmpRspWrongType, snmpRspWrongValue, snmpUnknownPrincipal, snmpUsmBadEngineId, snmpUsmInvalidTimeliness, snmpUsmSecurityModel, snmpV1AccessControlModel, snmpV1MsgProcessingModel, snmpV1SecurityModel, snmpV2AccessControlModel, snmpV2MsgProcessingModel, snmpV2SecurityModel, snmpV3AccessControlModel, snmpV3MsgProcessingModel, snmpVersionOne, snmpVersionThree, snmpVersionTwo, snmpWrongSnmpVersion, trapAuthenticationFailure, trapColdStart, trapEgpNeighborLoss, trapEnterpriseSpecific, trapLinkDown, trapLinkUp, trapWarmStart
 
Constructor Summary
SnmpPdu()
           
 
Method Summary
static String pduTypeToString(int cmd)
          Returns the String representation of a PDU type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

public int type
PDU type. Types are defined in SnmpDefinitions.


version

public int version
Protocol version. Versions are defined in SnmpDefinitions.


varBindList

public SnmpVarBind[] varBindList
List of variables.


requestId

public int requestId
Request identifier. Note that this field is not used by SnmpPduTrap.


address

public InetAddress address
Source or destination address.

For an incoming PDU it's the source.
For an outgoing PDU it's the destination.


port

public int port
Source or destination port.

For an incoming PDU it's the source.
For an outgoing PDU it's the destination.

Constructor Detail

SnmpPdu

public SnmpPdu()
Method Detail

pduTypeToString

public static String pduTypeToString(int cmd)
Returns the String representation of a PDU type. For instance, if the PDU type is SnmpDefinitions.pduGetRequestPdu, the method will return "SnmpGet".

Parameters:
cmd - The integer representation of the PDU type.
Returns:
The String representation of the PDU type.

Open Source build 02
opendmk-1.0-b02 2007.10.01_19:17:46_MEST

Copyright 1998-2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.