use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.arputil.rev160406.MacChangedBuilder in project genius by opendaylight.
the class ArpUtilImpl method checkAndFireMacChangedNotification.
private void checkAndFireMacChangedNotification(String interfaceName, InetAddress inetAddr, byte[] macAddressBytes) throws InterruptedException {
IpAddress ip = new IpAddress(inetAddr.getHostAddress().toCharArray());
String macAddress = NWUtil.toStringMacAddress(macAddressBytes);
PhysAddress mac = new PhysAddress(macAddress);
if (!macAddress.equals(macsDB.get(interfaceName + "-" + inetAddr.getHostAddress()))) {
if (LOG.isTraceEnabled()) {
LOG.trace("mac address changed for {}", inetAddr);
}
MacChangedBuilder builder = new MacChangedBuilder();
builder.setInterface(interfaceName);
builder.setIpaddress(ip);
builder.setMacaddress(mac);
notificationPublishService.putNotification(builder.build());
}
}
Aggregations