public class V2TrapInformation extends TrapInformation
| Constructor and Description |
|---|
V2TrapInformation(InetAddress agent,
String community,
SnmpPduPacket pdu)
Constructs a new trap information instance that contains the sending
agent, the community string, and the Protocol Data Unit.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getPduLength() |
protected Integer |
getRequestId() |
SnmpVarBindDTO |
getSnmpVarBindDTO(int i) |
long |
getTimeStamp()
Get the SNMP TimeTicks value for the sysUpTime of the agent that
generated the trap.
|
InetAddress |
getTrapAddress() |
TrapIdentity |
getTrapIdentity() |
String |
getVersion() |
String |
toString() |
void |
validate()
Validate the trap.
|
getAgentAddress, getCommunity, getCreationTime, getLocation, getSystemId, setCreationTime, setLocation, setSystemIdpublic V2TrapInformation(InetAddress agent, String community, SnmpPduPacket pdu)
agent - The sending agent's addresscommunity - The community string from the SNMP packet.pdu - The encapsulated Protocol Data Unit.public int getPduLength()
getPduLength in class TrapInformationpublic long getTimeStamp()
TrapInformationgetTimeStamp in class TrapInformationpublic TrapIdentity getTrapIdentity()
getTrapIdentity in class TrapInformationpublic InetAddress getTrapAddress()
getTrapAddress in class TrapInformationTrapInformation.getAgentAddress() but for SNMPv1
traps, the value can be different if the trap has been forwarded. It then
represents the true source IP address of the trap event.public String getVersion()
getVersion in class TrapInformationpublic void validate()
TrapInformationvalidate in class TrapInformationpublic SnmpVarBindDTO getSnmpVarBindDTO(int i)
getSnmpVarBindDTO in class TrapInformationprotected Integer getRequestId()
getRequestId in class TrapInformationCopyright © 2020. All rights reserved.