Active Virtual Network Management Prediction (AVNMP) Classes

snmp
Class AsnPduSequence

java.lang.Object
  |
  +--snmp.AsnObject
        |
        +--snmp.AsnSequence
              |
              +--snmp.AsnPduSequence
All Implemented Interfaces:
java.io.Serializable

public class AsnPduSequence
extends AsnSequence
implements java.io.Serializable

Handle a PDU sequence.

Version:
$Revision: 1.1.1.1 $ $State: Exp $
Author:
Steve Bush
See Also:
Serialized Form

Field Summary
 byte pduType
           
 
Fields inherited from class snmp.AsnSequence
type
 
Fields inherited from class snmp.AsnObject
CONS_SEQ, GET_REQ_MSG, GET_RSP_MSG, GETNEXT_REQ_MSG, pdu_type, SET_REQ_MSG, SNMP_ERR_BADVALUE, SNMP_ERR_GENERR, SNMP_ERR_NOERROR, SNMP_ERR_NOSUCHNAME, SNMP_ERR_READONLY, SNMP_ERR_TOOBIG, SNMP_VERSION_1, TRP_REQ_MSG
 
Constructor Summary
AsnPduSequence(java.io.InputStream in, byte type)
          Build a PDU sequence from the input stream.
 
Method Summary
 AsnObject findPdu()
          recursively look for a pduSequence object - got one :-)
 int getReqId()
           
 AsnSequence getVarBinds()
          Return the varbind list from this pdu
 boolean HadError()
           
 int value()
          This method appears to be mis-named.
 int whatError()
           
 int whereError()
           
 
Methods inherited from class snmp.AsnSequence
add, getObj, size, write
 
Methods inherited from class snmp.AsnObject
AsnBuildHeader, AsnMakeMe, AsnReadHeader, LengthBytes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pduType

public byte pduType
Constructor Detail

AsnPduSequence

public AsnPduSequence(java.io.InputStream in,
                      byte type)
               throws java.io.IOException
Build a PDU sequence from the input stream.
Parameters:
in - The input stream.
Method Detail

whatError

public int whatError()
Returns:
The SNMP error code.

whereError

public int whereError()
Returns:
Which object in varbind is in error ?

findPdu

public AsnObject findPdu()
recursively look for a pduSequence object - got one :-)
Overrides:
findPdu in class AsnSequence
Returns:
The ASN.1 object found.

value

public int value()
This method appears to be mis-named. It returns the ASN.1 type of the first varbind.
 1 - BOOLEAN
 2 - INTEGER
 3 - BIT STRING
 4 - OCTET STRING
 5 - NULL
 6 - OBJECT ID
 ...
 
Returns:
The ASN.1 Tag

getVarBinds

public AsnSequence getVarBinds()
Return the varbind list from this pdu
Returns:
The varbind list.

HadError

public boolean HadError()
Returns:
true if PDU had an SNMP error.

getReqId

public int getReqId()
Returns:
The PDU request Id.

Active Virtual Network Management Prediction (AVNMP) Classes