|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.mccrory.scott.spumoni.SnmpD
SnmpD implements a sample SNMP daemon.
It listens for messages received from remote agents on (default) port 161.
It is based on Bob Snider's adaptation of JoeSNMP's TrapD test class,
which is a part of the OpenNMS
project. Thanks go out to Bob, Brian and the rest of the OpenNMS crew
for their excellent work.
| Constructor Summary | |
SnmpD()
|
|
| Method Summary | |
static void |
main(java.lang.String[] args)
The main routine. |
void |
registerOidHandler(java.lang.String oid,
OidHandler oidHandler)
Register an oid handler to our lookup map. |
void |
SnmpAgentSessionError(org.opennms.protocols.snmp.SnmpAgentSession session,
int error,
java.lang.Object ref)
Process session errors. |
void |
snmpReceivedPdu(org.opennms.protocols.snmp.SnmpAgentSession session,
java.net.InetAddress manager,
int port,
org.opennms.protocols.snmp.SnmpOctetString community,
org.opennms.protocols.snmp.SnmpPduPacket pdu)
The main method which receives SNMPv2c PDUs and forwards them to their specific handler methods. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SnmpD()
| Method Detail |
public static void main(java.lang.String[] args)
args - The command line arguments -- IGNORED.
public void registerOidHandler(java.lang.String oid,
OidHandler oidHandler)
oid - The oidoidHandler - The handler for this oid
public void SnmpAgentSessionError(org.opennms.protocols.snmp.SnmpAgentSession session,
int error,
java.lang.Object ref)
SnmpAgentSessionError in interface org.opennms.protocols.snmp.SnmpAgentHandlersession - The trap session in error.error - The error condition.ref - The reference object, if any.
public void snmpReceivedPdu(org.opennms.protocols.snmp.SnmpAgentSession session,
java.net.InetAddress manager,
int port,
org.opennms.protocols.snmp.SnmpOctetString community,
org.opennms.protocols.snmp.SnmpPduPacket pdu)
snmpReceivedPdu in interface org.opennms.protocols.snmp.SnmpAgentHandlersession - The Session that received the PDU.manager - The address of the remote sender.port - The remote port where the pdu was transmitted from.community - The decoded community string.pdu - The decoded V2 pdu.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||