|
SNMP Stack 4_12 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Observable | +--uk.co.westhawk.snmp.stack.Pdu | +--uk.co.westhawk.snmp.stack.TrapPduv1
This class represents the ASN SNMPv1 Trap Pdu object. See RFC 1157.
Note that the SNMPv1 Trap Pdu is the only Pdu with a different Pdu
format. It has additional fields like enterprise
,
ipAddress
, genericTrap
,
specificTrap
and timeTicks
.
TrapPduv2
Fields inherited from class uk.co.westhawk.snmp.stack.Pdu |
added, answered, context, encodedPacket, errind, errstat, msg_type, reqVarbinds, respVarbinds |
Constructor Summary | |
TrapPduv1(SnmpContext con)
Constructor. |
Method Summary | |
java.lang.String |
getEnterprise()
Returns the type of object generating the trap. |
int |
getGenericTrap()
Returns the generic trap type. |
java.lang.String |
getGenericTrapString()
Returns the string representation of the generic trap. |
byte[] |
getIpAddress()
Returns the IP Address of the object generating the trap. |
int |
getSpecificTrap()
Returns the specific trap code. |
long |
getTimeTicks()
Returns the sysUpTime of the agent. |
protected void |
new_value(int n,
varbind res)
Has no meaning, since there is not response. |
boolean |
send()
Send the TrapPduv1. |
void |
setEnterprise(java.lang.String var)
Sets the type of object generating the trap. |
void |
setGenericTrap(int var)
Sets the generic trap type. |
void |
setIpAddress(byte[] var)
Sets the IP Address of the object generating the trap. |
void |
setSpecificTrap(int var)
Sets the specific trap code. |
void |
setTimeTicks(long var)
Sets the sysUpTime of the agent. |
protected void |
tell_them()
Has no meaning, since there is not response. |
java.lang.String |
toString()
Returns the string representation of this object. |
Methods inherited from class uk.co.westhawk.snmp.stack.Pdu |
addOid, addOid, addOid, addOid, addOid, addToTrans, getContext, getErrorIndex, getErrorStatus, getErrorStatusString, getMsgType, getReqId, getRequestVarbinds, getResponseVarbinds, isTimedOut, notifyObservers, send, send, sendme, setErrorIndex, setErrorStatus, setErrorStatus, setMsgType, setRetryIntervals, toString, waitForSelf |
Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TrapPduv1(SnmpContext con)
con
- The context v1 of the TrapPduv1SnmpContext
Method Detail |
public void setEnterprise(java.lang.String var)
public java.lang.String getEnterprise()
public void setIpAddress(byte[] var)
public byte[] getIpAddress()
public void setGenericTrap(int var)
SnmpConstants.SNMP_TRAP_COLDSTART
,
SnmpConstants.SNMP_TRAP_WARMSTART
,
SnmpConstants.SNMP_TRAP_LINKDOWN
,
SnmpConstants.SNMP_TRAP_LINKUP
,
SnmpConstants.SNMP_TRAP_AUTHFAIL
,
SnmpConstants.SNMP_TRAP_EGPNEIGHBORLOSS
,
SnmpConstants.SNMP_TRAP_ENTERPRISESPECIFIC
public int getGenericTrap()
public java.lang.String getGenericTrapString()
getGenericTrap()
public void setSpecificTrap(int var)
public int getSpecificTrap()
public void setTimeTicks(long var)
public long getTimeTicks()
public boolean send() throws java.io.IOException, PduException
send
in class Pdu
public java.lang.String toString()
toString
in class Pdu
protected void new_value(int n, varbind res)
new_value
in class Pdu
protected void tell_them()
tell_them
in class Pdu
|
SNMP Stack 4_12 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |