public void sendTest(String agentAddress, int port, String community, PDU pdu) { for (RegistrationInfo info : s_registrations.values()) { if (port == info.getPort()) { Snmp snmp = info.getSession(); MessageDispatcher dispatcher = snmp.getMessageDispatcher(); TransportMapping transport = info.getTransportMapping(); int securityModel = (pdu instanceof PDUv1 ? SecurityModel.SECURITY_MODEL_SNMPv1 :SecurityModel.SECURITY_MODEL_SNMPv2c); int messageModel = (pdu instanceof PDUv1 ? MessageProcessingModel.MPv1 : MessageProcessingModel.MPv2c); CommandResponderEvent e = new CommandResponderEvent(dispatcher, transport, new IpAddress(agentAddress), messageModel, securityModel, community.getBytes(), SecurityLevel.NOAUTH_NOPRIV, new PduHandle(), pdu, 1000, null); info.getHandler().processPdu(e); } } }
public void sendTest(String agentAddress, int port, String community, PDU pdu) { for (RegistrationInfo info : s_registrations.values()) { if (port == info.getPort()) { final Snmp snmp = info.getSession(); Snmp4JStrategy.trackSession(snmp); MessageDispatcher dispatcher = snmp.getMessageDispatcher(); TransportMapping<UdpAddress> transport = info.getTransportMapping(); int securityModel = (pdu instanceof PDUv1 ? SecurityModel.SECURITY_MODEL_SNMPv1 :SecurityModel.SECURITY_MODEL_SNMPv2c); int messageModel = (pdu instanceof PDUv1 ? MessageProcessingModel.MPv1 : MessageProcessingModel.MPv2c); CommandResponderEvent e = new CommandResponderEvent(dispatcher, transport, new IpAddress(agentAddress), messageModel, securityModel, community.getBytes(), SecurityLevel.NOAUTH_NOPRIV, new PduHandle(), pdu, 1000, null); info.getHandler().processPdu(e); } } }
public void sendTest(String agentAddress, int port, String community, PDU pdu) { for (RegistrationInfo info : s_registrations.values()) { if (port == info.getPort()) { final Snmp snmp = info.getSession(); Snmp4JStrategy.trackSession(snmp); MessageDispatcher dispatcher = snmp.getMessageDispatcher(); TransportMapping<UdpAddress> transport = info.getTransportMapping(); int securityModel = (pdu instanceof PDUv1 ? SecurityModel.SECURITY_MODEL_SNMPv1 :SecurityModel.SECURITY_MODEL_SNMPv2c); int messageModel = (pdu instanceof PDUv1 ? MessageProcessingModel.MPv1 : MessageProcessingModel.MPv2c); CommandResponderEvent e = new CommandResponderEvent(dispatcher, transport, new IpAddress(agentAddress), messageModel, securityModel, community.getBytes(), SecurityLevel.NOAUTH_NOPRIV, new PduHandle(), pdu, 1000, null); info.getHandler().processPdu(e); } } }
new CommandResponderEvent(this, sourceTransport, incomingAddress,
new CommandResponderEvent(this, sourceTransport, incomingAddress,
new CommandResponderEvent(this, sourceTransport, incomingAddress,