public byte[] toByteArray() { if (getInetAddress() != null) { return getInetAddress().getAddress(); } return null; }
public byte[] toByteArray() { if (getInetAddress() != null) { return getInetAddress().getAddress(); } return null; }
public byte[] toByteArray() { if (getInetAddress() != null) { return getInetAddress().getAddress(); } return null; }
@Override public InetAddress toInetAddress() { switch (m_value.getSyntax()) { case SMIConstants.SYNTAX_IPADDRESS: return ((IpAddress)m_value).getInetAddress(); default: throw new IllegalArgumentException("cannot convert "+m_value+" to an InetAddress"); } }
public InetAddress toInetAddress() { switch (m_value.getSyntax()) { case SMIConstants.SYNTAX_IPADDRESS: return ((IpAddress)m_value).getInetAddress(); default: throw new IllegalArgumentException("cannot convert "+m_value+" to an InetAddress"); } }
/** * @return The {@link InetAddress} of the agent that generated the trap * as found in the SNMPv1 AgentAddress field. This can vary from the value * of {@link #getAgentAddress()} if the SNMPv1 trap has been forwarded. */ @Override public InetAddress getTrapAddress() { return m_pdu.getAgentAddress().getInetAddress(); }
/** * @return The {@link InetAddress} of the agent that generated the trap * as found in the SNMPv1 AgentAddress field. This can vary from the value * of {@link #getAgentAddress()} if the SNMPv1 trap has been forwarded. */ @Override public InetAddress getTrapAddress() { return m_pdu.getAgentAddress().getInetAddress(); }
@Override public String identifyHost(CommandResponderEvent message) { IpAddress ip = (IpAddress) message.getPeerAddress(); return ip.getInetAddress().getCanonicalHostName(); }
@Override public InetAddress toInetAddress() { switch (m_value.getSyntax()) { case SMIConstants.SYNTAX_IPADDRESS: return ((IpAddress)m_value).getInetAddress(); default: throw new IllegalArgumentException("cannot convert "+m_value+" to an InetAddress"); } }
protected InetAddress getTrapAddress() { return m_pdu.getAgentAddress().getInetAddress(); }
public int compareTo(Object o) { OctetString a = new OctetString(inetAddress.getAddress()); return a.compareTo(new OctetString(((IpAddress)o).getInetAddress().getAddress())); }
public int compareTo(Variable o) { OctetString a = new OctetString(inetAddress.getAddress()); return a.compareTo(new OctetString(((IpAddress)o).getInetAddress().getAddress())); }
public int compareTo(Variable o) { OctetString a = new OctetString(inetAddress.getAddress()); return a.compareTo(new OctetString(((IpAddress)o).getInetAddress().getAddress())); }
String dNSName = ((String)entry).toLowerCase(); String hostName = ((IpAddress)tmStateReference.getAddress()) .getInetAddress().getCanonicalHostName(); if ((dNSName != null) && (dNSName.length() > 0)) { if (dNSName.charAt(0) == '*') {
String dNSName = ((String)entry).toLowerCase(); String hostName = ((IpAddress)tmStateReference.getAddress()) .getInetAddress().getCanonicalHostName(); if ((dNSName != null) && (dNSName.length() > 0)) { if (dNSName.charAt(0) == '*') {
retvalue = null; } else if(valueAsVar instanceof IpAddress) { retvalue = ((IpAddress) valueAsVar).getInetAddress(); } else { logger.warn("Unknown syntax " + AbstractVariable.getSyntaxString(type));
m_listener.trapReceived(new Snmp4JV1TrapInformation(addr.getInetAddress(), new String(e.getSecurityName()), (PDUv1)command)); } else { m_listener.trapReceived(new Snmp4JV2TrapInformation(addr.getInetAddress(), new String(e.getSecurityName()), command));
m_listener.trapReceived(new Snmp4JV1TrapInformation(addr.getInetAddress(), new String(e.getSecurityName()), (PDUv1)command)); } else { m_listener.trapReceived(new Snmp4JV2TrapInformation(addr.getInetAddress(), new String(e.getSecurityName()), command));
String enterprise = (String) convertVar(pduv1.getEnterprise()); event.put("enterprise", enterprise); event.put("agent_addr", pduv1.getAgentAddress().getInetAddress()); if (pduv1.getGenericTrap() != PDUv1.ENTERPRISE_SPECIFIC) { event.put("generic_trap", GENERICTRAP.values()[pduv1.getGenericTrap()].toString());
m_listener.trapReceived(new Snmp4JV1TrapInformation(addr.getInetAddress(), new String(e.getSecurityName()), (PDUv1)e.getPDU(), m_trapProcessorFactory.createTrapProcessor())); } else { m_listener.trapReceived(new Snmp4JV2TrapInformation(addr.getInetAddress(), new String(e.getSecurityName()), e.getPDU(), m_trapProcessorFactory.createTrapProcessor()));