use of org.openkilda.model.cookie.ServiceCookie 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());
}
}
use of org.openkilda.model.cookie.ServiceCookie in project open-kilda by telstra.
the class MeterStatsHandler method handleStatsEntry.
@Override
public void handleStatsEntry(DummyMeterDescriptor descriptor) {
TagsFormatter tags = initTags();
if (isMeterIdOfDefaultRule(statsEntry.getMeterId())) {
tags.addCookieHexTag(new ServiceCookie(new MeterId(statsEntry.getMeterId())));
emitServiceMeterPoints(tags);
} else {
handleFlowStats(tags, null, null);
log.warn("Missed cache for switch '{}' meterId '{}'", switchId, statsEntry.getMeterId());
}
}
Aggregations