Examples of OFMatch


Examples of org.openflow.protocol.OFMatch

                // Create an OFMatchReconcile object
                OFMatchReconcile ofmr = new OFMatchReconcile();

                // Generate an OFMatch objects for the OFMatchWithSwDpid object
                OFMatch match = new OFMatch().setWildcards(OFMatch.OFPFW_ALL);

                // Generate the OFMatchWithSwDpid
                OFMatchWithSwDpid ofmatchsw = new OFMatchWithSwDpid(match,
                                                                    affectedSwitch);
View Full Code Here

Examples of org.openflow.protocol.OFMatch

                    // Analyze all the flows with outPorts equaling the downed
                    // port and extract OFMatch's to trace back to neighbors
                    for (OFFlowStatisticsReply flow : flows) {
                        // Create a reference to the match for ease
                        OFMatch match = flow.getMatch();

                        // Here we utilize an index of input ports which point
                        // to multiple invalid matches
                        if (invalidBaseIngressAndMatches.containsKey(match.getInputPort()))
                            // If the input port is already in the index, add
                            // the match to it's list
                            invalidBaseIngressAndMatches.get(match.getInputPort())
                                                        .add(match);
                        else {
                            // Otherwise create a new list and add it to the
                            // index
                            List<OFMatch> matches = new ArrayList<OFMatch>();
                            matches.add(match);
                            invalidBaseIngressAndMatches.put(match.getInputPort(),
                                                             matches);
                        }
                    }

                    // Remove invalid flows from the base switch, if they exist
View Full Code Here

Examples of org.openflow.protocol.OFMatch

        // Statistics request object for getting flows
        OFStatisticsRequest req = new OFStatisticsRequest();
        req.setStatisticType(OFStatisticsType.FLOW);
        int requestLength = req.getLengthU();
        OFFlowStatisticsRequest specificReq = new OFFlowStatisticsRequest();
        specificReq.setMatch(new OFMatch().setWildcards(0xffffffff));
        specificReq.setOutPort(outPort);
        specificReq.setTableId((byte) 0xff);
        req.setStatistics(Collections.singletonList((OFStatistics) specificReq));
        requestLength += specificReq.getLength();
        req.setLengthU(requestLength);
View Full Code Here

Examples of org.openflow.protocol.OFMatch

     *            to delete
     */
    public void clearFlowMods(IOFSwitch sw, Short outPort) {
        // Delete all pre-existing flows with the same output action port or
        // outPort
        OFMatch match = new OFMatch().setWildcards(OFMatch.OFPFW_ALL);
        OFMessage fm = ((OFFlowMod) floodlightProvider.getOFMessageFactory()
                                                      .getMessage(OFType.FLOW_MOD)).setMatch(match)
                                                                                   .setCommand(OFFlowMod.OFPFC_DELETE)
                                                                                   .setOutPort(outPort)
                                                                                   .setLength(U16.t(OFFlowMod.MINIMUM_LENGTH));
View Full Code Here

Examples of org.openflow.protocol.OFMatch

    }

    @Override
    public void readFrom(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();
    }
View Full Code Here

Examples of org.openflow.protocol.OFMatch

    }

    @Override
    public void readFrom(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();
    }
View Full Code Here

Examples of org.openflow.protocol.OFMatch

              
               parseActionString(fm, actionString, log);

               fm.setPriority(U16.t(LB_PRIORITY));

               OFMatch ofMatch = new OFMatch();
               try {
                   ofMatch.fromString(matchString);
               } catch (IllegalArgumentException e) {
                   log.debug("ignoring flow entry {} on switch {} with illegal OFMatch() key: "
                                     + matchString, entryName, swString);
               }
       
View Full Code Here

Examples of org.openflow.protocol.OFMatch

    public void readFrom(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();
View Full Code Here

Examples of org.openflow.protocol.OFMatch

            explanation="An I/O error occured while trying to write a " +
                "drop flow mod to a switch",
            recommendation=LogMessageDoc.CHECK_SWITCH)
    protected void doDropFlow(IOFSwitch sw, OFPacketIn pi, IRoutingDecision decision, FloodlightContext cntx) {
        // initialize match structure and populate it using the packet
        OFMatch match = new OFMatch();
        match.loadFromPacket(pi.getPacketData(), pi.getInPort());
        if (decision.getWildcards() != null) {
            match.setWildcards(decision.getWildcards());
        }

        // Create flow-mod based on packet-in and src-switch
        OFFlowMod fm =
                (OFFlowMod) floodlightProvider.getOFMessageFactory()
View Full Code Here

Examples of org.openflow.protocol.OFMatch

    }

    protected void doForwardFlow(IOFSwitch sw, OFPacketIn pi,
                                 FloodlightContext cntx,
                                 boolean requestFlowRemovedNotifn) {
        OFMatch match = new OFMatch();
        match.loadFromPacket(pi.getPacketData(), pi.getInPort());

        // Check if we have the location of the destination
        IDevice dstDevice =
                IDeviceService.fcStore.
                    get(cntx, IDeviceService.CONTEXT_DST_DEVICE);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.