import io.netty.handler.codec.ByteToMessageDecoder;
import java.util.List;
import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.openflowjava.statistics.CounterEventTypes;
+import org.opendaylight.openflowjava.statistics.StatisticsCounters;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final byte OF13_VERSION_ID = EncodeConstants.OF13_VERSION_ID;
private static final short OF_PACKETIN = 10;
private static final Logger LOGGER = LoggerFactory.getLogger(OFVersionDetector.class);
+ private final StatisticsCounters statisticsCounters;
private volatile boolean filterPacketIns;
/**
*/
public OFVersionDetector() {
LOGGER.trace("Creating OFVersionDetector");
+ statisticsCounters = StatisticsCounters.getInstance();
}
public void setFilterPacketIns(final boolean enabled) {
messageBuffer.retain();
} else {
LOGGER.debug("dropped packetin");
+ statisticsCounters.incrementCounter(CounterEventTypes.US_DROPPED_PACKET_IN);
}
} else {
LOGGER.warn("detected version: {} - currently not supported", version);
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.ConcurrentHashMap;
-
import org.opendaylight.openflowjava.protocol.spi.statistics.StatisticsHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
CounterEventTypes.DS_ENTERED_OFJAVA,
CounterEventTypes.DS_FLOW_MODS_ENTERED,
CounterEventTypes.DS_FLOW_MODS_SENT,
+ CounterEventTypes.US_DROPPED_PACKET_IN,
CounterEventTypes.US_DECODE_FAIL,
CounterEventTypes.US_DECODE_SUCCESS,
CounterEventTypes.US_MESSAGE_PASS,