/** * <p> * getDot1dTpFdbAddress * </p> * * @return a {@link java.lang.String} object. */ public String getDot1qTpFdbAddress() { int[] identifiers = getInstance().getIds(); if (identifiers.length != 7) { return null; } StringBuilder sb = new StringBuilder(); for (int i = identifiers.length - 6; i < identifiers.length; i++) { if (identifiers[i] >= 16) { sb.append(Integer.toHexString(identifiers[i])); } else { sb.append("0").append(Integer.toHexString(identifiers[i])); } } return sb.toString(); }
private Map<Integer, SortedSet<OnmsHwEntityAlias>> mapAliases(List<SnmpResult> results) { Map<Integer, SortedSet<OnmsHwEntityAlias>> aliases = new HashMap<>(); for (SnmpResult result : results) { int[] instance = result.getInstance().getIds(); int entAliasEntry = instance[0]; int entAliasIndex = instance[1]; SortedSet<OnmsHwEntityAlias> aliasSet = aliases.get(entAliasEntry); if (aliasSet == null) { aliasSet = new TreeSet<>(); aliases.put(entAliasEntry, aliasSet); } aliasSet.add(new OnmsHwEntityAlias(entAliasIndex, result.getValue().toString())); LOG.debug("result from entAliasMappingTable: found entry {} index: {} oid: {}", entAliasEntry, entAliasIndex, result.getValue()); } return aliases; }
/** * This is a hack, we get the IP address from the instance information when storing one of the columns. :P */ @Override public void storeResult(final SnmpResult result) { final int[] instanceIds = result.getInstance().getIds(); final int addressType = instanceIds[1]; if (addressType == IPAddressTableTracker.TYPE_IPV4 || addressType == IPAddressTableTracker.TYPE_IPV6 || addressType == IPAddressTableTracker.TYPE_IPV6Z) { m_inetAddress = InetAddressUtils.getInetAddress(instanceIds, 2, addressType); } else { LOG.warn("Unable to determine IP address type ({})", addressType); } super.storeResult(result); } }
/** * This is a hack, we get the IP address from the instance information when storing one of the columns. :P */ @Override public void storeResult(final SnmpResult result) { final int[] instanceIds = result.getInstance().getIds(); final int addressType = instanceIds[1]; if (addressType == IPAddressTableTracker.TYPE_IPV4 || addressType == IPAddressTableTracker.TYPE_IPV6 || addressType == IPAddressTableTracker.TYPE_IPV6Z) { m_inetAddress = InetAddressUtils.getInetAddress(instanceIds, 2, addressType); } else { LOG.warn("Unable to determine IP address type ({})", addressType); } super.storeResult(result); } }
final int[] instanceIds = instance.getIds();
final int[] instanceIds = instance.getIds();
final int[] rawIds = netmaskRef.getIds(); final int addressType = rawIds[1]; final int mask = rawIds[rawIds.length - 1];
final int[] rawIds = netmaskRef.getIds(); final int addressType = rawIds[1]; final int mask = rawIds[rawIds.length - 1];