Search in sources :

Example 1 with ServiceCookieTag

use of org.openkilda.model.cookie.ServiceCookie.ServiceCookieTag in project open-kilda by telstra.

the class ConnectedDevicesService method handlePacketIn.

private void handlePacketIn(OfInput input) {
    U64 rawCookie = input.packetInCookie();
    if (rawCookie == null) {
        return;
    }
    ServiceCookie cookie = new ServiceCookie(rawCookie.getValue());
    SwitchId switchId = new SwitchId(input.getDpId().getLong());
    final ServiceCookieTag serviceTag = cookie.getServiceTag();
    if (lldpServiceTags.contains(serviceTag)) {
        logger.debug("Receive connected device LLDP packet from {} OF-xid:{}, cookie: {}", input.getDpId(), input.getMessage().getXid(), cookie);
        handleSwitchLldp(input, switchId, cookie.getValue());
    } else if (arpServiceTags.contains(serviceTag)) {
        logger.debug("Receive connected device ARP packet from {} OF-xid:{}, cookie: {}", input.getDpId(), input.getMessage().getXid(), cookie);
        handleArp(input, switchId, cookie.getValue());
    }
}
Also used : U64(org.projectfloodlight.openflow.types.U64) ServiceCookieTag(org.openkilda.model.cookie.ServiceCookie.ServiceCookieTag) ServiceCookie(org.openkilda.model.cookie.ServiceCookie) SwitchId(org.openkilda.model.SwitchId)

Aggregations

SwitchId (org.openkilda.model.SwitchId)1 ServiceCookie (org.openkilda.model.cookie.ServiceCookie)1 ServiceCookieTag (org.openkilda.model.cookie.ServiceCookie.ServiceCookieTag)1 U64 (org.projectfloodlight.openflow.types.U64)1