public OFMatchWithSwDpid() { this.ofMatch = new OFMatch(); this.switchDataPathId = 0; }
@Override public void readFrom(final ChannelBuffer data) { if (this.match == null) { this.match = new OFMatch(); } this.match.readFrom(data); this.tableId = data.readByte(); data.readByte(); // pad this.outPort = data.readShort(); }
@Override public void readFrom(final ChannelBuffer data) { if (this.match == null) { this.match = new OFMatch(); } this.match.readFrom(data); this.tableId = data.readByte(); data.readByte(); // pad this.outPort = data.readShort(); }
@Override public void deleteAllFlows() { logger.trace("deleteAllFlows on switch {}", HexString.toHexString(this.sid)); OFMatch match = new OFMatch().setWildcards(OFMatch.OFPFW_ALL); OFFlowMod flowMod = (OFFlowMod) factory.getMessage(OFType.FLOW_MOD); flowMod.setMatch(match).setCommand(OFFlowMod.OFPFC_DELETE).setOutPort(OFPort.OFPP_NONE) .setLength((short) OFFlowMod.MINIMUM_LENGTH); asyncFastSend(flowMod); } }
if (target == null) { match = new OFMatch(); match.setWildcards(0xffffffff); } else if (!(target instanceof OFMatch)) { } else if (statsType == OFStatisticsType.AGGREGATE) { OFAggregateStatisticsRequest specificReq = new OFAggregateStatisticsRequest(); OFMatch match = new OFMatch(); match.setWildcards(0xffffffff); specificReq.setMatch(match);
@Override void processOFStatisticsReply(final SwitchChannelHandler h, final OFStatisticsReply m) { // Read description, if it has been updated final OVXDescriptionStatistics description = new OVXDescriptionStatistics(); final ChannelBuffer data = ChannelBuffers.buffer(description .getLength()); final OFStatistics f = m.getFirstStatistics(); f.writeTo(data); description.readFrom(data); OFFlowMod fm = new OFFlowMod(); fm.setCommand(OFFlowMod.OFPFC_DELETE); fm.setMatch(new OFMatch()); h.channel.write(Collections.singletonList(fm)); h.sw = new PhysicalSwitch(h.featuresReply.getDatapathId()); // set switch information // set features reply and channel first so we have a DPID and // channel info. h.sw.setFeaturesReply(h.featuresReply); h.sw.setDescriptionStats(description); h.sw.setConnected(true); h.sw.setChannel(h.channel); for (final OFPortStatus ps : h.pendingPortStatusMsg) { this.handlePortStatusMessage(h, ps); } h.pendingPortStatusMsg.clear(); h.sw.boot(); h.setState(ACTIVE); }
@Override public void readFrom(final ChannelBuffer data) { super.readFrom(data); if (this.match == null) { this.match = new OFMatch(); } this.match.readFrom(data); this.cookie = data.readLong(); this.command = data.readShort(); this.idleTimeout = data.readShort(); this.hardTimeout = data.readShort(); this.priority = data.readShort(); this.bufferId = data.readInt(); this.outPort = data.readShort(); this.flags = data.readShort(); if (this.actionFactory == null) { throw new RuntimeException("OFActionFactory not set"); } this.actions = this.actionFactory.parseActions(data, this.getLengthU() - OFFlowMod.MINIMUM_LENGTH); }
if (target == null) { match = new OFMatch(); match.setWildcards(0xffffffff); } else if (!(target instanceof OFMatch)) { } else if (statsType == OFStatisticsType.AGGREGATE) { OFAggregateStatisticsRequest specificReq = new OFAggregateStatisticsRequest(); OFMatch match = new OFMatch(); match.setWildcards(0xffffffff); specificReq.setMatch(match);
@Override public void readFrom(final ChannelBuffer data) { this.length = data.readShort(); this.tableId = data.readByte(); data.readByte(); // pad if (this.match == null) { this.match = new OFMatch(); } this.match.readFrom(data); this.durationSeconds = data.readInt(); this.durationNanoseconds = data.readInt(); this.priority = data.readShort(); this.idleTimeout = data.readShort(); this.hardTimeout = data.readShort(); data.readInt(); // pad data.readShort(); // pad this.cookie = data.readLong(); this.packetCount = data.readLong(); this.byteCount = data.readLong(); if (this.actionFactory == null) { throw new RuntimeException("OFActionFactory not set"); } this.actions = this.actionFactory.parseActions(data, this.getLength() - OFFlowStatisticsReply.MINIMUM_LENGTH); }
@Override public void readFrom(final ChannelBuffer data) { super.readFrom(data); if (this.match == null) { this.match = new OFMatch(); } this.match.readFrom(data); this.cookie = data.readLong(); this.priority = data.readShort(); int reasonIndex = 0xff & data.readByte(); if (reasonIndex >= OFFlowRemovedReason.values().length) { reasonIndex = OFFlowRemovedReason.values().length - 1; } this.reason = OFFlowRemovedReason.values()[reasonIndex]; data.readByte(); // pad this.durationSeconds = data.readInt(); this.durationNanoseconds = data.readInt(); this.idleTimeout = data.readShort(); data.readByte(); // pad data.readByte(); // pad this.packetCount = data.readLong(); this.byteCount = data.readLong(); }
Mappable map = sw.getMap(); final OFMatch match = new OFMatch(); match.loadFromPacket(this.getPacketData(), inport);
if (ofMatch == null) { Match match = flow.getMatch(); ofMatch = (isIPv6) ? new V6Match() : new OFMatch();