|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsnmp.SNMPObject
snmp.SNMPSequence
snmp.SNMPPDU
The SNMPPDU class represents an SNMP PDU from RFC 1157, as indicated below. This forms the payload of an SNMP message. -- protocol data units PDUs ::= CHOICE { get-request GetRequest-PDU, get-next-request GetNextRequest-PDU, get-response GetResponse-PDU, set-request SetRequest-PDU, trap Trap-PDU } -- PDUs GetRequest-PDU ::= [0] IMPLICIT PDU GetNextRequest-PDU ::= [1] IMPLICIT PDU GetResponse-PDU ::= [2] IMPLICIT PDU SetRequest-PDU ::= [3] IMPLICIT PDU PDU ::= SEQUENCE { request-id INTEGER, error-status -- sometimes ignored INTEGER { noError(0), tooBig(1), noSuchName(2), badValue(3), readOnly(4), genErr(5) }, error-index -- sometimes ignored INTEGER, variable-bindings -- values are sometimes ignored VarBindList } -- variable bindings VarBind ::= SEQUENCE { name ObjectName, value ObjectSyntax } VarBindList ::= SEQUENCE OF VarBind END
Field Summary |
Fields inherited from class snmp.SNMPSequence |
sequence, tag |
Constructor Summary | |
protected |
SNMPPDU(byte[] enc,
byte pduType)
Create a new PDU of the specified type from the supplied BER encoding. |
|
SNMPPDU(byte pduType,
int requestID,
int errorStatus,
int errorIndex,
SNMPSequence varList)
Create a new PDU of the specified type, with given request ID, error status, and error index, and containing the supplied SNMP sequence as data. |
Method Summary | |
int |
getErrorIndex()
A utility method that returns the error index for this PDU, identifying the problematic variable. |
int |
getErrorStatus()
A utility method that extracts the error status for this PDU; if nonzero, can get index of problematic variable using getErrorIndex(). |
byte |
getPDUType()
A utility method that returns the PDU type of this PDU. |
int |
getRequestID()
A utility method that extracts the request ID number from this PDU. |
SNMPSequence |
getVarBindList()
A utility method that extracts the variable binding list from the pdu. |
Methods inherited from class snmp.SNMPSequence |
addSNMPObject, extractFromBEREncoding, getBEREncoding, getSNMPObjectAt, getValue, insertSNMPObjectAt, setValue, size, toString |
Methods inherited from class snmp.SNMPObject |
equals, hashCode |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SNMPPDU(byte pduType, int requestID, int errorStatus, int errorIndex, SNMPSequence varList) throws SNMPBadValueException
protected SNMPPDU(byte[] enc, byte pduType) throws SNMPBadValueException
SNMPBadValueException
- Indicates invalid SNMP PDU encoding supplied in enc.Method Detail |
public SNMPSequence getVarBindList()
SNMPVarBindList
public int getRequestID()
public int getErrorStatus()
public int getErrorIndex()
public byte getPDUType()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |