Search in sources :

Example 1 with PacketMetadata

use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.ipv6.nd.util.rev170210.PacketMetadata in project netvirt by opendaylight.

the class Ipv6NaPacketListener method onNaReceived.

@Override
public void onNaReceived(NeighborAdvertisePacket naPacket) {
    PacketMetadata pktMetadata = naPacket.augmentation(PacketMetadata.class);
    if (pktMetadata == null) {
        return;
    }
    String srcInterface = pktMetadata.getInterface();
    IpAddress srcIP = new IpAddress(naPacket.getSourceIpv6());
    MacAddress srcMac = naPacket.getSourceMac();
    IpAddress targetIP = new IpAddress(naPacket.getTargetAddress());
    Uint64 metadata = pktMetadata.getMetadata();
    LOG.debug("NA notification received from interface {} and IP {} having MAC {}, targetIP={}", srcInterface, srcIP.stringValue(), srcMac.getValue(), targetIP.stringValue());
    validateAndProcessIpLearning(srcInterface, srcIP, srcMac, targetIP, metadata);
}
Also used : PacketMetadata(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.ipv6.nd.util.rev170210.PacketMetadata) IpAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress) MacAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress) Uint64(org.opendaylight.yangtools.yang.common.Uint64)

Aggregations

IpAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress)1 MacAddress (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress)1 PacketMetadata (org.opendaylight.yang.gen.v1.urn.opendaylight.genius.ipv6.nd.util.rev170210.PacketMetadata)1 Uint64 (org.opendaylight.yangtools.yang.common.Uint64)1